.booking-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 1rem;
    box-sizing: border-box;

    background: rgba(23, 21, 21, 0.7);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.booking-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.booking-modal {
    position: relative;

    display: flex;
    flex-direction: column;

    width: 100%;
    max-width: 650px;
    max-height: 90vh;

    background: #FFFFFF;
    border: 2px solid #5B2B95;
    border-radius: 18px;

    overflow: hidden;
    box-sizing: border-box;
}

/*MODAL HEADER  PROGRESS INDICATOR*/

.booking-modal-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;

    padding: 1.5rem 1.75rem 1.25rem;

    border-bottom: 1px solid #E5DCEC;
}

.booking-modal-heading {
    flex: 1;
}

.booking-modal-heading h2 {
    margin: 0 0 0.5rem;

    color: #5B2B95;
    font-size: 1.5rem;
    line-height: 1.3;
}

.booking-modal-heading p {
    margin: 0;

    color: #5B2B95;
    font-size: 0.95rem;
    line-height: 1.5;
}

.booking-modal-close {
    flex-shrink: 0;

    padding: 0;
    border: none;
    background: none;

    color: #5B2B95;
    font-family: inherit;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;

    transition: color 0.25s ease;
}

.booking-modal-close:hover {
    color: #8A5BC2;
}

.booking-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.35rem;

    padding: 1.25rem 1.75rem;

    border-bottom: 1px solid #E5DCEC;
}

.booking-progress-step {
    flex: 1;
    height: 5px;

    background: #E5DCEC;
    border-radius: 999px;

    transition: background-color 0.25s ease;
}

.booking-progress-step.active,
.booking-progress-step.completed {
    background: #5B2B95;
}

/*MODAL SCROLLABLE AREA*/

.booking-modal-content {
    flex: 1;
    min-height: 0;

    overflow-y: auto;

    padding: 1.75rem;
    box-sizing: border-box;
}

.booking-step-content {
    width: 100%;
}

/*MODAL ERROR STYLING*/

.booking-error {
    margin: 0;
    padding: 0 1.75rem 1rem;

    color: #B42318;
    font-size: 0.9rem;
    line-height: 1.5;
}

.booking-error[hidden] {
    display: none;
}

/*HELPERS*/

.booking-back[hidden],
.booking-next[hidden],
.booking-submit[hidden] {
    display: none;
}

/* MODAL FOOTER */

.booking-modal-footer {
    flex-shrink: 0;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;

    padding: 1.25rem 1.75rem;

    border-top: 2px solid #5B2B95;
    background: #FFFFFF;
}

/* NAVIGATION BUTTONS */

.booking-back,
.booking-next,
.booking-submit {
    display: inline-flex;
    justify-content: center;
    align-items: center;

    min-width: 130px;
    padding: 0.85rem 1.8rem;

    border: 2px solid #5B2B95;
    border-radius: 999px;

    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;

    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        opacity 0.25s ease,
        transform 0.25s ease;
}

/* BACK BUTTON */

.booking-back {
    background: #FFFFFF;
    color: #5B2B95;
}

.booking-back:hover {
    background: #F3EDF1;
    color: #8A5BC2;
    border-color: #8A5BC2;
}

/* NEXT AND SUBMIT BUTTONS */

.booking-next,
.booking-submit {
    margin-left: auto;
    background: #5B2B95;
    color: #FFFFFF;
}

.booking-next:hover,
.booking-submit:hover {
    background: #8A5BC2;
    border-color: #8A5BC2;
    transform: translateY(-2px);
}

/* DISABLED BUTTONS */

.booking-next:disabled,
.booking-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

/*MODAL SUBJECT SELECTION*/


.booking-subject-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.booking-subject-option {
    padding: 1rem;
    border: 2px solid #5B2B95;
    border-radius: 12px;
    background: #FFFFFF;
    color: #5B2B95;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}

.booking-subject-option:hover {
    /*background: #F3EDF1;*/
    border-color:#FFC000;
}

.booking-subject-option.selected {
    background: #5B2B95;
    color: #FFFFFF;
    border-color: #5B2B95;
}

/*TEACHER SELECTION STYLE - BOOKING MODAL*/


/* TEACHER SELECTION LIST */

.booking-teachers-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.5rem;
}


/* TEACHER CARD */

.booking-teacher-card {
    padding: 1.25rem;
    border: 2px solid #D8C9E8;
    border-radius: 14px;
    background: #FFFFFF;
    color: #171515;
    transition: border-color 0.25s ease;
}

.booking-teacher-card.selected {
    border-color: #5B2B95;
    background: #FBF9FD;
}


/* CENTERED PORTRAIT */

.booking-teacher-image {
    display: block;
    width: 135px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: center;
    border: 2px solid #5B2B95;
    border-radius: 14px;
    margin: 0 auto 18px;
}


/* TEACHER NAME */

.booking-teacher-name {
    margin: 0 0 16px;
    color: #5B2B95;
    font-size: 1.3rem;
    line-height: 1.3;
    text-align: center;
}


/* TEACHER INFORMATION */

