/* Reservation sheet and students-count stepper. Loaded by class-occurrence-schedule.htm and pay.htm. */

#reservationModal #reservationModalContent .students-count-stepper {
    width: 100%;
}

#reservationModal #reservationModalContent .students-count-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

#reservationModal #reservationModalContent .students-count-minus,
#reservationModal #reservationModalContent .students-count-plus {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    font-size: 1.5rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#reservationModal #reservationModalContent .students-count-input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    height: 44px;
    font-size: 1.5rem;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

@media (min-width: 768px) {
    #reservationModal #reservationModalContent .students-count-controls {
        display: inline-flex;
        width: auto;
    }

    #reservationModal #reservationModalContent .students-count-input {
        flex: 0 0 5.5rem;
        width: 5.5rem;
    }
}

#reservationModal #reservationModalContent .students-count-input::-webkit-outer-spin-button,
#reservationModal #reservationModalContent .students-count-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#reservationModal #reservationModalContent .students-count-extra-hint[hidden] {
    display: none !important;
}

.reservation-sheet {
    --reservation-action: #9c0bdf;
    --reservation-action-hover: #8609c0;
    --reservation-action-active: #7307a6;
    --reservation-action-text: #7a0aae;
    --reservation-lilac: #f6ecfc;
    --reservation-line: #ece4f2;
    --reservation-text: #1b1b22;
    --reservation-text-secondary: #565061;
    --reservation-text-muted: #6b6478;
    position: relative;
    min-height: 100%;
    padding: 48px 24px 64px;
    background: #ffffff;
    overflow: hidden;
    color: var(--reservation-text-secondary);
    font-family: var(--body-font);
}

.reservation-sheet *,
.reservation-sheet *::before,
.reservation-sheet *::after {
    box-sizing: border-box;
}

.reservation-sheet__backdrop {
    position: absolute;
    inset: 0;
    color: #eadcff;
    pointer-events: none;
}

.reservation-sheet__waves {
    width: 100%;
    height: 100%;
    display: block;
}

.reservation-sheet__stage {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    margin: 0 auto;
}

.reservation-sheet__header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 28px;
}

.reservation-sheet__photo {
    flex: none;
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--reservation-line);
}

.reservation-sheet__eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 8px;
    color: var(--reservation-action-text);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.reservation-sheet__eyebrow::after {
    content: "";
    width: 72px;
    height: 2px;
    background: var(--reservation-action);
}

.reservation-sheet__title {
    margin: 0;
    color: var(--reservation-text);
    font-family: var(--title-font);
    font-size: clamp(28px, 3.4vw, 44px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.reservation-sheet__when,
.reservation-sheet__place,
.reservation-sheet__note {
    margin: 8px 0 0;
    color: var(--reservation-text-secondary);
    font-size: 16px;
    line-height: 1.45;
}

.reservation-sheet__note--center {
    text-align: center;
}

.reservation-sheet__unit-price {
    margin: 10px 0 0;
    color: var(--reservation-text);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.reservation-sheet__card {
    background: #ffffff;
    border: 1px solid var(--reservation-line);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgb(40 10 60 / 0.14), 0 2px 6px rgb(40 10 60 / 0.06);
    padding: 32px 36px;
}

.reservation-sheet__section-title {
    margin: 0 0 16px;
    color: var(--reservation-text);
    font-family: var(--title-font);
    font-size: 22px;
    font-weight: 700;
}

.reservation-sheet__contact {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

.reservation-sheet__avatar {
    flex: none;
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 999px;
    border: 1px solid var(--reservation-line);
}

.reservation-sheet__details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 24px;
    margin: 0;
}

.reservation-sheet__detail dt {
    margin: 0;
    color: var(--reservation-text-muted);
    font-size: 13px;
    font-weight: 500;
}

.reservation-sheet__detail dd {
    margin: 2px 0 0;
    color: var(--reservation-text);
    font-size: 16px;
    font-weight: 600;
}

.reservation-sheet__detail:last-child {
    grid-column: 1 / -1;
}

.reservation-sheet .form-label {
    color: var(--reservation-text);
    font-weight: 500;
}

.reservation-sheet .form-control {
    min-height: 48px;
    border-radius: 12px;
    border-color: var(--reservation-line);
    color: var(--reservation-text);
}

.reservation-sheet .form-control:focus {
    border-color: var(--reservation-action);
    box-shadow: 0 0 0 3px rgb(156 11 223 / 0.15);
}

.reservation-sheet textarea.form-control {
    height: auto;
    min-height: 96px;
    padding: 12px 14px;
    resize: vertical;
}

.reservation-sheet__or {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 8px 0 20px;
    color: var(--reservation-text-muted);
    font-size: 14px;
}

.reservation-sheet__or::before,
.reservation-sheet__or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--reservation-line);
}

.reservation-sheet__trainees {
    margin-top: 8px;
}

.reservation-sheet__total {
    margin: 8px 0 0;
    color: var(--reservation-text);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    text-align: right;
}

.reservation-sheet__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 20px;
}

