/* Student Portal 3.2.5 — definitive schedule UI. */
:root {
    --sp325-black: #191918;
    --sp325-green: #123b37;
    --sp325-cream: #fff6e7;
    --sp325-yellow: #f1da89;
    --sp325-mint: #b8dcd8;
}

.student-calendar .student-calendar-nav {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

.student-calendar .student-calendar-nav > a,
.student-calendar .sp-calendar-date-form > button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 46px !important;
    padding: 0 18px !important;
    border: 1.5px solid var(--sp325-black) !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: var(--sp325-black) !important;
    box-shadow: none !important;
    font: inherit !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

.student-calendar .student-calendar-nav > a:hover,
.student-calendar .student-calendar-nav > a:focus-visible,
.student-calendar .sp-calendar-date-form > button:hover,
.student-calendar .sp-calendar-date-form > button:focus-visible {
    border-color: var(--sp325-black) !important;
    background: #fff !important;
    color: var(--sp325-black) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 7px 18px rgba(18, 59, 55, .12) !important;
}

.student-calendar .sp-calendar-date-form {
    display: grid !important;
    grid-template-columns: minmax(190px, 1fr) !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 5px !important;
    border: 1.5px solid var(--sp325-black) !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 7px 20px rgba(18, 59, 55, .07) !important;
}

/* The date is submitted with Enter; no redundant visible action button. */
.student-calendar .sp-calendar-date-form > .sp-calendar-enter-submit {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

.student-calendar .sp-calendar-jump {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    padding: 0 12px !important;
    border: 0 !important;
    border-radius: 13px !important;
    background: var(--sp325-cream) !important;
    box-shadow: none !important;
}

.student-calendar .sp-calendar-date-icon {
    display: grid !important;
    place-items: center !important;
    width: 29px !important;
    height: 29px !important;
    flex: 0 0 29px !important;
    border-radius: 9px !important;
    background: var(--sp325-yellow) !important;
    color: var(--sp325-black) !important;
}

.student-calendar .sp-calendar-date-icon svg,
.student-calendar .sp-calendar-timezone-icon svg {
    width: 17px !important;
    height: 17px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.8 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

.student-calendar .sp-calendar-jump input[type="date"] {
    width: 100% !important;
    min-width: 138px !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    color: var(--sp325-black) !important;
    font: inherit !important;
    font-size: 14px !important;
    font-weight: 650 !important;
    cursor: pointer !important;
}

.student-calendar .student-slot-lesson,
.student-calendar .student-slot-lesson *,
.student-calendar [class*="student-slot-"][class*="lesson"],
.student-calendar [class*="student-slot-"][class*="lesson"] * {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
}

.student-calendar .student-slot-lesson {
    font-size: 13px !important;
    line-height: 1.13 !important;
    font-weight: 700 !important;
    overflow: hidden !important;
    overflow-wrap: anywhere !important;
}

.student-calendar .student-slot-lesson .student-slot-time {
    font-size: 10.5px !important;
    line-height: 1.1 !important;
}

.student-calendar .sp-calendar-timezone {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 0 20px !important;
    padding: 7px 8px !important;
    border: 1.5px solid var(--sp325-black) !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: var(--sp325-black) !important;
    font-size: 14px !important;
}

.student-calendar .sp-calendar-timezone > span,
.student-calendar .sp-calendar-timezone > strong {
    color: var(--sp325-black) !important;
}

.student-calendar .sp-calendar-timezone-icon {
    display: grid !important;
    place-items: center !important;
    width: 32px !important;
    height: 32px !important;
    flex: 0 0 32px !important;
    border-radius: 50% !important;
    background: var(--sp325-mint) !important;
    color: var(--sp325-green) !important;
}

.student-calendar .sp-calendar-timezone > a {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 34px !important;
    padding: 0 13px !important;
    border: 1px solid var(--sp325-black) !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: var(--sp325-black) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

:is(#sp-block-modal,#sp-open-slot-modal,#sp-delete-modal,#sp-delete-open-slot-modal,#sp-lesson-actions-modal,#sp-student-lesson-modal,#sp-student-reschedule-modal,#sp-pending-reschedule-modal,#sp-freeze-workoff-modal,#sp-lesson-modal,#sp-subscription-conflicts-modal,#sp-trial-booking-notice-modal) button[onclick^="spClose"],
:is(#sp-block-modal,#sp-open-slot-modal,#sp-delete-modal,#sp-delete-open-slot-modal,#sp-lesson-actions-modal,#sp-student-lesson-modal,#sp-student-reschedule-modal,#sp-pending-reschedule-modal,#sp-freeze-workoff-modal,#sp-lesson-modal,#sp-subscription-conflicts-modal,#sp-trial-booking-notice-modal) > div > button[style*="position:absolute"] {
    position: absolute !important;
    z-index: 20 !important;
    top: 14px !important;
    right: 14px !important;
    display: grid !important;
    place-items: center !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1.5px solid var(--sp325-black) !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: transparent !important;
    box-shadow: none !important;
    font-family: Arial, sans-serif !important;
    font-size: 25px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    text-align: center !important;
    animation: none !important;
    transition: none !important;
}

:is(#sp-block-modal,#sp-open-slot-modal,#sp-delete-modal,#sp-delete-open-slot-modal,#sp-lesson-actions-modal,#sp-student-lesson-modal,#sp-student-reschedule-modal,#sp-pending-reschedule-modal,#sp-freeze-workoff-modal,#sp-lesson-modal,#sp-subscription-conflicts-modal,#sp-trial-booking-notice-modal) button[onclick^="spClose"]::before,
:is(#sp-block-modal,#sp-open-slot-modal,#sp-delete-modal,#sp-delete-open-slot-modal,#sp-lesson-actions-modal,#sp-student-lesson-modal,#sp-student-reschedule-modal,#sp-pending-reschedule-modal,#sp-freeze-workoff-modal,#sp-lesson-modal,#sp-subscription-conflicts-modal,#sp-trial-booking-notice-modal) > div > button[style*="position:absolute"]::before {
    content: "×" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    color: var(--sp325-black) !important;
    font-family: Arial, sans-serif !important;
    font-size: 25px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    transform: translate(-50%, -52%) !important;
}

:is(#sp-block-modal,#sp-open-slot-modal,#sp-delete-modal,#sp-delete-open-slot-modal,#sp-lesson-actions-modal,#sp-student-lesson-modal,#sp-student-reschedule-modal,#sp-pending-reschedule-modal,#sp-freeze-workoff-modal,#sp-lesson-modal,#sp-subscription-conflicts-modal,#sp-trial-booking-notice-modal) button[onclick^="spClose"]:is(:hover,:focus,:active) {
    border-color: var(--sp325-black) !important;
    background: #fff !important;
    color: transparent !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
}

/* All copy inside schedule dialogs stays black, regardless of theme/Elementor rules. */
:is(#sp-block-modal,#sp-open-slot-modal,#sp-delete-modal,#sp-delete-open-slot-modal,#sp-lesson-actions-modal,#sp-student-lesson-modal,#sp-student-reschedule-modal,#sp-pending-reschedule-modal,#sp-freeze-workoff-modal,#sp-lesson-modal,#sp-subscription-conflicts-modal,#sp-trial-booking-notice-modal) > div,
:is(#sp-block-modal,#sp-open-slot-modal,#sp-delete-modal,#sp-delete-open-slot-modal,#sp-lesson-actions-modal,#sp-student-lesson-modal,#sp-student-reschedule-modal,#sp-pending-reschedule-modal,#sp-freeze-workoff-modal,#sp-lesson-modal,#sp-subscription-conflicts-modal,#sp-trial-booking-notice-modal) :is(h1,h2,h3,h4,h5,p,label,span,strong,small,li,a) {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
}

/* Branded dialog actions; the white outlined treatment is reserved for ×. */
:is(#sp-block-modal,#sp-open-slot-modal,#sp-delete-modal,#sp-delete-open-slot-modal,#sp-lesson-actions-modal,#sp-student-lesson-modal,#sp-student-reschedule-modal,#sp-pending-reschedule-modal,#sp-freeze-workoff-modal,#sp-lesson-modal,#sp-subscription-conflicts-modal,#sp-trial-booking-notice-modal) button:not([onclick^="spClose"]):not([style*="position:absolute"]),
:is(#sp-block-modal,#sp-open-slot-modal,#sp-delete-modal,#sp-delete-open-slot-modal,#sp-lesson-actions-modal,#sp-student-lesson-modal,#sp-student-reschedule-modal,#sp-pending-reschedule-modal,#sp-freeze-workoff-modal,#sp-lesson-modal,#sp-subscription-conflicts-modal,#sp-trial-booking-notice-modal) a[id] {
    border: 1.5px solid var(--sp325-green) !important;
    border-radius: 999px !important;
    background: var(--sp325-green) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    box-shadow: none !important;
    font-weight: 700 !important;
}

/* Related student actions sit together on one line. */
#sp-student-lesson-content {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    align-items: stretch !important;
}

#sp-student-lesson-content > * {
    grid-column: 1 / -1;
}

#sp-student-lesson-content > #sp-student-reschedule-btn {
    grid-column: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 46px !important;
    margin: 0 !important;
}

#sp-student-lesson-content > #sp-student-reschedule-btn + form {
    grid-column: 2 !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
}

#sp-student-lesson-content > #sp-student-reschedule-btn + form > button {
    width: 100% !important;
    min-height: 46px !important;
}

#sp-lesson-actions-modal form:has(input[name="status"][value="cancelled"]) button {
    border-color: var(--sp325-green) !important;
    background: var(--sp325-green) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

#sp-trial-booking-notice-modal > div > div:has(> button + button) > button:last-child,
#sp-subscription-conflicts-modal > div > div:has(> button + button) > button:last-child {
    border-color: var(--sp325-black) !important;
    background: #fff !important;
    color: var(--sp325-black) !important;
    -webkit-text-fill-color: var(--sp325-black) !important;
}

#sp-trial-booking-notice-modal > div > div:has(> button + button),
#sp-subscription-conflicts-modal > div > div:has(> button + button) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
}

#sp-lesson-modal h3,
#sp-lesson-modal label,
#sp-lesson-modal form,
#sp-lesson-modal form * {
    color: var(--sp325-black) !important;
}

