/* Appointment Booking Drawer Styles */

/* Drawer Overlay */
.appointment-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.appointment-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Drawer Container */
.appointment-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 767px;
    max-width: 900px;
    height: 100vh;
    background: #F5F5F5;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow: hidden;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
}

.appointment-drawer.active {
    transform: translateX(0);
}

.appointment-drawer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100vh;
}

/* Drawer Header */
.appointment-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 32px;
    background: #EAEFE9;
    border-bottom: none;
    flex-shrink: 0;
}

.appointment-drawer-title-wrapper {
    flex: 1;
}

.appointment-drawer-title {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #101828;
    margin: 0;
    line-height: 1.2;
}

.appointment-drawer-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #63706A;
    margin: 8px 0 0;
    line-height: 1.4;
}

.appointment-drawer-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.appointment-drawer-close:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.appointment-drawer-body-wrapper {
    flex: 1;
    background: #EAEFE9;
    overflow-y: auto;
}

/* Drawer Body */
.appointment-drawer-body {
    padding: 24px;
    background: white;
    flex: 1;
    border-radius: 20px;
    margin: 32px;
    min-height: 100%;
}

.appointment-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

/* Date Selection Section */
.appointment-date-section {
    background: transparent;
}

.appointment-section-title {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #101828;
    margin: 0 0 16px;
    line-height: 1.3;

}

.appointment-calendar-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.appointment-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.appointment-calendar-nav {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.appointment-calendar-nav:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.appointment-calendar-month {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #101828;
    margin: 0;
    text-align: center;
    flex: 1;
}

.appointment-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.appointment-calendar-weekday {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #101828;
    text-align: center;
    padding: 8px 4px;
}

.appointment-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.appointment-calendar-day {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #101828;
    text-align: center;
    padding: 12px 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    border: none;
    position: relative;
}

.appointment-calendar-day:hover:not(.disabled):not(.selected) {
    background-color: rgba(16, 57, 62, 0.1);
}

.appointment-calendar-day.disabled {
    color: #D1D5DB;
    cursor: not-allowed;
}

.appointment-calendar-day.other-month {
    color: #D1D5DB;
}

.appointment-calendar-day.selected {
    background-color: #668364;
    color: #ffffff;
    font-weight: 700;
}

.appointment-calendar-day.today {
    font-weight: 700;
}

/* Time Selection Section */
.appointment-time-section {
    background: transparent;
}

.appointment-selected-date {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #101828;
    margin-bottom: 16px;
    line-height: 1.4;
}

.appointment-time-slots {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

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

.appointment-time-slots::-webkit-scrollbar-track {
    background: #F5F5F5;
    border-radius: 3px;
}

.appointment-time-slots::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

.appointment-time-slots::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

.appointment-time-slot {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #101828;
    background: #F9FAFB;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    width: 100%;
}

.appointment-time-slot:hover:not(.disabled):not(.selected) {
    background-color: #F3F4F6;
    border-color: #E5E7EB;
}

.appointment-time-slot.selected {
    background-color: #668364;
    color: #ffffff;
    font-weight: 600;
}

.appointment-time-slot.disabled {
    color: #D1D5DB;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Drawer Footer */
.appointment-drawer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    background: #EAEFE9;
    border-top: none;
    flex-shrink: 0;
}

.appointment-btn-next,
.appointment-btn-continue {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background-color: #10393E;
    border: none;
    border-radius: 100px;
    padding: 10px 24px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-left: auto;
    text-decoration: none;
}

.appointment-btn-next:hover:not(:disabled),
.appointment-btn-continue:hover:not(:disabled) {
    background-color: #0A2F24;
}

.appointment-btn-next:disabled,
.appointment-btn-continue:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.appointment-btn-back {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #4B5B67;
    background-color: transparent;
    border: 1px solid #728E9E;
    border-radius: 100px;
    padding: 10px 24px;
    cursor: pointer;
    transition: all 0.2s;
}

/* .appointment-btn-back:hover {
    background-color: #F9FAFB;
    border-color: #728E9E;
} */

/* Step Navigation */
.appointment-step {
    display: none;
}

.appointment-step.active {
    display: block;
}

/* Form Wrapper Styles */
.appointment-form-wrapper {
    max-width: 100%;
}

.appointment-time-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    padding: 16px;
    background-color: #FAFAFA;
    border-radius: 12px;
}

.appointment-time-label {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #63706A;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.appointment-time-value {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #101828;
}

.appointment-form-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.appointment-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.appointment-form-label {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #344054;
    line-height: 20px;
}

.appointment-form-input,
.appointment-form-select {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #101828;
    background-color: #ffffff;
    border: 1px solid #D0D5DD;
    border-radius: 8px;
    padding: 10px 14px;
    width: 100%;
    outline: none;
    transition: all 0.2s;
}

.appointment-form-input:focus,
.appointment-form-select:focus {
    border-color: #0E3B2E;
    box-shadow: 0 0 0 3px rgba(14, 59, 46, 0.1);
}

.appointment-form-input::placeholder {
    color: #9CA3AF;
}

.appointment-date-input-wrapper {
    position: relative;
}

.appointment-date-input-wrapper .appointment-form-input {
    padding-right: 40px;
}

.appointment-date-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.appointment-form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2363706A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

/* Self Assessment Styles */
.appointment-assessment-wrapper {
    max-width: 100%;
}

.appointment-assessment-intro {
    margin-bottom: 24px;
}

.appointment-assessment-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #63706A;
    margin: 0;
    line-height: 1.5;
}

