:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --accent-color: #f39c12;
    --text-color: #333;
    --dark-text: #2c3e50;
    --light-text: #ecf0f1;
    --error-color: #e74c3c;
    --success-color: #27ae60;
    --border-color: #ddd;
    --light-bg: #f9f9f9;
    --transition-speed: 0.3s;
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body {
    margin: 0;
    height: 100vh;
    background-color: #1a1a1a;
    font-family: 'Montserrat', sans-serif;
    padding-bottom: 60px;
}

#wizard-container {
    max-width: 800px;
    color: white;
    padding-bottom: 80px;
}

.wizard-step {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
    display: none;  /* Hide all steps by default */
}

.wizard-step.active {
    display: block;  /* Show active step */
}

.wizard-header {
    text-align: center;
    margin-bottom: 40px;
}

.wizard-header h1 {
    margin-bottom: 5px;
}

.wizard-header h2 {
    margin-top: 0;
    margin-bottom: 10px;
}

.wizard-progress {
    margin: 20px 0 40px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 50px;
    overflow: visible !important;
}

.wizard-progress-bar {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    width: 100%;
    z-index: 1;
    border-radius: 4px;
    overflow: hidden;
}

.wizard-progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #8B0000, #c00);
    width: 0;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(139, 0, 0, 0.5);
}

.wizard-progress[data-step="1"] .wizard-progress-bar::before { width: 0; }
.wizard-progress[data-step="2"] .wizard-progress-bar::before { width: 33.33%; }
.wizard-progress[data-step="3"] .wizard-progress-bar::before { width: 66.66%; }
.wizard-progress[data-step="4"] .wizard-progress-bar::before { width: 100%; }

.wizard-progress-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    position: relative;
    z-index: 2;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    margin: 0 5px;
}

/* Add specific positioning for first and last steps */
.wizard-progress-step:first-child {
    margin-right: 5px;
    margin-left: 0; /* Ensure no left margin on first step */
}

.wizard-progress-step:last-child {
    margin-left: 5px;
    margin-right: 0; /* Ensure no right margin on last step */
}

.wizard-progress-step::after {
    content: attr(data-title);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    letter-spacing: 0.2px;
    text-align: center;
    width: auto;
}

/* Odd steps - labels below circles */
.wizard-progress-step:nth-child(odd)::after {
    top: 100%;
    margin-top: 6px;
}

/* Even steps - labels above circles */
.wizard-progress-step:nth-child(even)::after {
    bottom: 100%;
    margin-bottom: 6px;
}

.wizard-progress-step.active {
    background-color: #8B0000;
    border-color: #8B0000;
    color: white;
    box-shadow: 0 0 0 4px rgba(139, 0, 0, 0.25), 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(139, 0, 0, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(139, 0, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(139, 0, 0, 0);
    }
}

.wizard-progress-step.active::after {
    color: white;
    font-weight: 600;
    transform: translateX(-50%);
}

.wizard-progress-step.completed {
    background-color: #8B0000;
    border-color: #8B0000;
    color: white;
    box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.2);
}

.wizard-progress-step.completed::before {
    content: '✓';
    font-size: 18px;
}

/* Hover effects (desktop only) */
@media (min-width: 768px) {
    .wizard-progress-step:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }
    
    .wizard-progress-step.active:hover {
        transform: translateY(-2px) scale(1.1);
    }
    
    .wizard-progress-step:nth-child(odd):hover::after {
        transform: translateX(-50%) translateY(2px);
    }
    
    .wizard-progress-step:nth-child(even):hover::after {
        transform: translateX(-50%) translateY(-2px);
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .wizard-progress-step::after {
        font-size: 10px;
    }
}

