/* Staby Specs — row-style tabel i 2 kolonner (desktop); 1 kolonne + accessible toggle (mobil) */

.staby-specs {
    --sf-border: #e8e5d8;
    --sf-ink: #1e1e1e;
    --sf-muted: #7a7768;
    --sf-accent: #4054B2;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--sf-ink);
    line-height: 1.5;
}

/* LIST — grid med explicit rows så linjer flugter horisontalt på tværs af kolonner */
.staby-specs__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(var(--sf-rows, 7), auto);
    grid-auto-flow: column;
    column-gap: 40px;
    margin: 0;
    padding: 0;
}

.staby-specs__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--sf-border);
    font-size: 14px;
}

.staby-specs__row dt {
    color: var(--sf-muted);
    font-weight: 500;
    margin: 0;
    flex-shrink: 0;
}

.staby-specs__row dd {
    color: var(--sf-ink);
    font-weight: 600;
    margin: 0;
    text-align: right;
}

.staby-specs__row dd p {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
}

/* TOGGLE — kun synlig på mobil */
.staby-specs__toggle {
    display: none;
}

.staby-specs__toggle .is-open { display: none; }
.staby-specs__toggle .is-closed { display: inline; }

/* TABLET — stadig 2 kolonner */
@media (max-width: 900px) {
    .staby-specs__list {
        column-gap: 32px;
    }
}

/* MOBIL — 1 kolonne, første 4 synlige, resten foldes */
@media (max-width: 600px) {
    .staby-specs__list {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        grid-auto-flow: row;
    }

    .staby-specs__row.is-extra {
        display: none;
    }

    /* Når toggle er aktiv (aria-expanded="true"), vis extras */
    .staby-specs:has(.staby-specs__toggle[aria-expanded="true"]) .staby-specs__row.is-extra {
        display: flex;
    }

    .staby-specs__toggle {
        /* Native button — fuld a11y (keyboard, screen reader, focus) */
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-height: 44px; /* Apple HIG tap target */
        padding: 12px 4px;
        margin-top: 4px;
        background: transparent;
        border: 0;
        cursor: pointer;
        font-family: inherit;
        font-size: 13.5px;
        font-weight: 500;
        color: var(--sf-muted);
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        letter-spacing: 0.01em;
    }

    .staby-specs__toggle:hover,
    .staby-specs__toggle:active {
        color: var(--sf-ink);
    }

    /* Synlig focus-ring for keyboard-brugere */
    .staby-specs__toggle:focus-visible {
        outline: 2px solid var(--sf-accent);
        outline-offset: 4px;
        border-radius: 2px;
        color: var(--sf-ink);
    }

    .staby-specs__toggle-icon {
        width: 10px;
        height: 10px;
        position: relative;
        display: inline-block;
    }

    .staby-specs__toggle-icon::before {
        content: "";
        position: absolute;
        left: 1px;
        top: 2px;
        width: 7px;
        height: 7px;
        border-right: 1.5px solid currentColor;
        border-bottom: 1.5px solid currentColor;
        transform: rotate(45deg);
        transition: transform 0.18s ease;
        transform-origin: 60% 60%;
    }

    .staby-specs__toggle[aria-expanded="true"] .is-closed { display: none; }
    .staby-specs__toggle[aria-expanded="true"] .is-open { display: inline; }
    .staby-specs__toggle[aria-expanded="true"] .staby-specs__toggle-icon::before {
        transform: rotate(-135deg);
    }
}
