/* Booking Form Specific Styles */

/* Note: Validation error styles are now in forms.css for global use */

body,
button,
input,
select,
textarea {
    font-family: 'Lexend', sans-serif;
    font-weight: 300;
    font-style: normal;
}

main {
    padding: 0.5em 0;
}

/* Contact page header styling with Newsreader font */
.contact-header h2 {
    font-family: 'Newsreader', serif;
    font-weight: 600;
    font-size: 2.3rem;
    margin-bottom: 0.2rem;
}

/* Contact page subtitle styling */
.contact-subtitle {
    font-family: 'Lexend', sans-serif;
    font-weight: 300;
    font-size: 22px;
    line-height: 150%;
    letter-spacing: 0px;
    text-align: center;
    color: #15202c;
    margin-bottom: 1.5rem;
}

/* Override form-container max-width for contact page */
.contact-header ~ .form-container {
    max-width: 980px;
}

/* Contact form 2-column grid layout */
.contact-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 60px;
    row-gap: 12px;
    max-width: 980px;
    margin: 0 auto;
}

/* Contact form label styling - prevent wrapping */
.form-group > label {
    white-space: nowrap;
}

/* Radio button labels should not be bold */
.radio-group label {
    font-weight: normal;
}

/* Make standalone select fields match grid input width */
#relationship_to_patient,
#referring_organization_type {
    width: 100%;
    max-width: 450px;
}

