/* ==========================
   SCHEDULE PAGE (schedule.css)
   Matches aisite.css tokens
========================== */

/* ==========================
   SECTION WRAP
========================== */
.sched-sec {
    position: relative;
}

.sched-sec .mw {
    position: relative;
}

/* ==========================
   CARD WRAPPER
========================== */
.schedule-item {
    max-width: 980px;
    margin: 34px auto 0;
    width: 100%;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.82);
    border-radius: 22px;
    box-shadow: 0 18px 55px rgba(2, 6, 23, 0.08);
    overflow: hidden;
}

/* ==========================
   STEP 1 FORM (PERSONAL + SUBJECTS)
========================== */
#schedule-form {
    width: 100%;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 0;
}

/* panes */
#personal-information,
#subjects {
    padding: 28px;
}

/* right pane divider + tint */
#subjects {
    border-left: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, rgba(238, 242, 251, 0.7), rgba(255, 255, 255, 0.75));
    text-align: left;
}

/* headings */
#personal-information h3,
#subjects h3 {
    font-family: "Fraunces", serif;
    font-size: 1.2rem;
    letter-spacing: -0.2px;
    margin-bottom: 18px;
    color: var(--ink);
}

/* labels */
#personal-information label {
    display: block;
    margin: 12px 0 6px;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .4px;
    color: rgba(7, 17, 31, 0.78);
    text-transform: uppercase;
}

/* inputs */
#personal-information input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    background: rgba(255, 255, 255, 0.9);
    font-size: .95rem;
    outline: none;
    transition: border .2s, box-shadow .2s, transform .2s;
}

#personal-information input::placeholder {
    color: rgba(100, 116, 139, 0.75);
}

#personal-information input:focus {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.25);
}

#personal-information input:invalid:focus {
    border-color: rgba(239, 68, 68, 0.55);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18);
}

/* ==========================
   SUBJECT PILL CHECKBOXES
========================== */
#subjects .subject {
    display: inline-flex;
    margin: 10px 10px 0 0;
}

/* hide checkbox */
#subjects input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

/* pill */
#subjects label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    background: rgba(255, 255, 255, 0.75);
    font-size: .92rem;
    font-weight: 700;
    color: rgba(7, 17, 31, 0.82);
    transition: transform .2s, background .2s, border .2s, box-shadow .2s;
    cursor: pointer;
    user-select: none;
    min-height: 46px;
}

#subjects label::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(100, 116, 139, 0.35);
    box-shadow: inset 0 0 0 2px rgba(100, 116, 139, 0.25);
}

#subjects label:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.30);
    box-shadow: 0 10px 26px rgba(37, 99, 235, 0.08);
}

#subjects input[type="checkbox"]:checked+label {
    background: rgba(37, 99, 235, 0.10);
    border-color: rgba(37, 99, 235, 0.40);
    color: var(--royal);
}

#subjects input[type="checkbox"]:checked+label::before {
    background: var(--blue);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.25);
}

#subjects input[type="checkbox"]:focus-visible+label {
    outline: 3px solid rgba(96, 165, 250, .65);
    outline-offset: 3px;
}

/* ==========================
   TEXTAREA (STEP 1 NOTES)
========================== */
#text-area {
    margin-top: 16px;
}

#text-area textarea {
    width: 100%;
    min-height: 110px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .9);
    font-family: 'DM Sans', sans-serif;
    font-size: .9rem;
    line-height: 1.55;
    resize: vertical;
    transition: border .2s, box-shadow .2s;
}

#text-area textarea::placeholder {
    color: var(--fog);
}

#text-area textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.form-notice {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);

    display: block;
    opacity: 0;

    padding: 14px 20px;
    border-radius: 12px;

    background: rgba(245, 158, 11, 0.95);
    color: white;

    font-weight: 600;
    font-size: .95rem;

    box-shadow: 0 10px 25px rgba(0, 0, 0, .15);

    transition: opacity .25s ease, transform .25s ease;

    z-index: 9999;
    pointer-events: none;
}

.form-notice.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@keyframes noticeSlide {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================
   STEP 2: CALENDAR + TIME SLOTS
========================== */
#calendar {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: stretch;
}

#calendar .calendar-item {
    background: rgba(255, 255, 255, .85);
    padding: 22px;
    box-shadow: 0 10px 34px rgba(2, 6, 23, .06);
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

#calendar .calendar-item:last-child {
    border-left: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, rgba(238, 242, 251, 0.7), rgba(255, 255, 255, 0.75));
}

/* calendar header */
#calendar-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
}

#monthYear {
    font-family: 'Fraunces', serif;
    font-size: 1.35rem;
    letter-spacing: -.2px;
    color: var(--ink);
    margin: 0;
}

/* month nav buttons */
#prevCalBtn,
#nextCalBtn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, .12);
    background: rgba(238, 242, 251, .85);
    color: var(--navy);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s, background .2s, box-shadow .2s, border .2s;
}