@media (max-width: 767px) {
    .wizard-progress {
        margin: 15px 0 30px;
        padding: 25px 45px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        gap: 10px;
        justify-content: space-between;
        width: calc(100% - 30px);
    }
    
    .wizard-progress::-webkit-scrollbar {
        height: 3px;
    }
    
    .wizard-progress::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 3px;
    }
    
    .wizard-progress-step {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 12px;
        margin: 0;
    }
    
    .wizard-progress-step::after {
        font-size: 9px;
        white-space: normal;
        line-height: 1.2;
        width: 65px;
    }
    
    /* Stack all labels below on mobile for easier reading */
    .wizard-progress-step:nth-child(odd)::after,
    .wizard-progress-step:nth-child(even)::after {
        top: 100%;
        bottom: auto;
        margin-top: 6px;
        margin-bottom: 0;
    }
    
    /* Adjust first and last items for mobile */
    .wizard-progress-step:first-child,
    .wizard-progress-step:last-child {
        margin: 0;
    }
    
    .form-container {
        padding: 0 5px;
    }
    
    .terms-content {
        max-height: 200px;
        overflow-y: auto;
        padding: 10px;
        margin-bottom: 15px;
        background-color: rgba(255, 255, 255, 0.05);
        border-radius: 6px;
    }
    
    .terms-content p, .terms-content ul {
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .wizard-progress {
        padding-top: 0;
        padding-bottom: 25px;
        padding-left: 30px;
        padding-right: 30px;
        width: calc(100% - 20px);
    }
    
    .wizard-progress-bar {
        top: 15px;
    }
    
    .wizard-progress-step::after {
        font-size: 9px;
        width: 60px;
    }
    
    /* Ensure steps are distributed evenly */
    .wizard-progress-step {
        width: 24px;
        height: 24px;
        min-width: 24px;
        font-size: 11px;
    }
    
    .wizard-step {
        padding: 15px;
    }
    
    .wizard-header {
        margin-bottom: 15px;
    }
    
    .wizard-header h1 img {
        height: 100px;
    }
    
    .validation-error {
        margin-top: 3px;
        font-size: 0.8em;
    }
}

/* Button styling for both horizontal and vertical layouts */
.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    gap: 15px;
}

.button-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
    align-items: center;
}

/* Default ordering for vertical button groups */
.button-group-vertical .btn-prev {
    order: 1;
}

.button-group-vertical .btn-next {
    order: 2;
}