#sp-lesson-modal h3 {
    padding-right: 54px !important;
    font-size: 25px !important;
    font-weight: 650 !important;
}

#sp-lesson-rules-consent {
    border-color: #b9b39f !important;
    background: var(--sp325-cream) !important;
    color: #242421 !important;
}

#sp-lesson-rules-consent span,
#sp-lesson-rules-consent a {
    color: #242421 !important;
}

#sp-lesson-rules-consent a {
    font-weight: 800 !important;
    text-decoration: underline !important;
    text-decoration-thickness: 1.5px !important;
    text-underline-offset: 2px !important;
}

@media (max-width: 760px) {
    .student-calendar .student-calendar-nav > a {
        flex: 1 1 calc(50% - 5px) !important;
    }

    .student-calendar .sp-calendar-date-form {
        order: 4 !important;
        width: 100% !important;
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .student-calendar .sp-calendar-jump input[type="date"] {
        min-width: 0 !important;
    }

    .student-calendar .sp-calendar-timezone {
        width: 100% !important;
        flex-wrap: wrap !important;
        border-radius: 18px !important;
    }

    .student-calendar .student-slot-lesson {
        font-size: 11.5px !important;
    }

    #sp-student-lesson-content {
        gap: 8px !important;
    }

    #sp-student-lesson-content > #sp-student-reschedule-btn,
    #sp-student-lesson-content > #sp-student-reschedule-btn + form > button {
        min-height: 44px !important;
        padding-inline: 10px !important;
        font-size: 12px !important;
    }
}