#prevCalBtn:hover,
#nextCalBtn:hover {
    background: rgba(96, 165, 250, .12);
    border-color: rgba(37, 99, 235, .25);
    box-shadow: 0 10px 24px rgba(37, 99, 235, .10);
    transform: translateY(-1px);
}

#prevCalBtn:active,
#nextCalBtn:active {
    transform: translateY(0);
}

/* weekdays row */
.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin: 10px 0 10px;
    text-align: center;
}

.weekdays>div {
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .9px;
    text-transform: uppercase;
    color: rgba(7, 17, 31, .55);
    padding: 8px 0;
}

/* days grid */
.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

/* day cell */
.days div {
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    font-weight: 700;
    color: rgba(7, 17, 31, .78);
    border: 1px solid rgba(15, 23, 42, .08);
    background: rgba(255, 255, 255, .7);
    cursor: pointer;
    transition: transform .18s, background .18s, border .18s, box-shadow .18s;
}

.days div:hover {
    transform: translateY(-1px);
    background: rgba(96, 165, 250, .10);
    border-color: rgba(37, 99, 235, .18);
    box-shadow: 0 10px 22px rgba(37, 99, 235, .08);
}

.days div.inactive {
    opacity: .38;
    cursor: not-allowed;
    background: rgba(238, 242, 251, .55);
    box-shadow: none;
    transform: none;
}

.days div.inactive:hover {
    background: rgba(238, 242, 251, .55);
    border-color: rgba(15, 23, 42, .08);
}

.days div.selected {
    background: linear-gradient(135deg, rgba(245, 158, 11, .95), rgba(251, 191, 36, .95));
    color: var(--ink);
    border-color: rgba(245, 158, 11, .45);
    box-shadow: 0 14px 28px rgba(245, 158, 11, .22);
}

/* time slots heading */
#calendar .calendar-item h2 {
    font-family: 'Fraunces', serif;
    font-size: 1.35rem;
    margin: 0 0 12px;
    color: var(--ink);
}

#time-slots-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    /* vertical center */
    justify-content: center;
    /* horizontal center */
    text-align: center;

    padding: 18px;
    border-radius: 14px;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    background: rgba(255, 255, 255, 0.55);

    font-weight: 700;
    font-size: .95rem;
    color: rgba(7, 17, 31, 0.62);
}

/* Start hidden */
#time-slots {
    display: none;
}

/* Show state (fade/slide in) */
#time-slots.show {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* horizontal center */
    align-content: center;
    /* vertical centering of rows */
    gap: 10px;

    flex: 1;
    overflow: auto;

    /* IMPORTANT: prevents top pills from being clipped on hover */
    padding: 10px 6px 6px;
    margin-top: 12px;

    /* animation */
    opacity: 0;
    transform: translateY(6px);
    animation: slotIn .22s ease forwards;
}

/* If you have many time slots, keep them centered vertically only when few.
   When it overflows, the scroll takes over naturally. */
@keyframes slotIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#time-slots::-webkit-scrollbar {
    width: 6px;
}

#time-slots::-webkit-scrollbar-thumb {
    background: rgba(26, 58, 143, .35);
    border-radius: 10px;
}

/* time slot pill */
.time-btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.18);
    background: rgba(255, 255, 255, .85);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}

.time-btn:hover {
    background: rgba(37, 99, 235, .08);
    border-color: rgba(37, 99, 235, .35);
    transform: translateY(-1px);
}

.time-btn.selected {
    background: linear-gradient(135deg, var(--sun), var(--gold));
    border-color: rgba(245, 158, 11, .45);
    color: var(--ink);
    box-shadow: 0 6px 18px rgba(245, 158, 11, .25);
}

/* ==========================
   UNAVAILABLE TIME SLOTS
========================== */

.time-btn.inactive,
.time-btn:disabled {
    opacity: .35;
    cursor: not-allowed;

    background: rgba(238, 242, 251, .7);
    border: 1px dashed rgba(15, 23, 42, .18);
    color: rgba(100, 116, 139, .8);

    box-shadow: none;
    transform: none;
    pointer-events: none;
    /* fully unclickable */
}

/* prevent hover animation */
.time-btn.inactive:hover,
.time-btn:disabled:hover {
    background: rgba(238, 242, 251, .7);
    border-color: rgba(15, 23, 42, .18);
    transform: none;
    box-shadow: none;
}

/* ==========================
   DATE + TIME PREVIEW
========================== */

#date-time {
    margin-top: 18px;
    margin-bottom: 30px;
    padding: 14px 16px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;

    border-radius: 14px;

    background: linear-gradient(180deg,
            rgba(238, 242, 251, .85),
            rgba(255, 255, 255, .9));

    font-family: 'DM Sans', sans-serif;
}

/* date text */
#date {
    font-size: .95rem;
    font-weight: 700;
    color: var(--ink);
}

/* time pill */
#time {
    font-size: .85rem;
    font-weight: 700;

    padding: 6px 12px;
    border-radius: 999px;
    color: var(--royal);
}