.btn-prev,
.btn-next {
    padding: 10px 25px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    text-align: center;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-prev {
    background-color: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.btn-prev:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.btn-prev:active:not(:disabled) {
    transform: translateY(0);
}

.btn-next {
    background-color: #8B0000;
    color: white;
    box-shadow: 0 4px 6px rgba(139, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid #8B0000;
}

.btn-next:hover:not(:disabled) {
    background-color: #a00000;
    border-color: #a00000;
    transform: translateY(-1px);
    box-shadow: 0 6px 8px rgba(139, 0, 0, 0.2);
}

.btn-next:active:not(:disabled) {
    background: linear-gradient(135deg, #8B0000, #600000);
    transform: translateY(1px);
}

.btn-prev:disabled,
.btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    pointer-events: none;
}

/* Mobile responsiveness for buttons */
@media (max-width: 576px) {
    .button-group,
    .button-group-vertical {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        gap: 15px;
        align-items: stretch;
    }

    .button-group .btn-prev,
    .button-group-vertical .btn-prev,
    .button-group .btn-next,
    .button-group-vertical .btn-next {
        width: 100%;
        margin: 0;
        min-width: unset;
        padding: 12px 24px;
    }

    /* Order buttons on mobile - Previous first, Continue/Next second */
    .button-group .btn-prev,
    .button-group-vertical .btn-prev {
        order: 1;
    }
    
    .button-group .btn-next,
    .button-group-vertical .btn-next {
        order: 2;
    }
}

.form-group {
    margin-bottom: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.form-group label {
    display: block;
    margin-bottom: 3px;
    color: white;
    font-weight: 500;
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-group input:focus {
    outline: none;
    border-color: #8B0000;
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.2);
}

.form-group input.is-invalid {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

.form-group input.is-valid {
    border-color: #51cf66;
    box-shadow: 0 0 0 3px rgba(81, 207, 102, 0.2);
}

/* Contact Information Step Specific Styles */
.contact-info-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 10px 0;
}

.contact-info-header {
    text-align: center;
    margin-bottom: 20px;
}

.contact-info-header h3 {
    font-size: 22px;
    margin-bottom: 8px;
    color: white;
}

.contact-info-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    line-height: 1.5;
}

.contact-field-icon {
    position: absolute;
    right: 15px;
    top: 45px;
    color: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.form-group input:focus + .contact-field-icon {
    color: #8B0000;
}

.validation-error {
    color: #ff6b6b;
    font-size: 0.85em;
    margin-top: 8px;
    display: none;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.validation-error.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Error state */
.form-group input.error {
    border-color: rgba(255, 0, 0, 0.3);
}

/* Success state */
.form-group input.success {
    border-color: rgba(75, 181, 67, 0.3);
}

.validation-error {
    color: rgba(255, 0, 0, 0.8);
    font-size: 0.85em;
    margin-top: 5px;
    display: none;
}

/* Security code step styles */
.resend-code {
    background-color: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    margin: 20px auto;
    display: block;
}

.resend-code:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.resend-code:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: transparent;
}

/* New security code input and resend link styles */
.security-code-input-container {
    position: relative;
    max-width: 300px;
    margin: 0 auto;
}

.resend-code-container {
    text-align: center;
    margin: 10px 0 20px;
}

.resend-code-link {
    color: #ff9999;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
}

.resend-code-link::before {
    content: '↻';
    display: inline-block;
    margin-right: 5px;
    font-size: 14px;
    transform: rotate(0deg);
    transition: transform 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.resend-code-link:hover {
    color: white;
    background-color: rgba(139, 0, 0, 0.2);
    border: 1px solid rgba(255, 153, 153, 0.3);
}

.resend-code-link:hover::before {
    transform: rotate(180deg);
}

.resend-code-link:active {
    color: white;
    background-color: rgba(139, 0, 0, 0.4);
    border: 1px solid rgba(255, 153, 153, 0.5);
    transform: scale(0.97);
    transition: all 0.1s ease;
    outline: none;
}

.resend-code-link:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.3);
}

.resend-code-link:disabled,
.resend-code-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background-color: transparent;
}

/* Style the verification message */
.verification-message {
    margin-top: 8px;
    color: #7cffcb;
    font-size: 13px;
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.verification-message.show {
    opacity: 1;
    height: auto;
}

.verification-message.error-message {
    color: #ff6b6b;
}

.security-code-container {
    display: none;
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    padding: 15px;
}

.security-code-input {
    background-color: #2a2a2a;
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 15px;
    font-size: 24px;
    letter-spacing: 8px;
    text-align: center;
    width: 240px;
    margin: 20px auto;
    display: block;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.security-code-input:focus {
    border-color: #8B0000;
    outline: none;
    box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.2);
}

.security-code-message {
    text-align: center;
    margin: 20px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    line-height: 1.5;
}

.verification-spinner {
    display: none;
    width: 24px;
    height: 24px;
    margin: 20px auto;
}

/* Custom select styling */
.custom-select-container {
    position: relative;
    max-width: 400px;
    margin: 30px auto;
}

.custom-select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    background-color: #2a2a2a;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-select:focus {
    outline: none;
    border-color: #8B0000;
    box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.2);
}

.custom-select option {
    background-color: #2a2a2a;
    color: white;
    padding: 15px;
}

.select-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.custom-select:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.custom-select:hover + .select-arrow {
    border-top-color: rgba(255, 255, 255, 0.8);
}

.form-container {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: white;
}


.review-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.review-section {
    margin-bottom: 20px;
}

.review-item {
    margin: 10px 0;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.review-item label {
    font-weight: bold;
    margin-right: 10px;
    color: #ddd;
}

.review-item span {
    color: white;
}

/* Street Type Dropdown Styles */
.dropdown-list {
    background-color: white;
    color: #333;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.dropdown-item {
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #f0f0f0;
}

.search-container {
    margin-bottom: 8px;
}

.validation-message {
    font-size: 0.85em;
}

/* Cascading Dropdown Styling for Occupations */
/* Main occupation selector */
.occupation-selector {
    width: 100%;
    position: relative;
}

/* Main dropdown button */
.occupation-dropdown-btn {
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 15px;
    color: white;
    width: 100%;
    text-align: left;
    position: relative;
    cursor: pointer;
    height: 41px;
    transition: all 0.3s ease;
}

.occupation-dropdown-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.occupation-dropdown-btn::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(255, 255, 255, 0.5);
}

.occupation-dropdown-btn:focus {
    outline: none;
    border-color: #8B0000;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.2);
}

/* The cascading dropdown container */
.cascading-dropdown {
    display: none;
    position: absolute;
    width: 100%;
    max-width: 1000px;
    left: 0;
    background-color: #2a2a2a;
    border: 2px solid rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    margin-top: 5px;
}

.cascading-dropdown.active {
    display: block !important;
}

/* The flex container for all dropdown levels */
.cascading-container {
    display: flex;
    max-height: 500px;
    min-width: 100%;
    overflow-x: auto; /* Allow horizontal scrolling if needed */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: thin;
}

/* Each dropdown level */
.dropdown-level {
    width: 100%; /* Make each level take full width in search mode */
    min-width: 250px;
    overflow-y: auto;
    max-height: 500px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

/* When in search mode, adjust the levels */
.cascading-dropdown.search-active .cascading-container {
    display: block; /* Stack them vertically in search mode */
}

.cascading-dropdown.search-active .dropdown-level {
    width: 100%; /* Full width in search mode */
}

/* When in navigation mode, we want side-by-side levels */
.cascading-dropdown:not(.search-active) .dropdown-level {
    width: 250px; /* Increased from 200px to 250px */
    min-width: 250px; /* Increased from 200px to 250px */
}

.dropdown-level:last-child {
    border-right: none;
}

/* Search input */
.occupation-search {
    padding: 10px;
    background-color: #333;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 5;
    width: 100%;
}

.occupation-search input {
    width: 100%;
    padding: 8px 12px;
    background-color: #444;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: white;
    font-size: 14px;
}

.occupation-search input:focus {
    outline: none;
    border-color: #8B0000;
    box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.2);
}

/* Dropdown items */
.dropdown-item {
    padding: 10px 15px;
    cursor: pointer;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
    width: 100%; /* Ensure items take full width */
}

.dropdown-item:hover {
    background-color: rgba(139, 0, 0, 0.2);
}

.dropdown-item.active {
    background-color: rgba(139, 0, 0, 0.5);
}

.dropdown-item i.fa-chevron-right {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

.dropdown-item:hover i.fa-chevron-right {
    color: white;
}

.level-0 i.fa-sitemap,
.level-0 i.fa-building {
    color: #e74c3c;
}

.level-1 i.fa-layer-group {
    color: #f39c12;
}

.level-2 i.fa-building {
    color: #27ae60;
}

.level-3 i.fa-briefcase {
    color: #3498db;
}

/* Selected value display */
.selected-value {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
    display: block;
    width: 100%;
}

.placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Improved search results styling */
.dropdown-level .dropdown-item small {
    display: block;
    font-size: 0.8em;
    opacity: 0.7;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    color: rgba(255, 255, 255, 0.6);
}

/* Search result specific styling */
.dropdown-item.search-result {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-direction: column;
    align-items: flex-start;
}

.search-result:hover {
    background-color: rgba(139, 0, 0, 0.2);
}

.dropdown-item.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    color: rgba(255, 255, 255, 0.5);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .cascading-dropdown {
        max-width: 100%; /* Full width on mobile */
    }
    
    /* On mobile, we keep the horizontal scrolling for the hierarchy */
    .cascading-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        padding-bottom: 10px; /* Space for scrollbar */
    }
    
    .dropdown-level {
        width: 200px; /* Narrower on mobile */
        min-width: 200px;
        max-height: 300px; /* Smaller height on mobile */
    }
    
    /* For very small screens we switch to vertical */
    @media (max-width: 480px) {
        .cascading-container {
            flex-direction: column;
            overflow-x: hidden;
        }
        
        .dropdown-level {
            width: 100%;
            min-width: 100%;
            max-height: 200px;
            border-right: none;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .dropdown-level:last-child {
            border-bottom: none;
        }
    }
}

.error-container .select2-selection {
    border-color: #a94442;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
}

/* Hide original validation message div since we're using Select2 */
#streetTypeValidationMessage {
    display: none !important;
}