.booking-teacher-info {
    margin: 0 0 8px;
    color: #5B2B95;
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 600;
}

.booking-teacher-info:last-of-type {
    margin-bottom: 16px;
}


/* TEACHER DESCRIPTION */

.booking-teacher-description {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.7;
    font-weight: 500;
    color: #171515;
}


/* REVIEWS ACCORDION */

.booking-teacher-reviews {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid #D8C9E8;
}

.booking-reviews-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    color: #5B2B95;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.booking-reviews-toggle::after {
    content: "+";
    font-size: 1.4rem;
    line-height: 1;
}

.booking-reviews-toggle.expanded::after {
    content: "−";
}

.booking-reviews-content {
    padding-top: 14px;
}

.booking-reviews-content[hidden] {
    display: none;
}

.booking-reviews-content > p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.booking-review-item {
    padding: 12px 0;
    border-bottom: 1px solid #EAE2F1;
}

.booking-review-item:last-child {
    border-bottom: none;
}

.booking-review-author {
    margin: 0 0 6px;
    color: #5B2B95;
    font-weight: 700;
}

.booking-review-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
}


/* SELECT TEACHER BUTTON */

.booking-teacher-select {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 0.75rem 1rem;
    border: 2px solid #5B2B95;
    border-radius: 999px;
    background: #FFFFFF;
    color: #5B2B95;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}

.booking-teacher-select:hover {
    border-color: #FFC000;
}

.booking-teacher-card.selected .booking-teacher-select {
    background: #5B2B95;
    color: #FFFFFF;
    border-color: #5B2B95;
}

.teacher-unavailable-highlight {
    color: #5B2B95;
    font-weight: 700;
}

/*CALENDAR LAYOUT STYLE*/


/* Date selection disclaimer */

.booking-date-disclaimer {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: #F3EDF8;
    border-left: 4px solid #5B2B95;
    border-radius: 8px;
}

.booking-date-disclaimer p {
    margin: 0;
    color: #4A3B55;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Calendar container */

.booking-calendar {
    max-width: 420px;
    margin: 0 auto;
}

.booking-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.booking-calendar-month {
    margin: 0;
    color: #5B2B95;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: capitalize;
}

.booking-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #E2D9EA;
    border-radius: 50%;
    background: #FFFFFF;
    color: #5B2B95;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.booking-calendar-nav:hover:not(:disabled) {
    background: #F3EDF8;
    border-color: #5B2B95;
}

.booking-calendar-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.booking-calendar-nav[hidden] {
    display: none;
}

/* Weekday labels and calendar grid */

.booking-calendar-weekdays,
.booking-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.5rem;
}

.booking-calendar-weekdays {
    margin-bottom: 0.5rem;
}

.booking-calendar-weekdays span {
    padding: 0.5rem 0;
    color: #766B7F;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
}

.booking-calendar-day {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    min-width: 0;
    border: 1px solid transparent;
    border-radius: 50%;
    background: #FFFFFF;
    color: #35283E;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.booking-calendar-day:hover:not(:disabled) {
    border-color: #5B2B95;
    background: #F3EDF8;
}

.booking-calendar-day.selected {
    border-color: #5B2B95;
    background: #5B2B95;
    color: #FFFFFF;
    font-weight: 700;
}

.booking-calendar-day:disabled {
    background: transparent;
    color: #C9C3CD;
    cursor: not-allowed;
}

/* Fully unavailable calendar dates */

.booking-calendar-day.fully-unavailable {
    border-color: #E57373;
    background: #D9534F;
    color: #FFFFFF;
    font-weight: 700;
    cursor: not-allowed;
    opacity: 1;
}

.booking-calendar-empty {
    aspect-ratio: 1;
}

/* Selected date */

.booking-selected-date {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    background: #F8F5FA;
    color: #5C5063;
    font-size: 0.9rem;
    text-align: center;
    text-transform: capitalize;
}

.booking-selected-date strong {
    color: #5B2B95;
}

/*HOUR LEVEL SELECTION AT THE SCHEDULER MODAL*/


/* Time selection */

.booking-time-selection {
    margin-top: 1.5rem;
}

.booking-time-info {
    margin-bottom: 1.5rem;
    text-align: center;
}

.booking-time-info p {
    margin: 0 0 0.5rem;
    color: #5C5063;
    font-size: 0.9rem;
    line-height: 1.5;
}

.booking-time-date strong {
    color: #5B2B95;
    text-transform: capitalize;
}

.booking-time-duration {
    font-weight: 600;
}

/* Time slots grid */

.booking-time-slots {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    max-width: 600px;
    margin: 0 auto;
}

.booking-time-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-height: 58px;
    padding: 0.75rem 0.35rem;
    border: 2px solid #E2D9EA;
    border-radius: 10px;
    background: #FFFFFF;
    color: #5B2B95;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.booking-time-slot:hover {
    border-color: #FFC000;
}

.booking-time-slot.selected {
    border-color: #5B2B95;
    background: #5B2B95;
    color: #FFFFFF;
}

/*style for unavailable cells - SCHEDULER*/

/* Unavailable and occupied time slots */

