body {
    font-family: sans-serif;
}

.booking-step--gray {
    background: #efefef;
    padding: 40px 0;
}

.consult-card {
    max-width: 1100px;
    margin: auto;
    background: #fff;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
}

.back-link {
    color: #666;
    font-size: 14px;
    cursor: pointer;
}

/* Direct booking hint for step1 */
.direct-booking-hint {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    /*border-radius: 6px;*/
    padding: 16px;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #1565c0;
    font-size: 14px;
}

.direct-booking-hint i {
    color: #1976d2;
    margin-right: 8px;
}

.direct-booking-hint strong {
    color: #0d47a1;
    display: flex;
    align-items: center;
}

.direct-booking-hint small {
    color: #1976d2;
    opacity: 0.8;
}

.step-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
}

.step-badge {
    display: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #333;
    color: #fff;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.section-title {
    margin-top: 32px;
    margin-bottom: 18px;
    font-size: 18px;
}


.check {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 26px;
    height: 26px;
    background: #2e7d32;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
}

.selected .check {
    display: flex;
}

.next-btn {
    margin-top: 30px;
    width: 100%;
    background: #2c2c2c;
    color: #fff;
    border: none;
    padding: 16px;
    font-size: 16px;
    /*border-radius: 4px;*/
}

.next-btn:not(:disabled):hover {
    background: #f2d851;
    color: #000;
    cursor: pointer;
}


.next-btn:disabled {
    opacity: .4;
}

.error {
    margin-top: 20px;
    background: #ffe8e8;
    padding: 12px;
    /*border-radius: 6px;*/
}

/* Regional mismatch error styles */
.regional-mismatch-error {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 16px;
    margin: 16px 0;
    color: #856404;
    font-size: 14px;
}

.regional-mismatch-error .error-icon {
    display: inline-block;
    color: #e17055;
    margin-right: 8px;
    font-size: 16px;
}

.regional-mismatch-error .error-help {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: #6c5500;
}

.regional-mismatch-error p {
    margin: 0 0 8px 0;
}

.regional-mismatch-error p:last-child {
    margin-bottom: 0;
}

.hidden {
    display: none
}


.booking-step--gray {
    background: #f3f3f3;
    padding: 3rem 1rem;
}

.step-wrapper {
    max-width: 640px;
    margin: 0 auto;
    background: #fff;
    padding: 2.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
}