#streetTypeDropdownContainer {
    display: none !important;
}

/* Fix Select2 styles for dark theme */
.select2-container--default .select2-selection--single {
    background-color: #333 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    height: 100% !important;
    padding: 6px 4px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #fff !important;
    line-height: 28px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #fff transparent transparent transparent;
}

.select2-container--open .select2-dropdown--below,
.select2-container--open .select2-dropdown--above {
    background-color: #333 !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 8px !important;
}

.select2-container--default .select2-results__option {
    padding: 8px 12px !important;
    color: #fff !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #8B0000 !important;
    color: white !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: rgba(139, 0, 0, 0.5) !important;
}

.select2-search--dropdown .select2-search__field {
    background-color: #444 !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 8px !important;
    border-radius: 4px !important;
}

/* Address section styling */
.address-section {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
    border-left: 3px solid #8b0000;
}

.address-section h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #f0f0f0;
}

/* Two-column layout for address fields on larger screens */
@media (min-width: 768px) {
    .address-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
}

/* Step 6 Biometric Verification Styles */
#step6 {
    padding: 25px;
}

#step6 h2 {
    color: white;
    margin-bottom: 20px;
}

.verification-message {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
    margin: 15px auto;
    max-width: 500px;
}

.verification-message .lead {
    color: white;
    font-size: 1.2em;
    margin-bottom: 20px;
}

