/*
 * Seat-limited form (Templates/Form/Form.html, Partials/Form/Field/Radio.html): on the FormSplit
 * layout a wider form column; the session field as month headings, one card per day, the day's
 * sessions side by side. Card style and column widths from the adaptacja sign-up. Colours come
 * from form-split.css (--fs-*) when the page uses that layout, with light fallbacks otherwise.
 */

/* --- Frame: the form column takes the rest, the photo 700 of 1920px (as adaptacja) ---------- */

.form-split:has(.powermail-seats, .powermail-seats__field) .form-split__panel {
    flex: 1 1 auto;
    max-width: none;
}

.form-split:has(.powermail-seats, .powermail-seats__field) .form-split__media {
    flex: 0 0 36.46%;
}

/* the decor shape keeps its place in the wider panel */
.form-split:has(.powermail-seats, .powermail-seats__field) .form-split__decor {
    inset: -12.62% -154.62% -71.73% -24.01%;
}

/* up to 1720px the 1400px padding of form-split.css (48px 64px instead of 64px 128px) */
@media (min-width: 992px) and (max-width: 1719.98px) {
    .form-split:has(.powermail-seats, .powermail-seats__field) .form-split__panel {
        padding: 48px 64px;
    }
}

@media (max-width: 1399.98px) {
    .form-split:has(.powermail-seats, .powermail-seats__field) .form-split__media {
        flex-basis: 32%;
    }
}

/* --- Summary cards, as the session cards: the signed-in account above the form, the chosen
       session on the thank-you page ------------------------------------------------------------ */

.powermail-seats__summary {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 24px;
    padding: 16px 20px;
    border: 1px solid var(--seats-border);
    border-left: 4px solid var(--seats-orange);
    border-radius: 8px;
    background: var(--seats-card-bg);
    color: var(--seats-text);
}

/* on the thank-you page it follows the text */
.powermail-seats--thanks .powermail-seats__summary--session {
    margin-top: 16px;
}

/* already signed up: the card, then what happens next */
.powermail-seats--signed-up .powermail-seats__summary {
    margin-bottom: 12px;
}

.form-split__main .powermail-seats__note,
.powermail-seats__note {
    margin: 0 0 24px;
    color: var(--fs-gray-04, #4f5b67);
}

.powermail-seats__summary-icon {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--seats-icon-bg);
    color: var(--seats-navy);
}

.powermail-seats__summary-icon svg {
    width: 24px;
    height: 24px;
}

.powermail-seats__summary-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.4;
}