.reservation-sheet__actions--login {
    justify-content: center;
}

.reservation-sheet__actions .reservation-confirmed__button:disabled,
.reservation-sheet__actions .reservation-confirmed__button[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
}

.reservation-sheet__actions .reservation-confirmed__button--primary:disabled:hover {
    background: var(--reservation-action);
    border-color: var(--reservation-action);
    color: #ffffff;
}

@media (max-width: 767px) {
    .reservation-sheet {
        align-items: flex-start;
        padding: 16px 16px 24px;
    }

    .reservation-sheet__header {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 18px;
    }

    .reservation-sheet__eyebrow {
        font-size: 12px;
        letter-spacing: 0.2em;
    }

    .reservation-sheet__card {
        padding: 20px 16px;
        border-radius: 18px;
    }

    .reservation-sheet__details {
        grid-template-columns: 1fr;
    }

    .reservation-sheet__actions .reservation-confirmed__button {
        width: 100%;
    }
}

#reservationModal #reservationModalContent:has(.reservation-sheet) {
    padding: 0;
    overflow: auto;
    height: 100%;
    background: #ffffff;
}

.reservation-sheet__pay-slot {
    margin: 0 0 16px;
}

.reservation-sheet__pay {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.reservation-sheet__pay-legend {
    float: left;
    width: 100%;
    margin: 0 0 8px;
    padding: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #3d1848;
}

.reservation-sheet__pay-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    clear: both;
}

.reservation-sheet__pay-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 12px 16px;
    border: 2px solid #e7d5ef;
    border-radius: 16px;
    background: #ffffff;
    cursor: pointer;
    min-height: 44px;
}

.reservation-sheet__pay-option input {
    margin-top: 4px;
    accent-color: #9c0bdf;
}

.reservation-sheet__pay-option:has(input:checked) {
    border-color: #9c0bdf;
    background: #f6ecfc;
}

.reservation-sheet__pay-option:has(input:focus-visible) {
    outline: 3px solid #9c0bdf;
    outline-offset: 2px;
}

.reservation-sheet__pay-option-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reservation-sheet__pay-option-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    color: #3d1848;
}

.reservation-sheet__pay-option-hint,
.reservation-sheet__pay-note,
.reservation-sheet__pay-panel,
.reservation-sheet__pay-error {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.45;
    color: #5c3d68;
}

.reservation-sheet__pay-option-hint {
    margin: 0;
}

.reservation-sheet__pay-note[hidden] {
    display: none;
}

.reservation-sheet__pay-panel {
    padding: 16px;
    border-radius: 16px;
    background: #f6ecfc;
}

.reservation-sheet__pay-error {
    color: #9b1c1c;
}

.reservation-sheet__pay-where[hidden] {
    display: none;
}

@media (min-width: 480px) {
    .reservation-sheet__pay-options {
        flex-direction: row;
    }

    .reservation-sheet__pay-option {
        flex: 1;
    }
}

@media (max-width: 390px) {
    .reservation-sheet__pay-options {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reservation-sheet__pay-option {
        transition: none;
    }
}

@media (hover: hover) and (pointer: fine) {
    .reservation-sheet__pay-option:hover {
        background: #fbf7fd;
    }
}

/* Reschedule link: the new dates reuse the payment-method cards in a grid.
   The theme hides radio inputs, so the border marks the chosen date. */
.reschedule-page .reservation-sheet__details {
    margin-bottom: 20px;
}

.reschedule-page .reservation-sheet__pay {
    margin-top: 24px;
}

.reschedule-page .reservation-sheet__pay-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
}

.reschedule-page .reservation-sheet__pay-option {
    flex: none;
    min-width: 0;
}

.reschedule-page .reservation-sheet__pay-option-copy {
    gap: 2px;
}

.reschedule-page .reservation-sheet__pay-option-time {
    font-size: 15px;
    font-weight: 600;
    color: #9c0bdf;
}

@media (max-width: 390px) {
    .reschedule-page .reservation-sheet__pay-options {
        grid-template-columns: 1fr;
    }
}