.verification-message p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

.verification-message .small {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.6);
}

.verification-status {
    margin-top: 30px;
}

#verification-status-message {
    color: rgba(255, 255, 255, 0.8);
    margin-top: 15px;
}

/* Section headers */
.section-header {
    margin-top: 20px;
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.section-header h4 {
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    display: none;
    max-width: 400px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.notification.info {
    background-color: #2196F3;
}

.notification.error {
    background-color: #F44336;
}

.notification.warning {
    background-color: #FF9800;
}

.notification.success {
    background-color: #4CAF50;
}

/* Review page styles */
.review-label {
    font-weight: bold;
    margin-right: 10px;
}

/* Custom checkbox styling */
.consent-checkbox {
    margin-bottom: 20px;
    position: relative;
    padding-left: 40px;
}

.consent-checkbox label {
    display: block;
    font-size: 15px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    text-align: left;
}

.consent-checkbox input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    z-index: 1;
    cursor: pointer;
    margin: 0;
}

.consent-checkbox label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.consent-checkbox input[type="checkbox"]:checked + label::before {
    background-color: #8B0000;
    border-color: #8B0000;
}

.consent-checkbox input[type="checkbox"]:checked + label::after {
    content: '';
    position: absolute;
    left: 9px;
    top: 5px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    transition: all 0.2s ease;
}

.consent-checkbox input[type="checkbox"]:focus + label::before {
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.2);
}

.consent-checkbox:hover label::before {
    border-color: rgba(255, 255, 255, 0.5);
}

.consent-checkbox a {
    color: #ff9999;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline;
}

.consent-checkbox a.privacy-link,
.consent-checkbox a.terms-link {
    color: #ff9999;
    font-weight: 600;
    padding: 0 2px;
}

.consent-checkbox a:hover {
    color: white;
    text-decoration: underline;
}