.powermail-seats__summary-label {
    color: var(--seats-muted);
    font-size: 13px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.powermail-seats__summary-title {
    color: var(--seats-navy);
    font-size: 18px;
    font-weight: 600;
}

.powermail-seats__summary-meta {
    color: var(--seats-muted);
    font-size: 14px;
    overflow-wrap: anywhere;
}

/* --- Session field (its tokens also colour the summary cards) ----------------------------------- */

.powermail-seats__summary,
.powermail-seats__field {
    --seats-navy: var(--fs-navy, #003052);
    --seats-text: var(--fs-black, #0a0a0a);
    --seats-muted: var(--fs-gray-04, #4f5b67);
    --seats-red: var(--fs-red, #e40100);
    --seats-orange: #ff790c;
    --seats-border: #c2cbd4;
    --seats-icon-bg: #eef2f6;
    --seats-card-bg: #fff;
    --seats-full-bg: #f2f3f5;
    --seats-selected-bg: #003052;
    --seats-selected-muted: #c2cbd4;
}

.powermail-seats__field {
    min-width: 0;
    margin: 0 0 24px;
    padding: 0;
    border: 0;
    color: var(--seats-text);
}

.powermail-seats__legend {
    margin: 0 0 4px;
    padding: 0;
    font-size: 16px;
    font-weight: 600;
}

.powermail-seats__legend .mandatory {
    color: var(--seats-red);
}

/* field-scoped: .form-split__main p would otherwise make it body text */
.powermail-seats__field .powermail-seats__month-label {
    margin: 20px 0 12px;
    color: var(--seats-navy);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
}

.powermail-seats__days {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.powermail-seats__day {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 24px;
    border: 1px solid var(--seats-border);
    border-radius: 8px;
    background: var(--seats-card-bg);
}

.powermail-seats__day-head {
    display: flex;
    align-items: center;
    gap: 16px;
}

.powermail-seats__icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 24px;
    background: var(--seats-icon-bg);
    color: var(--seats-navy);
}

.powermail-seats__day-label {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.powermail-seats__sessions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.powermail-seats__session {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 12px;
    align-items: center;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--seats-border);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.powermail-seats__session:hover {
    border-color: var(--seats-navy);
}

.powermail-seats__session:has(:focus-visible) {
    outline: 2px solid var(--seats-navy);
    outline-offset: 2px;
}

.powermail-seats__field .powermail-seats__radio {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 22px;
    height: 22px;
    margin: 0;
    border: 2px solid var(--seats-navy);
    border-radius: 50%;
    background: #fff;
    appearance: none;
    cursor: pointer;
}

.powermail-seats__field .powermail-seats__radio:checked {
    border: 7px solid var(--seats-orange);
}

.powermail-seats__field .powermail-seats__radio:focus {
    outline: none;
    box-shadow: none;
}

.powermail-seats__name {
    grid-column: 1;
    color: var(--seats-navy);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
}

.powermail-seats__meta {
    grid-column: 1;
    color: var(--seats-muted);
    font-size: 14px;
    line-height: 1.4;
}

/* selected: as a selected adaptacja card */
.powermail-seats__session:has(.powermail-seats__radio:checked) {
    border-color: var(--seats-selected-bg);
    background: var(--seats-selected-bg);
}

.powermail-seats__session:has(.powermail-seats__radio:checked) .powermail-seats__name {
    color: var(--seats-orange);
}

.powermail-seats__session:has(.powermail-seats__radio:checked) .powermail-seats__meta {
    color: var(--seats-selected-muted);
}

/* full: visible, not selectable */
.powermail-seats__session--full {
    border-style: dashed;
    background: var(--seats-full-bg);
    cursor: not-allowed;
}

.powermail-seats__session--full:hover {
    border-color: var(--seats-border);
}

.powermail-seats__session--full .powermail-seats__name {
    color: var(--seats-muted);
}

.powermail-seats__field .powermail-seats__session--full .powermail-seats__radio {
    border-color: var(--seats-border);
    background: var(--seats-full-bg);
    cursor: not-allowed;
}

.powermail-seats__full {
    color: var(--seats-red);
    font-weight: 500;
}

.powermail-seats__field .powermail-seats__none {
    color: var(--seats-muted);
}

/* Layout follows the width of the form column, not the screen (the photo column takes a different
   share per screen size). From 840px the day sits next to its two sessions in one row (the width a
   session needs without wrapping its seats line, twice, plus the date); under 600px the sessions go
   under each other; in between the day is above its two sessions. */
.powermail-seats__month {
    container: seats-month / inline-size;
}

@container seats-month (min-width: 840px) {
    .powermail-seats__day {
        display: grid;
        /* one width for every day, so the sessions line up: fits "Niedziela, 29.11.2026" */
        grid-template-columns: 232px 1fr;
        align-items: center;
        gap: 16px;
        padding: 14px 16px 14px 20px;
    }

    .powermail-seats__day-head {
        gap: 12px;
        white-space: nowrap;
    }

    .powermail-seats__icon {
        width: 40px;
        height: 40px;
    }

    .powermail-seats__icon svg {
        width: 20px;
        height: 20px;
    }
}

@container seats-month (max-width: 599.98px) {
    .powermail-seats__days {
        gap: 12px;
    }

    .powermail-seats__day {
        gap: 12px;
        padding: 16px;
    }

    .powermail-seats__day-head {
        gap: 12px;
    }

    .powermail-seats__icon {
        width: 40px;
        height: 40px;
    }

    .powermail-seats__sessions {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* dark: form-split.css switches --fs-*; the card colours follow adaptacja's dark set */
@media (prefers-color-scheme: dark) {
    .powermail-seats__summary,
    .powermail-seats__field {
        --seats-orange: #ff790c;
        --seats-border: #1d4566;
        --seats-icon-bg: rgba(255, 255, 255, 0.1);
        --seats-card-bg: #062a45;
        --seats-full-bg: rgba(255, 255, 255, 0.04);
        --seats-selected-bg: #0b3a5e;
        --seats-selected-muted: #b8c7d6;
    }

    .powermail-seats__session:has(.powermail-seats__radio:checked) {
        border-color: var(--seats-orange);
    }

    .powermail-seats__field .powermail-seats__radio {
        background: transparent;
    }
}