.booking-time-slot.unavailable,
.booking-time-slot.occupied {
    border-color: #E57373;
    background: #D9534F;
    color: #FFFFFF;
    cursor: not-allowed;
    opacity: 1;
}

.booking-time-slot.unavailable:hover,
.booking-time-slot.occupied:hover {
    border-color: #E57373;
    background: #D9534F;
}

.booking-time-slot:disabled {
    cursor: not-allowed;
}

/* Availability messages */

.booking-time-loading,
.booking-time-error {
    margin: 1rem 0;
    text-align: center;
    font-size: 0.9rem;
}

.booking-time-loading {
    color: #5C5063;
}

.booking-time-error {
    color: #C62828;
}

/*style for unavailable cells - SCHEDULER*/

/* Unavailable and occupied time slots */

.booking-time-slot.unavailable,
.booking-time-slot.pending,
.booking-time-slot.confirmed {
    border-color: #D9534F;
    background: #D9534F;
    color: #FFFFFF;
    cursor: not-allowed;
    opacity: 1;
}

/* Prevent the normal hover effect on unavailable slots */

.booking-time-slot.unavailable:hover,
.booking-time-slot.pending:hover,
.booking-time-slot.confirmed:hover {
    border-color: #D9534F;
    background: #D9534F;
}

.booking-time-disclaimer {
    max-width: 600px;
    margin: 1.25rem auto 0;
    color: #766B7F;
    font-size: 0.8rem;
    line-height: 1.5;
    text-align: center;
}

/* Responsive layout */

@media (max-width: 600px) {
    .booking-time-slots {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 360px) {
    .booking-time-slot {
        font-size: 0.85rem;
    }
}


/* SCHEDULER FORM */

/* Prevent padding and borders from increasing element width */
.booking-customer-form,
.booking-customer-form * {
    box-sizing: border-box;
}

.booking-customer-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    max-width: 600px;
    min-width: 0;
    margin: 1.5rem auto 0;
}

.booking-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
}

.booking-form-field label {
    color: #35283E;
    font-size: 0.95rem;
    font-weight: 600;
}

.booking-form-field input,
.booking-form-field textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.85rem 1rem;
    border: 1px solid #D9D0E0;
    border-radius: 8px;
    background: #FFFFFF;
    color: #35283E;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.booking-form-field input:focus,
.booking-form-field textarea:focus {
    outline: none;
    border-color: #5B2B95;
}

.booking-form-field textarea {
    resize: vertical;
    min-height: 120px;
}

.required-star {
    color: #D62828;
}

/* Consent checkboxes */

.booking-form-consents {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    min-width: 0;
    margin-top: 0.25rem;
}

.booking-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    min-width: 0;
}

.booking-consent input {
    width: 17px;
    height: 17px;
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: #5B2B95;
    cursor: pointer;
}

.booking-consent label {
    min-width: 0;
    color: #5C5063;
    font-size: 0.85rem;
    line-height: 1.5;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.booking-consent a {
    color: #5B2B95;
    font-weight: 600;
    text-decoration: underline;
}

.booking-consent a:hover {
    color: #FFC000;
}

/* Mobile adjustments */

@media (max-width: 480px) {
    .booking-customer-form {
        gap: 1rem;
    }

    .booking-form-field input,
    .booking-form-field textarea {
        font-size: 16px;
    }
}


/* BOOKING SUMMARY */

.booking-summary {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.booking-summary-section {
    padding: 1.25rem;
    border: 1px solid #E5DDEC;
    border-radius: 12px;
    background: #FFFFFF;
}

.booking-summary-section h4 {
    margin: 0 0 1rem;
    color: #5B2B95;
    font-size: 1.05rem;
}

.booking-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid #F0EBF3;
}

.booking-summary-item:last-child {
    border-bottom: none;
}

.booking-summary-item span,
.booking-summary-message span {
    color: #666666;
}

.booking-summary-item strong {
    text-align: right;
    overflow-wrap: anywhere;
}

.booking-summary-message {
    padding-top: 0.85rem;
}

.booking-summary-message p,
.booking-summary-terms p {
    margin: 0.5rem 0 0;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.booking-summary-terms {
    background: #F8F5FA;
}

@media (max-width: 600px) {
    .booking-summary-item {
        flex-direction: column;
        gap: 0.25rem;
    }

    .booking-summary-item strong {
        text-align: left;
    }
}


/*FORM SUBMT- SUCCESS MESSAGE STYLING*/

.booking-success {
    padding: 24px 16px;
    text-align: center;
}

.booking-success h3 {
    margin-bottom: 16px;
}

.booking-success p {
    margin: 12px 0;
    line-height: 1.6;
}

.booking-success strong {
    overflow-wrap: anywhere;
}

/*FORM SUBMIT FAIL MESSAGE*/

.booking-failure {
    padding: 24px 16px;
    text-align: center;
}

.booking-failure h3 {
    margin-bottom: 16px;
    color: red
}

.booking-failure p {
    margin: 12px 0;
    line-height: 1.6;
}

.booking-failure-retry {
    margin-top: 20px;
}