/* Close button styling */
.btn-close {
    background-color: #444;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 25px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-close:hover {
    background-color: #555;
    transform: translateY(-1px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

.btn-close:active {
    transform: translateY(0);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Mobile responsiveness for close button */
@media (max-width: 576px) {
    .btn-close {
        width: 100%;
        margin: 0;
        min-width: unset;
        padding: 12px 24px;
    }
}

/* Flash message system */
.flash-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    min-width: 280px;
    max-width: 80%;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.flash-message.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.flash-message.error {
    background-color: #F44336;
    border-left: 5px solid #B71C1C;
}

.flash-message.success {
    background-color: #4CAF50;
    border-left: 5px solid #2E7D32;
}

.flash-message.warning {
    background-color: #FF9800;
    border-left: 5px solid #E65100;
}

.flash-message.info {
    background-color: #2196F3;
    border-left: 5px solid #0D47A1;
}

.flash-message-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flash-message-icon {
    margin-right: 12px;
    font-size: 20px;
}

.flash-message-text {
    flex-grow: 1;
    text-align: left;
}

.flash-message-close {
    margin-left: 15px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 18px;
    background: none;
    border: none;
    padding: 0;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.flash-message-close:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Mobile styling for flash messages */
@media (max-width: 576px) {
    .flash-message {
        width: 90%;
        max-width: 90%;
        top: 10px;
    }
}

/* Phone link styling in flash messages */
.phone-link {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
    padding: 0 2px;
    border-radius: 3px;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-block;
    position: relative;
}

.phone-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
    text-decoration: underline;
}

.phone-link:active {
    transform: scale(0.98);
}

/* Add a subtle phone icon */
.phone-link:before {
    content: "☎ ";
    margin-right: 2px;
    font-size: 0.9em;
}

/* Different color for the phone icon based on message type */
.error .phone-link:before {
    color: #ffcccc;
}

.warning .phone-link:before {
    color: #ffe0b3;
}

.info .phone-link:before {
    color: #b3e0ff;
}

.success .phone-link:before {
    color: #c6e6c6;
}

/* Special styling for verification buttons in Step 5 */
.btn-verify {
    position: relative;
    overflow: hidden;
    margin: 0 8px;
    padding: 12px 28px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 160px;
    border-radius: 8px;
    background: linear-gradient(135deg, #a00000 0%, #8B0000 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 8px rgba(139, 0, 0, 0.3);
}

.btn-verify:hover:not(:disabled) {
    background: linear-gradient(135deg, #b30000 0%, #9a0000 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(139, 0, 0, 0.4);
}

.btn-verify :active:not(:disabled) {
    transform: translateY(0);
}

.btn-verify:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Add animation for verification buttons */
.btn-verify:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn-verify :focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

/* Add a distinctive border to highlight the action importance */
#step5 .button-group {
    position: relative;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 25px 20px;
    margin-top: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Add explanatory labels above buttons */
#step5 .button-group:before {
    content: 'Select verification method:';
    position: absolute;
    top: -10px;
    left: 20px;
    background-color: #1a1a1a;
    padding: 0 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.support-section {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 15px 0;
    background-color: rgba(25, 25, 25, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    background-image: linear-gradient(135deg, rgba(139, 0, 0, 0.05) 25%, transparent 25%, 
                                      transparent 50%, rgba(139, 0, 0, 0.05) 50%, 
                                      rgba(139, 0, 0, 0.05) 75%, transparent 75%, transparent);
    background-size: 20px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.support-phone {
    font-weight: 600;
    color: #ff9999;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    background-color: rgba(139, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.support-phone:hover {
    background-color: rgba(139, 0, 0, 0.4);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.support-phone:before {
    content: "☎ ";
    margin-right: 5px;
}

.support-section p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    margin-bottom: 0;
}

.support-label {
    font-weight: 600;
    color: white;
    margin: 0 5px;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

/* Responsive styling for verification buttons */
@media (max-width: 576px) {
    #verify-later, #verify-now {
        width: 100%;
        margin: 8px 0;
    }
    
    /* Adjust Step 5 button placement on mobile */
    #step5 .button-group {
        flex-direction: column-reverse;
        padding: 20px 15px;
    }
    
    #step5 .button-group #verify-later {
        order: 2;
    }
    
    #step5 .button-group #verify-now {
        order: 1;
        margin-bottom: 15px;
    }
}

/* Responsive adjustments for the support section */
@media (max-width: 767px) {
    .support-section {
        padding: 12px 0;
    }
    body {
        padding-bottom: 55px;
    }
}

@media (max-width: 480px) {
    .support-section p {
        font-size: 14px;
    }
    .support-phone {
        padding: 4px 8px;
    }
}