.appointment-assessment-questions {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.appointment-question-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.appointment-question-label {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #101828;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 4px;
    cursor: default;
}

.appointment-question-number {
    font-weight: 600;
    flex-shrink: 0;
}

.appointment-radio-group {
    display: flex;
    gap: 12px;
}

.appointment-radio-group-vertical {
    flex-direction: column;
}

.appointment-radio-group-horizontal {
    flex-direction: row;
}

.appointment-radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background-color: #FAFAFA;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    min-width: 0;
}

.appointment-radio-group-horizontal .appointment-radio-option {
    flex: 1;
    justify-content: center;
}

.appointment-radio-option:hover {
    background-color: #F3F4F6;
    border-color: #D1D5DB;
}

.appointment-radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #0E3B2E;
    flex-shrink: 0;
}

.appointment-radio-option input[type="radio"]:checked+.appointment-radio-label {
    font-weight: 500;
}

.appointment-radio-option:has(input[type="radio"]:checked) {
    background-color: #ffffff;
    border-color: #0E3B2E;
    box-shadow: 0 0 0 1px #0E3B2E;
}

.appointment-radio-label {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #101828;
    line-height: 1.4;
    flex: 1;
}

.appointment-btn-registration {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background-color: #0E3B2E;
    border: none;
    border-radius: 100px;
    padding: 10px 24px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-left: auto;
}

.appointment-btn-registration:hover:not(:disabled) {
    background-color: #0A2F24;
}

.appointment-btn-registration:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .appointment-drawer {
        max-width: 100%;
    }

    .appointment-drawer-header {
        padding: 20px 24px;
    }

    .appointment-drawer-title {
        font-size: 24px;
    }

    .appointment-drawer-body {
        padding: 20px;
    }

    .appointment-content-wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .appointment-drawer-footer {
        padding: 16px 24px;
    }
}


@media (max-width: 576px) {
    #intakeRequestForm .appointment-radio-group {
        flex-wrap: wrap;
    }

    #intakeRequestForm .appointment-radio-group-horizontal .appointment-radio-option {
        flex: 1 1 calc(50% - 6px);
    }
}



.appointment-form-textarea {
    box-shadow: 0px 1px 2px 0px #1018280D;
    border: 1px solid #D0D5DD;
    border-radius: 8px;
    padding: 10px 14px;
    width: 100%;
    outline: none;
    transition: all 0.2s;
    resize: none;
    min-height: 100px;
    max-height: 200px;
    overflow-y: auto;

    &:focus {
        border-color: #0E3B2E;
        box-shadow: 0 0 0 3px rgba(14, 59, 46, 0.1);
    }

    &::placeholder {
        color: #9CA3AF;
    }
}

