/* Punnett Square (/punnett-square): the 4:3 picture (the square beside the parents, the ratio chart and the litter) and
   the parents' table (a row per gene: in the cross or not, the mother's and the father's genotype). Tiles, panels and
   buttons come from the app kit (css/app-kit, docs/app-kit.md). Loaded only on this app's page (StylePaths). */

.ps-landing-app .ps-main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Click a parent's genotype to change it; hover or tap a square, a bar or an offspring to see its phenotype. */
.ps-landing-app .ps-canvas {
    display: block;
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 4 / 3;
    border-radius: var(--ak-radius, 8px);
    touch-action: manipulation;
}

.ps-landing-app .ps-parents {
    display: grid;
    gap: 6px;
}

.ps-landing-app .ps-row {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
    align-items: center;
}

.ps-landing-app .ps-head {
    font-size: 0.82em;
    font-weight: 600;
}

.ps-landing-app .ps-mother { color: #d6336c; }
.ps-landing-app .ps-father { color: #1c7ed6; }

.ps-landing-app .ps-head .ps-mother,
.ps-landing-app .ps-head .ps-father {
    display: inline-flex;
    gap: 3px;
    align-items: center;
    min-width: 0;
}

.ps-landing-app .ps-head .ak-icon {
    width: 1.35em;
    height: 1.35em;
}

.ps-landing-app .ps-gene {
    display: flex;
    gap: 6px;
    align-items: center;
    min-width: 0;
    font-size: 0.88em;
    cursor: pointer;
}

.ps-landing-app .ps-gene span {
    overflow-wrap: anywhere;
}

.ps-landing-app .ps-select {
    min-width: 0;
    width: 100%;
    padding-inline: 6px;
    font-size: 0.85em;
}

.ps-landing-app .ps-row.is-off .ps-select {
    opacity: 0.45;
}

.ps-landing-app app-section[hidden] {
    display: none;
}

/* Phones: a taller picture, the parents above the square and the chart beside the litter below it. */
@media (max-width: 640px) {
    .ps-landing-app .ps-canvas {
        aspect-ratio: 3 / 4;
    }
}