/* ==========================
   STEP 3: SUMMARY
========================== */
/* ==========================
   SUMMARY CARD (STEP 3)
========================== */

#step3 {
    max-width: 720px;
    margin: 0 auto;
}

#step3 h2 {
    font-family: 'Fraunces', serif;
    font-size: 1.6rem;
    margin-bottom: 18px;
    text-align: center;
    color: var(--ink);
}

/* container */
#summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

/* each row */
.summary-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: center;

    padding: 14px 16px;

    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, .08);

    background: rgba(255, 255, 255, .85);

    transition: background .2s, border .2s;
}

/* subtle hover */
.summary-row:hover {
    background: rgba(238, 242, 251, .6);
    border-color: rgba(37, 99, 235, .18);
}

/* label */
.summary-label {
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .7px;
    text-transform: uppercase;
    color: rgba(7, 17, 31, .55);
}

/* value */
.summary-value {
    font-size: .95rem;
    font-weight: 700;
    color: var(--ink);
}

/* highlight date + time slightly */
#summary-date,
#summary-time {
    font-weight: 800;
    color: var(--royal);
}

/* notes section */
.summary-row.summary-notes {
    grid-template-columns: 110px 1fr;
    align-items: start;
}

/* readonly textarea */
#summary-message {
    width: 100%;
    padding: 12px 14px;

    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, .08);

    background: rgba(238, 242, 251, .6);

    font-family: 'DM Sans', sans-serif;
    font-size: .9rem;
    line-height: 1.5;

    resize: none;
}

/* submit section */
.summary-submit {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
}

/* submit button */
#submit-booking {
    min-width: 150px;
    padding: 14px 22px;

    border-radius: 12px;
    border: none;

    font-size: .95rem;
    font-weight: 800;

    background: linear-gradient(135deg, var(--sun), var(--gold));
    color: var(--ink);

    box-shadow: 0 10px 24px rgba(245, 158, 11, .25);

    cursor: pointer;
    transition: transform .2s, box-shadow .2s, opacity .2s;
}

#submit-booking:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(245, 158, 11, .35);
}

/* disabled state */
#submit-booking:disabled {
    opacity: .4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==========================
   FORM NAV BUTTONS
========================== */
.form-nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 30px;
}

#prevBtn,
#nextBtn {
    min-width: 120px;
    padding: 14px 26px;
    border-radius: 12px;
    font-size: .9rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all .25s ease;
}

#prevBtn {
    background: var(--navy);
    color: white;
    box-shadow: 0 4px 18px rgba(11, 29, 56, .28);
}

#prevBtn:hover {
    background: #0d2248;
    transform: translateY(-2px);
}

#nextBtn {
    background: linear-gradient(135deg, var(--sun), var(--gold));
    color: var(--ink);
    box-shadow: 0 6px 20px rgba(245, 158, 11, .35);
}

#nextBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(245, 158, 11, .45);
}

/* ==========================
   WIZARD VISIBILITY (DEFAULT)
========================== */
#step2 {
    display: none;
}

/* ==========================
   MODAL
========================== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 9999;
}

.modal.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    width: 100%;
    max-width: 420px;
    padding: 40px 34px 34px;
    border-radius: 18px;
    background: white;
    box-shadow: 0 30px 60px rgba(0, 0, 0, .25);
    text-align: center;
    position: relative;
    animation: modalPop .25s ease;
}

@keyframes modalPop {
    from {
        transform: translateY(12px) scale(.96);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: none;
    background: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: rgba(0, 0, 0, .55);
    transition: .2s;
}

.modal-close:hover {
    color: #000;
    transform: scale(1.1);
}

.modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 8px 24px rgba(34, 197, 94, .35);
}

#modalTitle {
    font-family: 'Fraunces', serif;
    font-size: 1.35rem;
    margin-bottom: 10px;
    color: #111827;
}

#modalDetails {
    font-size: .95rem;
    line-height: 1.55;
    color: #4b5563;
    margin-bottom: 22px;
}

.modal-btn {
    padding: 12px 22px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    background: linear-gradient(135deg, var(--sun), var(--gold));
    color: var(--ink);
    box-shadow: 0 8px 22px rgba(245, 158, 11, .35);
    transition: .25s;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(245, 158, 11, .45);
}

/* ==========================
   RESPONSIVE
========================== */
@media (max-width: 900px) {
    #schedule-form {
        grid-template-columns: 1fr;
    }

    #subjects {
        border-left: none;
        border-top: 1px solid rgba(15, 23, 42, 0.08);
    }

    #calendar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .summary-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .summary-row.summary-notes {
        grid-template-columns: 1fr;
    }

    .summary-submit {
        justify-content: stretch;
    }

    #submit-booking {
        width: 100%;
    }
}

@media (max-width: 480px) {

    #personal-information,
    #subjects {
        padding: 22px 18px;
    }

    #subjects .subject {
        margin: 10px 8px 0 0;
    }

    #subjects label {
        width: 100%;
        justify-content: flex-start;
    }
}