/* Contact form submit button styling */
.contact-submit-btn {
    width: 100%;
    max-width: 610px;
    height: 54px;
    margin: 0 auto;
    display: flex;
    padding: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 100px;
    background: var(--primary-color);
    color: white;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.contact-submit-btn:hover:not(:disabled) {
    background: #e86055;
    border-color: #e86055;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(250, 114, 104, 0.3);
}

.contact-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Contact form input field styling */
.contact-form-grid .form-group input,
.contact-form-grid .form-group select {
    width: 100%;
    max-width: 100%;
    height: 42px;
    border: 1.5px solid #f6e8d4;
    border-radius: 24px;
    padding: 10px 16px 10px 16px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.contact-form-grid .form-group select {
    padding-right: 40px;
}

/* Select dropdown arrow positioning for all form selects */
.form-group select {
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
}

.contact-form-grid .form-group input:focus,
.contact-form-grid .form-group select:focus {
    border-color: #fa7268;
    outline: none;
}

/* Responsive: single column on mobile */
@media (max-width: 768px) {
    .contact-form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contact-header h2 {
        font-size: 2rem;
    }

    .contact-subtitle {
        font-size: 20px;
        margin-bottom: 2rem;
    }

    .contact-form-grid .form-group input,
    .contact-form-grid .form-group select {
        max-width: 100%;
    }

    /* Fix checkbox text cutoff on contact page */
    form[action*='/book/contact'] * {
        box-sizing: border-box;
    }

    form[action*='/book/contact'] {
        max-width: 100%;
        width: 100%;
        overflow-x: hidden;
    }

    form[action*='/book/contact'] main {
        padding: 0;
        overflow-x: hidden;
    }

    form[action*='/book/contact'] .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        max-width: 100%;
        width: 100%;
        overflow-x: hidden;
    }

    form[action*='/book/contact'] .form-container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        max-width: 100%;
        width: 100%;
        margin: 0;
        overflow-x: hidden;
    }

    form[action*='/book/contact'] .form-group {
        max-width: 100%;
        width: 100%;
        padding: 0;
        margin-left: 0;
        margin-right: 0;
        box-sizing: border-box;
        overflow: visible;
    }

    form[action*='/book/contact'] label.checkbox-container {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
    }

    form[action*='/book/contact'] .checkbox-container input[type='checkbox'] {
        flex-shrink: 0;
        width: 18px;
        min-width: 18px;
        margin-top: 2px;
    }

    form[action*='/book/contact'] .checkbox-container .checkbox-text,
    form[action*='/book/contact'] .checkbox-container span.checkbox-text {
        flex: 1;
        min-width: 0;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        line-height: 1.6;
        max-width: 100%;
        display: inline;
        white-space: normal;
    }

    /* Health, support, and tried page mobile adjustments */
    .health-conditions .checkbox-container {
        width: 100%;
        max-width: 100%;
    }

    /* Tried page (siblings layout) - Continue button first, Back button second */
    form[action*='/book/tried/'] .health-button-container {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    form[action*='/book/tried/'] .button-group {
        width: 100%;
    }

    form[action*='/book/tried/'] .health-back-button {
        width: 100%;
        max-width: 100%;
    }

    form[action*='/book/tried/'] .button-group button[type='submit'] {
        width: 100%;
        max-width: 100%;
    }

    /* Health page (nested layout) - both buttons inside .button-group */
    form[action*='/book/health/'] .button-group {
        display: flex;
        flex-direction: column-reverse;
        gap: 10px;
        width: 100%;
    }

    form[action*='/book/health/'] .button-group button[type='submit'],
    form[action*='/book/health/'] .button-group a.btn {
        width: 100%;
        max-width: 100%;
    }

    /* Support page (nested layout) - both buttons inside .button-group */
    form[action*='/book/support/'] .button-group {
        display: flex;
        flex-direction: column-reverse;
        gap: 10px;
        width: 100%;
    }

    form[action*='/book/support/'] .button-group button[type='submit'],
    form[action*='/book/support/'] .button-group a.btn {
        width: 100%;
        max-width: 100%;
    }

    /* Tried page (nested layout) - both buttons inside .button-group */
    form[action*='/book/tried/'] .button-group {
        display: flex;
        flex-direction: column-reverse;
        gap: 10px;
        width: 100%;
    }

    form[action*='/book/tried/'] .button-group button[type='submit'],
    form[action*='/book/tried/'] .button-group a.btn {
        width: 100%;
        max-width: 100%;
    }
}

/* Fix input fields border-radius cutoff at 320px */
@media (max-width: 320px) {
    .form-container {
        padding: 0;
    }

    .contact-form-grid {
        max-width: 100%;
        margin: 0;
        padding: 0 8px;
    }

    /* Reduce font size for better fit on very small screens */
    .health-label {
        font-size: 16px !important;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    .required-asterisk {
        font-size: 16px !important;
    }

    .form-group {
        max-width: 100%;
        overflow: visible;
    }
}

header {
    background: var(--tertiary-color);
    color: var(--light-text-color);
    padding: 0;
}

header .container {
    padding: 1rem;
}

header .progress {
    background: var(--background-color);
    color: var(--text-color);
}

footer {
    background: transparent;
    color: var(--text-color);
    padding: 0;
    margin-top: 0;
}

footer p {
    margin-bottom: 0;
}

footer p:last-child {
    margin-top: var(--spacing-md);
}

.emergency-footer {
    background: white;
    padding: 3rem 0;
    margin-top: 0;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emergency-content {
    display: flex;
    align-items: center;
    gap: 17px;
}

.emergency-content span {
    font-family: 'Lexend', sans-serif;
    font-size: 18px;
    font-weight: 300;
    color: #15202c;
}

.emergency-content strong {
    font-weight: 600;
    color: var(--primary-color);
}

a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Progress Indicator Styles */
.progress {
    background: var(--tertiary-color);
    padding: var(--spacing-lg) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    flex: 0 0 auto;
    text-decoration: none;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 2px solid #999;
    background: transparent;
    color: #999;
}

.step-label {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    color: #999;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.progress-line {
    flex: 1;
    height: 2px;
    background: #999;
    margin: 0 var(--spacing-md);
    position: relative;
    top: -15px; /* Align with circle center */
}

/* Active state styles */
.progress-step.active .step-circle {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--light-text-color);
}

.progress-step.active .step-label {
    color: var(--text-color);
}

/* Completed state styles */
.progress-step.completed .step-circle {
    background-color: #999;
    color: var(--light-text-color);
}

/* Logged in indicator */
.logged-in-indicator {
    text-align: center;
    font-size: 0.85rem;
    /* color: var(--light-text-color); */
    opacity: 0.8;
    padding: 0.25rem;
}

/* Responsive adjustments for progress indicator */
@media (max-width: 768px) {
    .progress-indicator {
        padding: 0 var(--spacing-sm);
    }

    .step-circle {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .step-label {
        font-size: 0.8rem;
    }

    .progress-line {
        margin: 0 var(--spacing-sm);
        top: -12px;
    }
}

/* Existing Client Modal Styles */
.modal-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal-overlay .modal-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.modal-title {
    margin-bottom: 20px;
    color: #333;
}

.modal-text {
    margin-bottom: 15px;
    color: #666;
    font-size: 16px;
}

.modal-text-bottom {
    margin-bottom: 30px;
}

.modal-login-btn {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

@media (max-width: 480px) {
    .step-label {
        font-size: 0.75rem;
    }

    .step-circle {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .progress-line {
        margin: 0 var(--spacing-xs);
        top: -10px;
    }
}

@media (max-width: 425px) {
    .progress-indicator {
        padding: 0 0.2rem;
    }

    .progress-step {
        gap: 0.25rem;
    }

    .step-circle {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .step-label {
        font-size: 0.6rem;
        max-width: 70px;
        white-space: normal;
        line-height: 1.1;
        text-align: center;
    }

    .progress-line {
        margin: 0 0.2rem;
        top: -10px;
    }
}

@media (min-width: 375px) and (max-width: 425px) {
    .progress-step[data-step='3'] .step-label {
        white-space: normal !important;
        max-width: 85px !important;
        word-break: keep-all !important;
    }
}

@media (max-width: 375px) {
    .progress-indicator {
        padding: 0 0.1rem !important;
    }

    .step-circle {
        width: 24px !important;
        height: 24px !important;
        font-size: 0.7rem !important;
    }

    .step-label {
        font-size: 0.55rem !important;
        white-space: normal !important;
        line-height: 1.1 !important;
        text-align: center !important;
    }

    /* Booking flow steps (data-step) */
    .progress-step[data-step='3'] .step-label {
        white-space: nowrap !important;
        hyphens: none !important;
        word-break: keep-all !important;
        font-size: 0.5rem !important;
        max-width: none !important;
    }

    /* Step 1 (Emergency Contact) - narrow to force word wrapping */
    .progress-step[data-page='1'] .step-label {
        max-width: 48px !important;
    }

    /* Step 2 (Care & Services) */
    .progress-step[data-page='2'] .step-label {
        max-width: 50px !important;
    }

    /* Step 3 (Demographics) - wider to fit on one line */
    .progress-step[data-page='3'] .step-label {
        max-width: 70px !important;
    }

    /* Step 4 (Referral Source) */
    .progress-step[data-page='4'] .step-label {
        max-width: 52px !important;
    }

    .progress-line {
        margin: 0 0.08rem !important;
        top: -9px !important;
    }
}

@media (max-width: 320px) {
    .progress-indicator {
        padding: 0 0.05rem !important;
    }

    .step-circle {
        width: 22px !important;
        height: 22px !important;
        font-size: 0.65rem !important;
    }

    .step-label {
        font-size: 0.5rem !important;
        white-space: normal !important;
        line-height: 1.1 !important;
        text-align: center !important;
    }

    /* Step 1 (Emergency Contact) - narrow to force word wrapping */
    .progress-step[data-page='1'] .step-label {
        max-width: 45px !important;
    }

    /* Step 2 (Care & Services) */
    .progress-step[data-page='2'] .step-label {
        max-width: 45px !important;
    }

    /* Step 3 (Demographics) - wider to fit on one line */
    .progress-step[data-page='3'] .step-label {
        max-width: 65px !important;
    }

    /* Step 4 (Referral Source) */
    .progress-step[data-page='4'] .step-label {
        max-width: 48px !important;
    }

    /* Booking header - Schedule Appointment */
    .progress-step[data-step='3'] .step-label {
        max-width: 90px !important;
        font-size: 0.45rem !important;
        word-break: keep-all !important;
        overflow-wrap: normal !important;
        hyphens: none !important;
    }

    .progress-line {
        margin: 0 0.05rem !important;
        top: -8px !important;
    }
}

/* Under-21 Modal Specific Styles */
.under-21-modal .modal-content {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    text-align: left;
}

.under-21-modal .modal-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 24px;
    color: #333;
}

.under-21-modal .modal-text-container {
    margin-bottom: 24px;
}

.under-21-modal .modal-text {
    margin-bottom: 12px;
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

.under-21-modal .resource-list {
    margin: 12px 0 12px 20px;
    padding: 0;
    color: #666;
    font-size: 16px;
    line-height: 1.8;
}

.under-21-modal .resource-list li {
    margin-bottom: 8px;
}

.under-21-modal .modal-primary-btn {
    width: 100%;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 8px;
}

.under-21-modal .modal-primary-btn:hover {
    background-color: #e86055;
}

/* Mobile responsive styles for under-21 modal */
@media (max-width: 768px) {
    .under-21-modal .modal-content {
        padding: 30px 24px;
        max-height: 85vh;
    }

    .under-21-modal .modal-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .under-21-modal .modal-text,
    .under-21-modal .resource-list {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .under-21-modal .modal-content {
        padding: 24px 20px;
        width: 95%;
    }

    .under-21-modal .modal-title {
        font-size: 22px;
    }

    .under-21-modal .modal-text,
    .under-21-modal .resource-list {
        font-size: 14px;
    }

    .under-21-modal .resource-list {
        margin-left: 16px;
    }
}

/* Select styling for state dropdown */
/* Style disabled options to match placeholder text color */
select option[disabled] {
    color: #777;
}

/* Style the select when no option is selected to match placeholder color */
select:invalid {
    color: #777;
}

/* Ensure selected options are always black */
select:valid {
    color: #000;
}

/* Ensure all regular options are black */
select option:not([disabled]) {
    color: #000;
}

/* Specific disabled submit button styling for better visual feedback */
button[type='submit']:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #ccc;
    border-color: #ccc;
}

button[type='submit']:disabled:hover {
    background-color: #ccc;
    border-color: #ccc;
    transform: none;
}

#date_of_birth {
    font-family: 'Lexend', sans-serif;
}

/* Checkbox styling for terms agreement */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.5;
    margin-top: var(--spacing-sm);
}

.checkbox-container input[type='checkbox'] {
    width: 18px;
    height: 18px;
    margin: 0;
    margin-top: 2px; /* Align with first line of text */
    flex-shrink: 0;
}

.checkbox-container .checkbox-text {
    flex: 1;
}

.checkbox-container input[type='checkbox']:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkbox-container a {
    color: var(--primary-color);
    text-decoration: underline;
}

.checkbox-container a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Radio button styling */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.radio-container {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.5;
}

.radio-container input[type='radio'] {
    width: 18px;
    height: 18px;
    margin: 0;
    margin-top: 2px; /* Align with first line of text */
    flex-shrink: 0;
}

.radio-container .radio-text {
    flex: 1;
    font-weight: normal;
}

/* Health conditions checkbox styling */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: var(--spacing-sm);
}

.health-conditions .checkbox-container {
    width: 610px;
    max-width: 100%;
    height: 54px;
    padding: 20px;
    border: 2px solid #f6e8d4;
    border-radius: 100px;
    background: white;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0 auto;
}

.health-conditions .checkbox-container:hover {
    border-color: var(--primary-color);
    background: #f9f9f9;
}

/* Show the actual checkbox */
.health-conditions .checkbox-container input[type='checkbox'] {
    width: 1.2rem;
    height: 1.2rem;
    margin: 0 1.2rem 0 0;
    accent-color: var(--primary-color);
    cursor: pointer;
    flex-shrink: 0;
}

/* Selected state styling */
.health-conditions
    .checkbox-container
    input[type='checkbox']:checked
    + .checkbox-text {
    font-weight: 500;
}

.health-conditions .checkbox-container input[type='checkbox']:checked {
    & + .checkbox-text {
        color: var(--text-color);
    }

    & ~ .checkbox-container,
    &:checked ~ * {
        background: #f6e8d4;
        border-color: #f6e8d4;
    }
}

/* Apply selected styling to the container when checkbox is checked */
.health-conditions .checkbox-container:has(input[type='checkbox']:checked) {
    background: #f6e8d4;
    border-color: #f6e8d4;
}

.health-conditions
    .checkbox-container:has(input[type='checkbox']:checked)
    .checkbox-text {
    color: var(--text-color);
}

/* Fallback for browsers that don't support :has() */
.health-conditions .checkbox-container.selected {
    background: #f6e8d4;
    border-color: #f6e8d4;
}

.health-conditions .checkbox-text {
    padding: 0;
    text-align: left;
    flex: 1;
    font-weight: 300;
}

/* Bold text when checkbox is selected */
.health-conditions
    .checkbox-container:has(input[type='checkbox']:checked)
    .checkbox-text {
    font-weight: 700;
}

/* Fallback for browsers that don't support :has() */
.health-conditions .checkbox-container.selected .checkbox-text {
    font-weight: 700;
}

/* Health page label styling */
.health-label {
    font-family: 'Lexend', sans-serif;
    font-weight: 300;
    font-size: 18px;
    line-height: 150%;
    letter-spacing: 0px;
    color: var(--text-color);
    white-space: normal; /* Allow wrapping for multi-line labels */
}

/* Hide label break on larger screens */
.label-break {
    display: none;
}

.required-asterisk {
    color: #fa7268;
    font-family: 'Lexend', sans-serif;
    font-weight: 300;
    font-size: 18px;
    line-height: 150%;
    letter-spacing: 0px;
}

/* Health page button styling */
.health-conditions ~ .button-group button[type='submit'],
form[action*='/book/health/'] .button-group button[type='submit'],
form[action*='/book/tried/'] .button-group button[type='submit'] {
    width: 100%;
    max-width: 100%;
    height: 54px;
    padding: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 100px;
    background: var(--primary-color);
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
}

form[action*='/book/health/'] .button-group button[type='submit']:hover,
form[action*='/book/tried/'] .button-group button[type='submit']:hover {
    background: #e86055;
    border-color: #e86055;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(250, 114, 104, 0.3);
}

/* Health page button container */
.health-button-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    width: 100%;
    max-width: 610px;
    margin: 0 auto;
    padding: 0;
}

/* Back button on health page - left side */
.health-back-button {
    width: auto;
    min-width: 120px;
    height: 54px;
    padding: 20px;
    border: 2px solid #d1c8c0;
    border-radius: 100px;
    background: #d1c8c0;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    box-sizing: border-box;
    margin: 0;
    flex-shrink: 0;
}

.health-back-button:hover {
    background: #bfb6ad;
    border-color: #bfb6ad;
}

.health-back-button:active {
    background: #aea59c;
    border-color: #aea59c;
}

/* Button group for health, support, and tried pages - right side */
form[action*='/book/health/'] .button-group,
form[action*='/book/support/'] .button-group,
form[action*='/book/tried/'] .button-group {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 0;
    padding: 0;
    flex: 1;
}

/* Continue button on support page matches health page styling */
form[action*='/book/support/'] .button-group button[type='submit'] {
    width: 100%;
    max-width: 100%;
    height: 54px;
    padding: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 100px;
    background: var(--primary-color);
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
}

form[action*='/book/support/'] .button-group button[type='submit']:hover {
    background: #e86055;
    border-color: #e86055;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(250, 114, 104, 0.3);
}

/* Help link styling - simple white text */
.help-link {
    color: var(--light-text-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    height: 100%;
}

.help-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Schedule call button styling - white text, coral border, no hover effects */
.schedule-call-button {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 0.75rem 1.5rem;
    background-color: transparent;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius-xl);
    color: white;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    margin-left: var(--spacing-md);
    cursor: pointer;
}

.call-text {
    font-size: 1rem;
    font-weight: 600;
}

.call-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Responsive adjustments for help elements */
@media (max-width: 768px) {
    .help-link {
        font-size: 0.9rem;
    }

    .schedule-call-button {
        padding: 0.5rem 1rem;
        gap: 0.25rem;
        margin-left: var(--spacing-sm);
    }

    .call-text {
        font-size: 0.9rem;
    }

    .call-icon {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .help-link {
        display: none; /* Hide "Need Help?" on very small screens */
    }

    .schedule-call-button {
        padding: 0.4rem 0.8rem;
        margin-left: 0;
    }

    .call-text {
        font-size: 0.8rem;
    }
}

/* Mobile-specific improvements for 768px and smaller */
@media (max-width: 768px) {
    /* Prevent horizontal scroll globally */
    html {
        overflow-x: hidden;
    }

    body {
        overflow-x: hidden;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    /* Header improvements */
    header {
        width: 100%;
        box-sizing: border-box;
    }

    header .container {
        max-width: 100%;
        padding: 0.75rem;
        box-sizing: border-box;
    }

    /* Emergency footer mobile fixes */
    .emergency-footer {
        width: 100%;
        box-sizing: border-box;
        margin-left: 0;
        margin-right: 0;
        left: auto;
        right: auto;
        position: static;
    }

    .emergency-content {
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 1rem;
    }
}

/* Additional mobile improvements for 425px and smaller */
@media (max-width: 425px) {
    /* Show line break in label text for better readability on mobile */
    .label-break {
        display: block;
    }

    /* Prevent horizontal scroll globally */
    html {
        overflow-x: hidden;
    }

    body {
        overflow-x: hidden;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    /* Header improvements */
    header {
        width: 100%;
        box-sizing: border-box;
    }

    header .container {
        max-width: 100%;
        padding: 0.75rem;
        box-sizing: border-box;
    }

    header nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
    }

    .nav-links {
        flex: 1;
    }

    .nav-links:first-child {
        justify-content: flex-start;
    }

    .nav-links:last-child {
        justify-content: flex-end;
        font-size: 0.8rem;
    }

    .nav-links img.logo {
        max-height: 32px;
        width: auto;
    }

    /* Progress indicator mobile fixes - more evenly spaced for 425px-375px */
    .progress {
        width: 100%;
        box-sizing: border-box;
        padding: 0.75rem 0.5rem;
    }

    .progress-indicator {
        justify-content: space-between;
        gap: 0.25rem;
        width: 100%;
        max-width: 100%;
    }

    .progress-step {
        flex: 1;
        min-width: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .step-circle {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .step-label {
        font-size: 0.7rem;
        white-space: normal;
        text-align: center;
        line-height: 1.2;
        word-break: break-word;
    }

    .progress-line {
        flex: 1;
        margin: 0 0.25rem;
        min-width: 10px;
    }

    /* Emergency footer mobile fixes */
    .emergency-footer {
        width: 100%;
        box-sizing: border-box;
        margin-left: 0;
        margin-right: 0;
        left: auto;
        right: auto;
        position: static;
    }

    .emergency-content {
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 1rem;
    }
}

/* Screen sizes smaller than 375px - adjust header to prevent button cutoff */
@media (max-width: 376px) {
    header .container {
        padding: 0.5rem;
    }

    header nav {
        gap: 0.25rem;
    }

    .nav-links img.logo {
        max-height: 28px;
        width: auto;
    }

    .nav-links:last-child {
        flex-direction: column !important;
        align-items: flex-end !important;
        font-size: 0.7rem !important;
        white-space: nowrap !important;
        gap: 0.2rem !important;
    }

    .schedule-call-button {
        padding: 0.35rem 0.6rem !important;
        gap: 0.15rem !important;
        margin-left: 0 !important;
        font-size: 0.75rem !important;
        border-width: 1.5px !important;
    }

    .call-text {
        display: inline !important;
    }

    .call-icon {
        font-size: 1.1rem !important;
    }

    /* Progress indicator for very small screens */
    .progress {
        padding: 0.5rem 0.25rem;
    }

    .progress-indicator {
        gap: 0.15rem;
    }

    .progress-step[data-step='3'] {
        flex: 1.5;
    }

    .step-circle {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }

    .step-label {
        font-size: 0.55rem;
        white-space: normal;
        line-height: 1.1;
        text-align: center;
    }

    .progress-line {
        margin: 0 0.15rem;
        min-width: 8px;
    }

    /* Step 1 - About You */
    .progress-step[data-step='1'] .step-label {
        max-width: 40px;
    }

    /* Step 2 - Verify Insurance */
    .progress-step[data-step='2'] .step-label {
        max-width: 45px;
    }

    /* Step 3 - Schedule Appointment - keep "Appointment" on one line */
    .progress-step[data-step='3'] .step-label {
        max-width: 90px !important;
        font-size: 0.5rem !important;
        word-break: keep-all !important;
        overflow-wrap: normal !important;
        hyphens: none !important;
    }
}

/* Care Coordinator specific styles */
.disabled-option {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Schedule Appointment - Date Accordion Styles */
.date-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    align-items: center;
}

.date-item {
    width: 75%;
    border: 2px solid #f6e8d4;
    border-radius: 12px;
    background: white;
    overflow: hidden;
    transition: all 0.3s ease;
}

.date-item:hover {
    border-color: var(--primary-color);
}

.date-item.expanded {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(250, 114, 104, 0.15);
}

/* Highlight collapsed cards that have a selection */
.date-item.has-selection {
    border-color: var(--primary-color);
    background: linear-gradient(to right, #fef9f5, white);
}

.date-button {
    width: 100%;
    padding: 20px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Lexend', sans-serif;
}

.date-button:hover {
    background: #f9f9f9;
}

.date-item.expanded .date-button {
    background: #fef9f5;
}

.date-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    flex: 1;
}

.day-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
}

.slot-count {
    font-size: 0.9rem;
    font-weight: 300;
    color: #666;
}

.expand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.date-item.expanded .expand-icon {
    transform: rotate(180deg);
}

/* Selected slot indicator on collapsed cards */
.selected-slot-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 400;
    margin-left: 12px;
    transition: all 0.3s ease;
}

.selected-slot-indicator svg {
    color: white;
}

.selected-slot-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.selected-time {
    font-weight: 500;
    font-size: 0.85rem;
    line-height: 1.2;
}

.selected-provider {
    font-size: 0.75rem;
    font-weight: 300;
    opacity: 0.95;
    line-height: 1.2;
}

/* Hide indicator when card is expanded */
.date-item.expanded .selected-slot-indicator {
    display: none;
}

/* Hide appointment slots by default */
.appointment-slots-container {
    display: none;
    padding: 20px;
    background: white;
}

/* Show appointment slots when expanded */
.date-item.expanded .appointment-slots-container {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Time slots styling */
.time-slots {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.time-slot {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border: 2px solid #f6e8d4;
    border-radius: 50px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.time-slot:hover {
    border-color: var(--primary-color);
    background: #f9f9f9;
}

.time-slot.selected {
    border-color: var(--primary-color);
    background: #f6e8d4;
}

.time-slot input[type='radio'] {
    width: 20px;
    height: 20px;
    margin: 0 12px 0 0;
    cursor: pointer;
    flex-shrink: 0;
}

.time-slot-label {
    flex: 1;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 300;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.time-slot.selected .time-slot-label {
    font-weight: 500;
}

/* Submit button for scheduling */
.appointment-slots ~ button[type='submit'],
form[action='/book/schedule'] button[type='submit'] {
    width: 100%;
    max-width: 610px;
    height: 54px;
    margin: 30px auto 0;
    padding: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 100px;
    background: var(--primary-color);
    color: white;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

form[action='/book/schedule'] button[type='submit']:hover:not(:disabled) {
    background: #e86055;
    border-color: #e86055;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(250, 114, 104, 0.3);
}

form[action='/book/schedule'] button[type='submit']:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #ccc;
    border-color: #ccc;
}

form[action='/book/schedule'] button[type='submit']:disabled:hover {
    background-color: #ccc;
    border-color: #ccc;
    transform: none;
    box-shadow: none;
}

/* Responsive adjustments for schedule page */
@media (max-width: 768px) {
    .date-button {
        padding: 16px;
    }

    .day-name {
        font-size: 1rem;
    }

    .slot-count {
        font-size: 0.85rem;
    }

    .appointment-slots-container {
        padding: 0 16px 16px 16px;
    }

    .time-slot {
        padding: 14px;
    }

    .time-slot-label {
        font-size: 0.95rem;
    }

    .selected-slot-indicator {
        padding: 6px 12px;
        font-size: 0.85rem;
        gap: 8px;
    }

    .selected-time {
        font-size: 0.85rem;
    }

    .selected-provider {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .date-button {
        padding: 14px;
        flex-wrap: wrap;
    }

    .day-name {
        font-size: 0.95rem;
    }

    .slot-count {
        font-size: 0.8rem;
    }

    .selected-slot-indicator {
        width: 100%;
        margin: 8px 0 0 0;
        padding: 8px 12px;
        justify-content: flex-start;
    }

    .selected-time {
        font-size: 0.8rem;
    }

    .selected-provider {
        font-size: 0.7rem;
    }

    .appointment-slots-container {
        padding: 0 12px 12px 12px;
    }

    .time-slot {
        padding: 12px;
        border-radius: 50px;
    }

    .time-slot-label {
        font-size: 0.9rem;
        flex-wrap: wrap;
    }
}

/**********************************************************************
 * Appointment Confirmation Page Styles
 * --------------------------------------------------------------------
 * Styles specific to the appointment confirmation page. This section
 * is separated from the main booking styles for clarity and maintainability.
 *********************************************************************/
.confirmed-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Add more horizontal padding on larger screens to prevent boxes from touching edges */
@media (min-width: 1024px) {
    .confirmed-content {
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
        gap: 3rem;
    }
}

.confirmed-header {
    text-align: center;
    margin-bottom: 3rem;
}

.confirmed-header h2 {
    font-family: 'Newsreader', serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: #15202c;
    margin-bottom: 1rem;
}

.confirmed-header h2 strong {
    color: var(--primary-color);
}

.confirmed-header p {
    font-family: 'Lexend', sans-serif;
    font-size: 1.125rem;
    font-weight: 300;
    color: #666;
    line-height: 1.6;
}

.confirmed-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Appointment Summary Section */
.appointment-summary-section {
    background: white;
    border: 2px solid #f6e8d4;
    border-radius: 1rem;
    padding: 2rem;
}

.appointment-summary-section h3 {
    font-family: 'Lexend', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #15202c;
    margin-bottom: 1.5rem;
}

.summary-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f6e8d4;
}

.summary-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.summary-value {
    font-family: 'Lexend', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    color: #15202c;
    line-height: 1.6;
}

.summary-value strong {
    font-weight: 600;
    color: #666;
    margin-right: 0.5rem;
}

/* Calendar Section */
.calendar-section {
    background: white;
    border: 2px solid #f6e8d4;
    border-radius: 1rem;
    padding: 2rem;
}

.calendar-section h3 {
    font-family: 'Lexend', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #15202c;
    margin-bottom: 1.5rem;
}

.calendar-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.calendar-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid #f6e8d4;
    border-radius: 0.75rem;
    background: white;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.calendar-option:hover {
    border-color: var(--primary-color);
    background: #f9f9f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(250, 114, 104, 0.15);
}

.calendar-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.calendar-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.calendar-name {
    font-family: 'Lexend', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: #15202c;
}

/* Confirmed Actions */
.confirmed-actions {
    text-align: center;
}

.prepare-button {
    width: 100%;
    max-width: 610px;
    height: 54px;
    padding: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 100px;
    background: var(--primary-color);
    color: white;
    font-family: 'Lexend', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prepare-button:hover {
    background: #e86055;
    border-color: #e86055;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(250, 114, 104, 0.3);
}

.login-link {
    margin-top: 1rem;
}

.login-link a {
    font-family: 'Lexend', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.login-link a:hover {
    color: #e86055;
}

/* Responsive Design for Confirmation Page */
@media (max-width: 768px) {
    .confirmed-container {
        padding: 1.5rem 1rem;
    }

    .confirmed-header h2 {
        font-size: 2rem;
    }

    .confirmed-header p {
        font-size: 1rem;
    }

    .confirmed-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .appointment-summary-section,
    .calendar-section {
        padding: 1.5rem;
    }

    .appointment-summary-section h3,
    .calendar-section h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .confirmed-header h2 {
        font-size: 1.75rem;
    }

    .confirmed-header p {
        font-size: 0.95rem;
    }

    .appointment-summary-section,
    .calendar-section {
        padding: 1.25rem;
    }

    .calendar-option {
        padding: 0.875rem;
    }

    .calendar-icon {
        width: 32px;
        height: 32px;
    }

    .prepare-button {
        height: 48px;
        padding: 16px;
        font-size: 0.95rem;
    }
}

/* Mobile fixes for refer page - allow text wrapping */
@media (max-width: 768px) {
    /* Allow labels to wrap on mobile for refer page */
    form[action*='/book/refer/'] .form-group > label {
        white-space: normal;
        word-wrap: break-word;
    }

    /* Ensure checkbox text wraps properly */
    form[action*='/book/refer/'] .checkbox-container {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
    }

    form[action*='/book/refer/'] .checkbox-container .checkbox-text {
        flex: 1;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
        line-height: 1.5;
    }

    form[action*='/book/refer/'] .checkbox-container input[type='checkbox'] {
        flex-shrink: 0;
        margin-top: 2px;
    }

    /* Fix PCP knowledge question text wrapping */
    form[action*='/book/refer/'] #pcp-knowledge-question label {
        white-space: normal;
        word-wrap: break-word;
    }
}