.appointment-registration-message {
    .appointment-registration-message-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        img {
            max-width: 250px;
            margin-bottom: 24px;
        }

        h4 {
            font-size: 24px;
            line-height: 28px;
            color: #101828;
            text-align: center;
        }

        p {
            font-size: 16px;
            line-height: 24px;
            color: #4D5874;
            text-align: center;
            margin-top: 8px;
            max-width: 560px;
            margin: 0 auto;
        }

        .appointment-warning-message {
            padding: 16px;
            box-shadow: 0px 1px 2px 0px #1018280D;
            background-color: #FEF5F5;
            display: flex;
            align-items: start;
            gap: 8px;
            border-radius: 12px;
            margin-bottom: 40px;

            p {
                font-size: 14px;
                line-height: 21px;
                color: #333333;
                text-align: left;
                margin: 0;
            }

            .message-text {
                span {
                    color: #704100;
                    font-weight: 600;
                    font-size: 14px;
                    line-height: 21px;
                    text-align: left;
                    margin: 0;
                }
            }
        }

        .dr-details-wrapper {
            width: 100%;
            background-color: #FAFAFA;
            border-radius: 24px;

            .appointment-btn-link {
                background: #10393E;
                border: none;
                padding: 0;
                cursor: pointer;
                display: flex;
                align-items: center;
                justify-content: center;
                width: 32px;
                height: 32px;
                border-radius: 50%;
            }

            img {
                width: 70px;
                aspect-ratio: 1/1;
                object-fit: cover;
                border-radius: 16px;
                margin: 0;
            }

            .header {
                background-color: #EAEFE9;
                border-top-left-radius: 24px;
                border-top-right-radius: 24px;
                padding: 16px;
                font-size: 14px;
                line-height: 21px;
                color: #101828;
                text-align: center;
                margin: 0;
            }

            .dr-details {

                .dr-name {
                    font-size: 14px;
                    line-height: 21px;
                    color: #101828;
                    margin: 0;
                    font-weight: 600;
                }

                .dr-designation {
                    font-size: 14px;
                    line-height: 21px;
                    color: #101828;
                    margin: 0;
                    font-weight: 400;
                }

                .dr-role {
                    span {
                        font-size: 14px;
                        line-height: 21px;
                        color: #175CD3;
                        background-color: #EFF8FF;
                        border: 1px solid #B2DDFF;
                        border-radius: 100px;
                        padding: 4px 8px;
                        margin: 0;
                    }
                }
            }
        }
    }

    .appointment-registration-message-item-2 {
        h5 {
            font-size: 16px;
            line-height: 24px;
            color: #101828;
            text-align: center;
            margin-top: 8px;
            padding-top: 24px;
            border-top: 1px solid #D1D1D1;
        }

        p {
            font-size: 14px;
            line-height: 20px;
            color: #4D5874;
            text-align: center;
            margin-top: 8px;
            max-width: 560px;
            margin: 0 auto;
        }
    }
}
/* Shared row-gap */
.service-gap-grid,
.therapy-gap-grid,
.medical-gap-grid,
.communication-gap-grid {
    row-gap: 1rem;
}

/* Unique column-gaps */
.service-gap-grid { column-gap: 18rem; }
.therapy-gap-grid { column-gap: 10rem; }
.medical-gap-grid { column-gap: 17rem; }
.communication-gap-grid { column-gap: 16.1rem; }



#intakeBookingModal .appointment-form-input.is-invalid,
#intakeBookingModal .appointment-form-select.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Specific adjustment for Date Input to avoid icon overlap */
#intakeBookingModal .appointment-date-input-wrapper .appointment-form-input.is-invalid {
    padding-right: 60px; /* Increase padding to accommodate both icons */
    background-position: right 36px center; /* Shift validation icon to the left of the calendar icon */
}

#intakeBookingModal .appointment-form-input.is-invalid:focus,
#intakeBookingModal .appointment-form-select.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
}

/* Specific fix for Intake Modal to keep header in one line on mobile */
@media (max-width: 768px) {
  #intakeBookingModal .booking-modal-header {
    flex-direction: row !important;
    align-items: flex-start !important;
    flex-wrap: nowrap !important;
    gap: 16px;
  }
  
  #intakeBookingModal .booking-modal-title-wrapper {
    width: auto !important;
    flex: 1;
    min-width: 0;
    order: 0 !important;
  }

  #intakeBookingModal .booking-header-right {
    width: auto !important;
    flex-shrink: 0 !important;
    order: 0 !important;
    justify-content: flex-end;
  }
}

#appointmentRequestDrawer .appointment-radio-option {
    background-color: transparent;
}