.step-hint {
    color: #666;
    margin-bottom: 2rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-field {
    flex: 1;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

input,
select {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid #ccc;
    box-sizing: border-box;
    height: 3rem; /* Ensure consistent height */
    line-height: normal; /* Reset line-height to be consistent */
}

.link-button {
    background: none;
    border: none;
    color: #666;
    padding: 0;
    margin: 1rem 0;
    cursor: pointer;
}

.location-result {
    background: #f7f7f7;
    padding: 1rem;
    /*border-radius: 6px;*/
    margin-bottom: 1.5rem;
}

.hidden {
    display: none;
}

.primary-btn {
    width: 100%;
    padding: 0.9rem;
    background: #232323;
    color: #fff;
    border: none;
    /*border-radius: 6px;*/
    font-weight: 600;
}

.primary-btn:disabled {
    opacity: 0.4;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .booking-step--gray {
        padding: 1.5rem 0.5rem;
    }

    /* Responsive wrapper for step2 */
    .consult-card {
        max-width: 100%;
        margin: 0;
        padding: 1.5rem;
        box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
        /*border-radius: 8px;*/
        overflow-x: hidden;
        word-wrap: break-word;
    }

    .step-wrapper {
        max-width: 100%;
        padding: 1.5rem;
        margin: 0;
        /*border-radius: 8px;*/
        /* Prevent horizontal overflow */
        overflow-x: hidden;
        word-wrap: break-word;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .form-field {
        flex: none;
        width: 100%;
    }

    label {
        margin-bottom: 0.4rem;
        font-size: 14px;
    }

    input,
    select {
        padding: 0.8rem;
        font-size: 16px; /* Prevents zoom on iOS */
        /*border-radius: 8px;*/
        min-height: 44px; /* Minimum touch target size */
        box-sizing: border-box;
        width: 100%;
        /* Better focus states for mobile */
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
        line-height: 1.2;
        background-color: #fff;
        color: #333;
    }

    /* Ensure dropdown options are properly styled */
    select option {
        font-size: 16px;
        line-height: 1.4;
        padding: 8px 12px;
        color: #333;
        background-color: #fff;
    }

    /* iOS/Safari specific dropdown positioning fixes */
    select {
        -webkit-appearance: menulist;
        -moz-appearance: menulist;
        appearance: menulist;
        border-radius: 0;
        position: relative;
    }

    /* Prevent text zoom and positioning issues on iOS */
    select:focus {
        -webkit-user-select: auto;
        user-select: auto;
    }

    input:focus,
    select:focus {
        outline: none;
        border-color: #2196f3;
        box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
    }

    .step-hint {
        margin-bottom: 1.5rem;
        font-size: 14px;
        line-height: 1.4;
    }

    .location-result {
        padding: 0.8rem;
        margin-bottom: 1rem;
        /*border-radius: 8px;*/
        font-size: 14px;
        /* Prevent text overflow */
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .primary-btn {
        padding: 1rem;
        font-size: 16px;
        min-height: 48px; /* Comfortable touch target */
        /*border-radius: 8px;*/
        margin-top: 1.5rem;
        width: 100%;
        /* Better button states */
        transition: background-color 0.2s ease, opacity 0.2s ease;
    }

    .primary-btn:not(:disabled):active {
        background-color: #1a1a1a;
        transform: translateY(1px);
    }

    .link-button {
        margin: 0.8rem 0;
        font-size: 14px;
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 0.5rem 0;
        /* Better tap target */
        text-decoration: underline;
        transition: color 0.2s ease;
    }

    .link-button:active {
        color: #2196f3;
    }

    /* Direct booking hint mobile styles */
    .direct-booking-hint {
        padding: 12px;
        margin-top: 12px;
        font-size: 13px;
        /*border-radius: 8px;*/
        /* Prevent overflow */
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .direct-booking-hint strong {
        font-size: 14px;
    }

    h2 {
        margin-bottom: 0.5rem;
        font-size: 1.75rem;
        /* Prevent overflow */
        word-wrap: break-word;
    }

    /* Step-specific responsive styles */
    .step-title-row {
        gap: 12px;
        margin-top: 8px;
        margin-bottom: 1rem;
    }

    .step-badge {
        width: 24px;
        height: 24px;
        font-size: 14px;
        flex-shrink: 0;
    }

    .section-title {
        margin-top: 24px;
        margin-bottom: 16px;
        font-size: 16px;
    }

    .back-link {
        font-size: 13px;
        margin-bottom: 1rem;
        display: inline-block;
        padding: 0.5rem 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .booking-step--gray {
        padding: 1rem 0.25rem;
        /* Handle safe areas on modern phones */
        padding-left: max(0.25rem, env(safe-area-inset-left));
        padding-right: max(0.25rem, env(safe-area-inset-right));
    }

    /* Responsive wrapper for step2 on small screens */
    .consult-card {
        padding: 1rem;
        /*border-radius: 6px;*/
        min-width: 0;
    }

    .step-wrapper {
        padding: 1rem;
        /*border-radius: 6px;*/
        /* Ensure content fits */
        min-width: 0;
    }

    h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    /* Step elements for small screens */
    .step-title-row {
        gap: 10px;
        margin-top: 6px;
        margin-bottom: 0.8rem;
    }

    .step-badge {
        width: 22px;
        height: 22px;
        font-size: 12px;
    }

    .section-title {
        margin-top: 20px;
        margin-bottom: 14px;
        font-size: 15px;
    }

    .back-link {
        font-size: 12px;
        margin-bottom: 0.8rem;
        padding: 0.4rem 0;
        min-height: 40px;
    }

    .step-hint {
        font-size: 13px;
        margin-bottom: 1.25rem;
    }

    .form-row {
        gap: 0.8rem;
    }

    label {
        font-size: 13px;
        margin-bottom: 0.3rem;
    }

    input,
    select {
        padding: 0.7rem;
        font-size: 16px;
        /*border-radius: 6px;*/
        box-sizing: border-box;
        min-height: 44px; /* Ensure consistent height on small screens */
        line-height: 1.2; /* Reset line-height to be consistent */
        background-color: #fff;
        color: #333;
    }

    /* Ensure dropdown options are properly styled on small screens */
    select option {
        font-size: 16px;
        line-height: 1.4;
        padding: 8px 12px;
        color: #333;
        background-color: #fff;
    }

    /* iOS/Safari specific dropdown positioning fixes */
    select {
        -webkit-appearance: menulist;
        -moz-appearance: menulist;
        appearance: menulist;
        border-radius: 0;
        position: relative;
    }

    /* Prevent text zoom and positioning issues on iOS */
    select:focus {
        -webkit-user-select: auto;
        user-select: auto;
    }

    .location-result {
        padding: 0.7rem;
        font-size: 13px;
    }

    .primary-btn {
        padding: 0.9rem;
        margin-top: 1.25rem;
        /*border-radius: 6px;*/
    }

    .link-button {
        margin: 0.6rem 0;
        font-size: 13px;
        padding: 0.4rem 0;
    }

    .direct-booking-hint {
        padding: 10px;
        margin-top: 10px;
        font-size: 12px;
        /*border-radius: 6px;*/
    }

    .direct-booking-hint strong {
        font-size: 13px;
    }
}
