/* ==========================================================================
   SIMPLE MOBILE CSS OVERRIDES
   Clean, simple approach for mobile responsiveness
   ========================================================================== */

@media screen and (max-width: 768px) {
    /* Basic mobile reset */
    html, body {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
    }
    
    /* Simple auth page layout */
    .cid-auth-page {
        width: 100% !important;
        margin: 0 !important;
        padding: 10px 5px !important;
        box-sizing: border-box !important;
        min-height: 100vh !important;
        display: flex !important;
        justify-content: center !important;
        align-items: flex-start !important;
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
    }
    
    /* Center the container */
    .cid-auth-container {
        width: 100% !important;
        max-width: 90vw !important;
        margin: 0 auto !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
    }
    
    /* Simple card styling */
    .cid-auth-card {
        width: 100% !important;
        margin: 10px 0 !important;
        padding: 20px 15px !important;
        box-sizing: border-box !important;
        background: #ffffff !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        animation: none !important;
        backdrop-filter: none !important;
    }

    /* Wizard and registration form containers */
    .cid-registration-wizard,
    .cid-registration-wizard .wizard-container,
    .cid-registration-wizard .wizard-step,
    .cid-registration-wizard .wizard-step .step-content {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Progress bar and steps */
    .cid-wizard-progress,
    .cid-wizard-progress .progress-bar,
    .cid-wizard-progress .progress-steps {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    .cid-wizard-progress .progress-step {
        width: 100% !important;
        max-width: 100% !important;
        margin: 2px 0 !important;
        padding: 12px 15px !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        background: #ffffff !important;
        border: 2px solid #7367f0 !important;
        border-radius: 8px !important;
        color: #333333 !important;
        font-weight: 600 !important;
        text-shadow: none !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    }
    
    .progress-step.active {
        background: #7367f0 !important;
        border: 2px solid #7367f0 !important;
        color: #ffffff !important;
        transform: scale(1.02) !important;
        box-shadow: 0 4px 8px rgba(115, 103, 240, 0.3) !important;
    }
    
    .progress-step.completed {
        background: #2ecc97 !important;
        border: 2px solid #2ecc97 !important;
        color: #ffffff !important;
        box-shadow: 0 2px 6px rgba(46, 204, 151, 0.3) !important;
    }
    
    .step-number {
        width: 30px !important;
        height: 30px !important;
        line-height: 26px !important;
        font-size: 14px !important;
        margin-bottom: 0 !important;
        margin-left: 0 !important;
        margin-right: 10px !important;
        flex-shrink: 0 !important;
        background: #333333 !important;
        color: #ffffff !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-weight: bold !important;
        text-align: center !important;
    }
    
    .progress-step.active .step-number {
        background: #ffffff !important;
        color: #7367f0 !important;
    }
    
    .progress-step.completed .step-number {
        background: #ffffff !important;
        color: #2ecc97 !important;
    }
    
    .step-label {
        font-size: 14px !important;
        font-weight: 600 !important;
        margin: 0 !important;
        flex: 1 !important;
        color: inherit !important;
        text-shadow: none !important;
    }

    /* Immigration type cards - Force single column */
    .immigration-type-cards {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: 10px !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .immigration-type-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 0 10px 0 !important;
        padding: 15px !important;
        box-sizing: border-box !important;
        display: block !important;
    }

    .immigration-type-card .card-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 15px !important;
        box-sizing: border-box !important;
        display: block !important;
    }

    /* Form elements - Force full width */
    .cid-form-group,
    .cid-form-row,
    .cid-form-input,
    .cid-form-select,
    .cid-form-textarea {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Ultra-aggressive form constraints */
    input, select, textarea, button {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 15px !important;
        margin: 0 !important;
        font-size: 16px !important;
        border-radius: 6px !important;
    }
    
    /* Force single column layout */
    .cid-form-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Two-column form groups - Force single column */
    .cid-form-row.two-column {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }

    .cid-form-row.two-column .cid-form-group {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
    }

    /* Buttons and navigation */
    .wizard-navigation,
    .wizard-navigation .wizard-nav-buttons {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        box-sizing: border-box !important;
    }

    .wizard-navigation .cid-btn {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 10px 0 !important;
        box-sizing: border-box !important;
    }

    /* Checkbox styling for terms - RTL layout */
    .cid-checkbox-group {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        margin: 15px 0 !important;
        box-sizing: border-box !important;
        direction: rtl !important;
        text-align: right !important;
        padding: 0 !important;
    }

    .cid-checkbox-group input[type="checkbox"] {
        width: 16px !important;
        height: 16px !important;
        min-width: 16px !important;
        margin: 2px 0 0 0 !important;
        flex-shrink: 0 !important;
        order: 2 !important;
    }

    .cid-checkbox-group label {
        flex: 1 !important;
        font-size: 14px !important;
        line-height: 1.4 !important;
        word-wrap: break-word !important;
        text-align: right !important;
        order: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
        margin-left: 8px !important;
    }

    /* Icons and images */
    .immigration-type-card .icon,
    .immigration-type-card img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Text elements */
    .wizard-step h3 {
        font-size: 18px !important;
        text-align: center !important;
        margin-bottom: 15px !important;
        word-wrap: break-word !important;
    }

    .wizard-step p {
        font-size: 14px !important;
        text-align: center !important;
        margin-bottom: 20px !important;
        line-height: 1.5 !important;
        word-wrap: break-word !important;
    }

    /* Hide any elements that might cause overflow */
    * {
        max-width: 100vw !important;
        box-sizing: border-box !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    /* Specific fix for any remaining wide elements */
    .cid-auth-page *,
    .cid-auth-container *,
    .cid-auth-card *,
    .cid-registration-wizard * {
        overflow-x: hidden !important;
        max-width: 100% !important;
        width: auto !important;
        box-sizing: border-box !important;
    }
    
    /* Force viewport constraints on all containers */
    .container, .row, .col, [class*="col-"], 
    .grid, .flex, [class*="grid-"], [class*="flex-"] {
        max-width: 100% !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    
    /* Prevent any fixed widths */
    [style*="width"] {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Extra small devices (phones in portrait) */
@media screen and (max-width: 480px) {
    .cid-auth-card {
        margin: 10px 5px !important;
        padding: 15px !important;
        border-radius: 8px !important;
    }

    .wizard-step h3 {
        font-size: 16px !important;
    }

    .immigration-type-card {
        padding: 12px !important;
    }

    .immigration-type-card h4 {
        font-size: 14px !important;
    }

    .immigration-type-card p {
        font-size: 12px !important;
    }

    .cid-form-input,
    .cid-form-select {
        padding: 12px !important;
        font-size: 14px !important;
    }

    .cid-btn {
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
}



/* Extra small screens */
@media screen and (max-width: 480px) {
    .cid-auth-card {
        padding: 10px !important;
        margin: 2px !important;
    }
    
    .immigration-type-card {
        padding: 10px !important;
        margin: 0 0 8px 0 !important;
    }
    
    .immigration-type-card .card-content {
        padding: 10px !important;
    }
    
    .step-label {
        font-size: 12px !important;
    }
}

/**
 * Auth Forms CSS - Modern, Glossy, Futuristic Design
 * This file contains the common styles for the login and registration forms
 */

/* Font Import */
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Common Form Styles */
.cid-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    font-family: 'Vazirmatn', sans-serif;
    background-color: #f5f7fa;
}

.cid-auth-body {
    margin: 0;
    padding: 0;
    font-family: 'Vazirmatn', sans-serif;
    background-color: #f5f7fa;
}

.cid-auth-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #7367f0 0%, #ce9ffc 100%);
    opacity: 0.8;
    z-index: -1;
    animation: gradientAnimation 15s ease infinite;
    background-size: 400% 400%;
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50% }
    50% { background-position: 100% 50% }
    100% { background-position: 0% 50% }
}

.cid-auth-container {
    width: 100%;
    max-width: 800px;
    perspective: 1000px;
    margin: 0 auto;
    position: relative;
    left: 0;
    right: 0;
    transform: none;
}

/* Wizard-specific container adjustments */
.cid-registration-wizard {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    left: 0;
    right: 0;
    transform: none;
}

.cid-auth-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 0 30px rgba(125, 100, 220, 0.3);
    backdrop-filter: blur(10px);
    transform-style: preserve-3d;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    position: relative;
    overflow: hidden;
    animation: cardEntrance 0.8s ease-out;
    width: 100%;
    box-sizing: border-box;
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cid-auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 0 0 40px rgba(125, 100, 220, 0.4);
}

.cid-auth-card::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 40%, rgba(255, 255, 255, 0.3) 60%, transparent 70%);
    transform: rotate(-45deg);
    pointer-events: none;
    z-index: 0;
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { top: -100%; left: -100%; }
    100% { top: 100%; left: 100%; }
}

.cid-auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.logo-icon {
    width: 80px;
    height: 80px;
    color: #7367f0;
    filter: drop-shadow(0 4px 6px rgba(115, 103, 240, 0.4));
}

.cid-auth-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.cid-auth-header h1 {
    color: #222;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 700;
}

.cid-auth-header p {
    color: #666;
    font-size: 16px;
    opacity: 0.9;
}

.cid-auth-form-wrapper {
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

/* Form Controls */
.cid-form-input,
.cid-form-select,
.cid-form-textarea {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(115, 103, 240, 0.2);
    border-radius: 12px;
    padding: 15px;
    font-size: 16px;
    color: #333;
    width: 100%;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.cid-form-input:focus,
.cid-form-select:focus,
.cid-form-textarea:focus {
    border-color: #7367f0;
    box-shadow: 0 0 0 3px rgba(115, 103, 240, 0.2);
    background: rgba(255, 255, 255, 1);
}

.cid-form-label {
    color: #444;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
}

.cid-checkbox-group {
    margin: 15px 0;
}

.cid-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 15px 0;
    font-size: 14px;
    line-height: 1.4;
    color: #555;
}

.cid-checkbox-label input[type="checkbox"] {
    margin-left: 10px;
    width: 18px;
    height: 18px;
    accent-color: #7367f0;
    cursor: pointer;
}

.cid-btn-primary {
    background: linear-gradient(135deg, #7367f0 0%, #9f8ffb 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px 25px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(115, 103, 240, 0.4);
    font-family: 'Vazirmatn', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cid-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(115, 103, 240, 0.6);
    background: linear-gradient(135deg, #6355d0 0%, #8070d8 100%);
}

.cid-btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(115, 103, 240, 0.4);
}

/* Button Loading State and Spinner */
.cid-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 2px 10px rgba(115, 103, 240, 0.2) !important;
}

.btn-spinner {
    display: none;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 16px;
    height: 16px;
    margin-right: 5px;
}

.spinner circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

/* Spinner Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cid-form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

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

.cid-form-group-half {
    flex: 0 0 calc(50% - 20px);
    margin: 0 10px;
}

.cid-auth-links {
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 20px;
    margin-top: 25px;
    position: relative;
}

.cid-auth-links p {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
}

.cid-link {
    color: #7367f0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.cid-link:hover {
    color: #5b50cc;
    transform: translateY(-1px);
}

.cid-link .link-icon {
    width: 16px;
    height: 16px;
}

.separator {
    margin: 0 10px;
    color: #ccc;
}

.cid-notification {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    animation: notificationFadeIn 0.3s ease-out;
}

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

.cid-notification-success {
    background-color: #e8f5e9;
    border: 1px solid #81c784;
    color: #2e7d32;
}

.cid-notification-error {
    background-color: #ffebee;
    border: 1px solid #e57373;
    color: #c62828;
}

.cid-notification-icon {
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cid-notification-icon svg {
    width: 24px;
    height: 24px;
}

.cid-notification-message {
    flex-grow: 1;
    font-size: 14px;
    line-height: 1.5;
    padding-right: 30px;
    text-align: right;
}

.cid-notification-close {
    position: absolute;
    top: 10px;
    left: 10px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.cid-notification-close:hover {
    opacity: 1;
}

.cid-auth-footer {
    text-align: center;
    margin-top: 20px;
    color: rgba(0, 0, 0, 0.5);
    font-size: 12px;
}

/* Focus state enhancement for accessibility */
.cid-form-input:focus,
.cid-form-select:focus,
.cid-form-textarea:focus,
.cid-btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(115, 103, 240, 0.4);
}

/* Loading indicator for form submission */
.cid-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =================================
   ADVANCED PASSWORD STRENGTH ENHANCEMENTS
   ================================= */

/* Progress bars - for password strength */
.cid-progress-bar {
    height: 6px;
    background: linear-gradient(90deg, #e9ecef 0%, #dee2e6 100%);
    border-radius: 10px;
    margin: 6px 0;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.5);
}

.cid-progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), transparent);
    border-radius: 10px;
}

.cid-progress-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cid-progress-bar-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Enhanced Progress States */
.cid-progress-weak {
    width: 25%;
    background: linear-gradient(90deg, #ff4d4d, #ff6b6b);
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.3);
}

.cid-progress-medium {
    width: 50%;
    background: linear-gradient(90deg, #ffaa00, #ffc107);
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.3);
}

.cid-progress-strong {
    width: 75%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
}

.cid-progress-very-strong {
    width: 100%;
    background: linear-gradient(90deg, #29cc97, #1dd1a1);
    box-shadow: 0 0 10px rgba(41, 204, 151, 0.4);
}

.cid-progress-bar::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(115, 103, 240, 0.2), transparent);
    border-radius: 12px;
    opacity: 0;
    animation: borderGlow 2s infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Pulsing Animation for Strong Passwords */
.cid-progress-strong .cid-progress-bar-fill,
.cid-progress-very-strong .cid-progress-bar-fill {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scaleY(1); }
    50% { transform: scaleY(1.1); }
    100% { transform: scaleY(1); }
}

/* Enhanced Shimmer Effect */
.cid-progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.8),
        transparent
    );
    animation: shimmerEnhanced 2.5s infinite;
}

@keyframes shimmerEnhanced {
    0% { left: -100%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

/* Password Strength Score with Badge Effect */
.cid-password-strength-score {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid rgba(115, 103, 240, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cid-password-strength-score::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transition: left 0.5s ease;
}

.cid-password-strength-score.animate::before {
    left: 100%;
}

.cid-password-strength-score.weak {
    background: linear-gradient(135deg, #ffe6e6, #ffcccc);
    color: #cc0000;
    border-color: #ff4d4d;
}

.cid-password-strength-score.medium {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    border-color: #ffaa00;
}

.cid-password-strength-score.strong {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border-color: #2ecc71;
}

.cid-password-strength-score.very-strong {
    background: linear-gradient(135deg, #d1f2eb, #a3e4d7);
    color: #0c5460;
    border-color: #29cc97;
}

/* Advanced Password Requirements with Icons */
.cid-password-requirement {
    position: relative;
    padding: 4px 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cid-password-requirement::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #29cc97, #1dd1a1);
    transition: width 0.4s ease;
}

.cid-password-requirement.met::after {
    width: 100%;
}

.cid-password-requirement.met {
    transform: translateX(2px);
}

/* Floating Label Effect for Password Input */
.cid-form-group.password-group {
    position: relative;
}

.cid-form-group.password-group .cid-form-label {
    position: absolute;
    top: 15px;
    left: 15px;
    background: transparent;
    padding: 0 5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 2;
}

.cid-form-group.password-group .cid-form-input:focus + .cid-form-label,
.cid-form-group.password-group .cid-form-input:not(:placeholder-shown) + .cid-form-label {
    top: -8px;
    left: 12px;
    font-size: 12px;
    color: #7367f0;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 4px;
}

.password-toggle {
    position: absolute !important;
    left: 12px !important; /* Changed from right to left for RTL */
    top: 50% !important;
    transform: translateY(-50%) !important; /* Original positioning - works for both forms */
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    color: #7367f0 !important;
    opacity: 0.7 !important;
    transition: all 0.3s ease !important;
    z-index: 100 !important; /* Increased z-index for better positioning */
    padding: 4px !important;
    border-radius: 4px !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    outline: none !important;
}

.password-toggle:hover {
    opacity: 1 !important;
    background: rgba(115, 103, 240, 0.1) !important;
}

.password-toggle:focus {
    opacity: 1 !important;
    background: rgba(115, 103, 240, 0.15) !important;
    box-shadow: 0 0 0 2px rgba(115, 103, 240, 0.3) !important;
}

.password-toggle svg {
    width: 18px !important;
    height: 18px !important;
    transition: transform 0.3s ease !important;
    pointer-events: none !important;
}

.password-toggle:active svg {
    transform: scale(0.9) !important;
}

/* Enhanced Password Toggle Positioning for Both Login Forms */
/* Specific targeting for shortcode and template forms */
#cid-login-form .password-toggle,
.cid-login-form .password-toggle,
.cid-auth-form .password-toggle,
form[id*="login"] .password-toggle {
    position: absolute !important;
    left: 12px !important;
    right: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important; /* Updated positioning - for RTL layout */
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    color: #7367f0 !important;
    opacity: 0.7 !important;
    transition: all 0.3s ease !important;
    z-index: 100 !important;
    padding: 4px !important;
    border-radius: 4px !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    outline: none !important;
}

/* Password input padding for both forms */
#cid-login-form .cid-form-input[type="password"],
.cid-login-form .cid-form-input[type="password"],
.cid-auth-form .cid-form-input[type="password"],
form[id*="login"] .cid-form-input[type="password"] {
    padding-left: 45px !important;
    padding-right: 15px !important;
}

/* Container positioning for both forms */
#cid-login-form .cid-form-group > div,
.cid-login-form .cid-form-group > div,
.cid-auth-form .cid-form-group > div,
form[id*="login"] .cid-form-group > div {
    position: relative !important;
}

/* Hover states for both forms */
#cid-login-form .password-toggle:hover,
.cid-login-form .password-toggle:hover,
.cid-auth-form .password-toggle:hover,
form[id*="login"] .password-toggle:hover {
    opacity: 1 !important;
    background: rgba(115, 103, 240, 0.1) !important;
}

/* Focus states for both forms */
#cid-login-form .password-toggle:focus,
.cid-login-form .password-toggle:focus,
.cid-auth-form .password-toggle:focus,
form[id*="login"] .password-toggle:focus {
    opacity: 1 !important;
    background: rgba(115, 103, 240, 0.15) !important;
    box-shadow: 0 0 0 2px rgba(115, 103, 240, 0.3) !important;
}

/* Active states for both forms */
#cid-login-form .password-toggle:active svg,
.cid-login-form .password-toggle:active svg,
.cid-auth-form .password-toggle:active svg,
form[id*="login"] .password-toggle:active svg {
    transform: scale(0.9) !important;
}

/* SVG icon consistency for both forms */
#cid-login-form .password-toggle svg,
.cid-login-form .password-toggle svg,
.cid-auth-form .password-toggle svg,
form[id*="login"] .password-toggle svg {
    width: 18px !important;
    height: 18px !important;
    transition: transform 0.3s ease !important;
    pointer-events: none !important;
}

/* Force visibility of password toggle in both forms */
#cid-login-form .password-toggle,
.cid-login-form .password-toggle,
.cid-auth-form .password-toggle,
form[id*="login"] .password-toggle {
    visibility: visible !important;
    display: flex !important;
}

/* Remove any conflicting margin/padding */
#cid-login-form .password-toggle,
.cid-login-form .password-toggle,
.cid-auth-form .password-toggle,
form[id*="login"] .password-toggle {
    margin: 0 !important;
    left: 12px !important;
    right: auto !important; /* Force left positioning */
}

/* Registration Wizard Styles */
.cid-registration-wizard {
    width: 100%;
    max-width: 600px;
}

.cid-wizard-progress {
    margin-bottom: 30px;
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 20px;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 1;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.step-label {
    font-size: 12px;
    color: #000000; /* Changed to black for desktop */
    text-align: center;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: rgba(255, 255, 255, 1);
    color: #7367f0;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.progress-step.active .step-label {
    color: #666666; /* Changed to gray for highlighted text */
    font-weight: 600;
}

.progress-step.completed .step-number {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.progress-step.completed .step-label {
    color: rgba(255, 255, 255, 0.9);
}

.wizard-step {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.immigration-type-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.immigration-type-card {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.immigration-type-card .card-content {
    display: block;
    padding: 25px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.immigration-type-card:hover .card-content {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    border-color: rgba(115, 103, 240, 0.3);
}

.immigration-type-card.selected .card-content {
    border-color: #7367f0 !important;
    background: rgba(115, 103, 240, 0.1) !important;
    box-shadow: 0 12px 35px rgba(115, 103, 240, 0.3) !important;
    transform: translateY(-3px) !important;
}

.immigration-type-card.selected .card-content h4 {
    color: #7367f0 !important;
}

.immigration-type-card.selected .card-content .card-icon {
    color: #7367f0 !important;
    transform: scale(1.1) !important;
}

.card-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
    display: block;
}

.immigration-type-card h4 {
    font-size: 1.2em;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.immigration-type-card p {
    font-size: 0.9em;
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}

.wizard-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 15px;
}

.cid-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.cid-btn-primary {
    background: linear-gradient(135deg, #7367f0 0%, #9c88ff 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(115, 103, 240, 0.3);
}

.cid-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(115, 103, 240, 0.4);
}

.cid-btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cid-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.cid-checkbox-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    cursor: pointer !important;
    line-height: 1.6 !important;
    margin: 15px 0 !important;
    padding: 10px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    position: relative !important;
}

.cid-checkbox-wrapper:hover {
    background: rgba(255, 255, 255, 0.05);
}

.cid-checkbox-wrapper input[type="checkbox"] {
    position: absolute !important;
    opacity: 0 !important;
    cursor: pointer !important;
    height: 20px !important;
    width: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    z-index: 2 !important;
}

.cid-checkbox-checkmark {
    display: flex !important;
    width: 20px !important;
    height: 20px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 4px !important;
    position: relative !important;
    flex-shrink: 0 !important;
    transition: all 0.3s ease !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 1 !important;
}

.cid-checkbox-wrapper:hover .cid-checkbox-checkmark {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
}

.cid-checkbox-wrapper input[type="checkbox"]:checked + .cid-checkbox-checkmark {
    background: #7367f0;
    border-color: #7367f0;
    transform: scale(1.05);
}

.cid-checkbox-wrapper input[type="checkbox"]:checked + .cid-checkbox-checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
    animation: checkmarkPop 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

/* Prevent any duplicate checkmarks */
.cid-checkbox-wrapper input[type="checkbox"]:checked + .cid-checkbox-checkmark::before {
    display: none !important;
}

/* Hide browser default checkbox styling but keep it functional */
.cid-checkbox-wrapper input[type="checkbox"] {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    position: absolute !important;
    opacity: 0 !important;
    height: 20px !important;
    width: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    z-index: 2 !important;
    cursor: pointer !important;
}

/* Ensure our custom checkmark is always visible */
.cid-checkbox-wrapper .cid-checkbox-checkmark {
    display: flex !important;
    width: 20px !important;
    height: 20px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 4px !important;
    position: relative !important;
    flex-shrink: 0 !important;
    transition: all 0.3s ease !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 1 !important;
}

/* Override any conflicting mobile rules */
@media (max-width: 480px) {
    .cid-checkbox-wrapper .cid-checkbox-checkmark {
        display: flex !important;
        width: 20px !important;
        height: 20px !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border: 2px solid rgba(255, 255, 255, 0.4) !important;
        border-radius: 4px !important;
        position: relative !important;
        flex-shrink: 0 !important;
        transition: all 0.3s ease !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 1 !important;
    }
    
    .cid-checkbox-wrapper input[type="checkbox"] {
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
        position: absolute !important;
        opacity: 0 !important;
        height: 20px !important;
        width: 20px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        background: none !important;
        z-index: 2 !important;
        cursor: pointer !important;
    }
}

/* Final override to ensure checkbox is always visible */
.cid-form-group .cid-checkbox-wrapper .cid-checkbox-checkmark {
    display: flex !important;
    width: 20px !important;
    height: 20px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 4px !important;
    position: relative !important;
    flex-shrink: 0 !important;
    transition: all 0.3s ease !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 1 !important;
}

/* Most aggressive override - this should definitely work */
.cid-checkbox-checkmark {
    display: flex !important;
    width: 20px !important;
    height: 20px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 4px !important;
    position: relative !important;
    flex-shrink: 0 !important;
    transition: all 0.3s ease !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 1 !important;
}

/* Ultimate override for checkbox visibility */
.cid-form-group .cid-checkbox-wrapper .cid-checkbox-checkmark,
.cid-checkbox-wrapper .cid-checkbox-checkmark,
.cid-checkbox-checkmark {
    display: flex !important;
    width: 20px !important;
    height: 20px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid #7367f0 !important;
    border-radius: 4px !important;
    position: relative !important;
    flex-shrink: 0 !important;
    transition: all 0.3s ease !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 1 !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-width: 20px !important;
    min-height: 20px !important;
    box-shadow: 0 0 5px rgba(115, 103, 240, 0.3) !important;
}

/* Force checkbox visibility with maximum specificity */
.cid-form-group .cid-checkbox-wrapper div.cid-checkbox-checkmark,
.cid-checkbox-wrapper div.cid-checkbox-checkmark,
div.cid-checkbox-checkmark {
    display: flex !important;
    width: 20px !important;
    height: 20px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid #7367f0 !important;
    border-radius: 4px !important;
    position: relative !important;
    flex-shrink: 0 !important;
    transition: all 0.3s ease !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 1 !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-width: 20px !important;
    min-height: 20px !important;
    box-shadow: 0 0 5px rgba(115, 103, 240, 0.3) !important;
}



@keyframes checkmarkPop {
    0% { transform: translate(-50%, -50%) scale(0); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.cid-checkbox-text {
    color: rgba(255, 255, 255, 1) !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    display: flex !important;
    align-items: center !important;
    flex: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    text-overflow: unset !important;
    clip: unset !important;
}

.cid-checkbox-text a {
    color: #7367f0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.cid-checkbox-text a:hover {
    color: #5a4fcf;
    text-decoration: none !important;
}

/* Password strength meter inside form step */
.cid-password-strength-container {
    margin-top: 10px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.cid-password-strength-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.cid-password-strength-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cid-password-strength-label {
    font-size: 12px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cid-password-strength-score {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cid-password-strength-text {
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.cid-password-strength-text::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    transition: all 0.3s ease;
}

.cid-password-requirements {
    margin-top: 8px;
    padding: 8px 0;
    border-top: 1px solid rgba(115, 103, 240, 0.1);
}

.cid-password-requirement {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    margin: 3px 0;
    transition: all 0.3s ease;
    opacity: 0.6;
    position: relative;
}

.cid-password-requirement.met {
    opacity: 1;
    color: #29cc97;
    transform: translateX(2px);
}

.cid-password-requirement.met::before {
    content: '✓';
    color: #29cc97;
    font-weight: bold;
    font-size: 12px;
}

.cid-password-requirement:not(.met)::before {
    content: '○';
    color: #ccc;
    font-size: 12px;
}

/* Progress bar for password strength */
.cid-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 6px 0;
}

.cid-progress-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: all 0.4s ease;
    background: #ddd;
    width: 0%;
}

.cid-progress-bar-fill.cid-progress-weak {
    background: linear-gradient(90deg, #ff6b6b, #ff5252);
    width: 40%;
}

.cid-progress-bar-fill.cid-progress-medium {
    background: linear-gradient(90deg, #ffd93d, #ffb74d);
    width: 60%;
}

.cid-progress-bar-fill.cid-progress-strong {
    background: linear-gradient(90deg, #6bcf7f, #4caf50);
    width: 80%;
}

.cid-progress-bar-fill.cid-progress-very-strong {
    background: linear-gradient(90deg, #29cc97, #1dd1a1);
    width: 100%;
}

/* ==========================================================================
   RESPONSIVE DESIGN - MOBILE FIRST APPROACH
   ========================================================================== */

/* Base Mobile Styles (320px and up) */
@media (max-width: 480px) {
    .cid-auth-page {
        padding: 5px;
        align-items: flex-start;
        padding-top: 10px;
        min-height: 100vh;
        overflow-x: hidden;
    }
    
    .cid-auth-container {
        max-width: 100%;
        width: 100%;
        margin: 0;
        padding: 0 5px;
    }
    
    .cid-auth-card {
        padding: 15px;
        border-radius: 12px;
        margin: 0;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(8px);
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Registration Wizard Mobile */
    .cid-registration-wizard {
        width: 100%;
        overflow-x: hidden;
    }
    
    .cid-auth-header h1 {
        font-size: 18px;
        margin-bottom: 8px;
        text-align: center;
    }
    
    .cid-auth-header p {
        font-size: 13px;
        margin-bottom: 15px;
        line-height: 1.4;
        text-align: center;
    }

    /* Wizard Progress - Mobile Vertical Layout */
    .cid-wizard-progress {
        margin-bottom: 20px;
        overflow-x: hidden;
    }
    
    .progress-bar {
        flex-direction: column;
        gap: 8px;
        position: relative;
    }
    
    .progress-bar::before {
        display: none; /* Remove connecting line on mobile */
    }
    
    .progress-step {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        text-align: right;
        width: 100%;
        padding: 8px 12px;
        border-radius: 8px;
        background: rgba(115, 103, 240, 0.05);
        border: 1px solid rgba(115, 103, 240, 0.1);
        transition: all 0.3s ease;
    }
    
    .progress-step.active {
        background: rgba(115, 103, 240, 0.15);
        border: 2px solid #7367f0;
        color: #ffffff !important;
    }
    
    .progress-step.completed {
        background: rgba(46, 204, 151, 0.15);
        border: 2px solid #2ecc97;
        color: #ffffff !important;
    }
    
    .step-number {
        width: 25px;
        height: 25px;
        line-height: 23px;
        font-size: 12px;
        margin-bottom: 0;
        margin-left: 8px;
        flex-shrink: 0;
    }
    
    .step-label {
        font-size: 12px;
        font-weight: 600;
        margin: 0;
        flex: 1;
        color: #333333 !important;
    }

    /* Wizard Steps - Mobile */
    .wizard-step {
        width: 100%;
        overflow-x: hidden;
    }
    
    .wizard-step h3 {
        font-size: 16px;
        margin-bottom: 10px;
        text-align: center;
    }
    
    .wizard-step p {
        font-size: 13px;
        margin-bottom: 15px;
        text-align: center;
        line-height: 1.4;
    }

    /* Immigration Type Cards - Mobile */
    .immigration-type-cards {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        margin-bottom: 20px;
    }
    
    .immigration-type-card {
        width: 100%;
        margin: 0;
        padding: 15px;
        text-align: center;
        border-radius: 8px;
        transition: all 0.3s ease;
    }
    
    .immigration-type-card .card-content {
        padding: 15px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .immigration-type-card h4 {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .immigration-type-card p {
        font-size: 12px;
        line-height: 1.3;
        margin: 0;
    }

    /* Form Elements - Mobile */
    .cid-form-group {
        margin-bottom: 15px;
        width: 100%;
    }
    
    .cid-form-row {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .cid-form-label {
        font-size: 13px;
        margin-bottom: 8px;
        display: block;
        color: #444;
        font-weight: 600;
    }
    
    .cid-form-input,
    .cid-form-select {
        padding: 14px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 12px;
        min-height: 44px; /* Touch-friendly */
        width: 100%;
        box-sizing: border-box;
        border: 2px solid #e0e6ed;
        background: #fff;
        transition: all 0.3s ease;
    }
    
    .cid-form-input:focus,
    .cid-form-select:focus {
        border-color: #7367f0;
        outline: none;
        box-shadow: 0 0 0 3px rgba(115, 103, 240, 0.15);
    }
    
    /* Password wrapper and toggle for mobile */
    .cid-password-wrapper {
        position: relative;
        width: 100%;
    }
    
    .cid-password-wrapper input {
        padding-left: 50px !important;
        padding-right: 14px !important;
    }
    
    .password-toggle {
        position: absolute;
        left: 10px;
        right: auto;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        cursor: pointer;
        color: #7367f0;
        opacity: 0.7;
        transition: all 0.3s ease;
        z-index: 10;
        padding: 6px;
        border-radius: 6px;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .password-toggle:hover {
        opacity: 1;
        background: rgba(115, 103, 240, 0.1);
    }
    
    /* Enhanced checkbox styling for mobile */
    .cid-checkbox-group {
        margin: 20px 0;
    }
    
    .cid-checkbox-label {
        display: flex;
        align-items: center;
        cursor: pointer;
        line-height: 1.5;
        gap: 12px;
        font-size: 14px;
        color: #555;
    }
    
    .cid-checkbox-label input[type="checkbox"] {
        margin: 0;
        margin-top: 2px;
        width: 18px;
        height: 18px;
        accent-color: #7367f0;
        flex-shrink: 0;
    }
    
    .checkbox-text {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        line-height: 1.5;
    }

    /* Wizard Navigation - Mobile */
    .wizard-navigation {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
        width: 100%;
    }
    
    .cid-btn {
        width: 100%;
        padding: 12px 16px;
        font-size: 15px;
        border-radius: 8px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .cid-btn-primary {
        order: 1;
        background: #7367f0;
        color: #fff;
    }
    
    .cid-btn-primary:hover {
        background: #5e56cc;
        transform: translateY(-1px);
    }
    
    .cid-btn-secondary {
        order: 2;
        background: rgba(115, 103, 240, 0.1);
        color: #7367f0;
        border: 2px solid #7367f0;
    }
    
    .cid-btn-secondary:hover {
        background: rgba(115, 103, 240, 0.2);
    }
    
    /* Error and Success Messages - Mobile */
    .cid-form-error-container {
        margin-bottom: 15px;
        width: 100%;
    }
    
    .cid-notification {
        padding: 10px 15px;
        border-radius: 8px;
        font-size: 14px;
        width: 100%;
        box-sizing: border-box;
    }
}
    
    .cid-btn {
        width: 100%;
        padding: 12px 16px;
        font-size: 15px;
        border-radius: 8px;
        min-height: 44px;
    }
    
    /* Wizard specific styles */
    .cid-wizard-progress {
        margin-bottom: 20px;
    }
    
    .progress-bar {
        flex-direction: column;
        gap: 8px;
    }
    
    .progress-step {
        flex-direction: row;
        justify-content: flex-start;
        text-align: right;
        width: 100%;
        padding: 8px 12px;
        border-radius: 8px;
        background: rgba(115, 103, 240, 0.05);
    }
    
    .step-number {
        width: 25px;
        height: 25px;
        line-height: 23px;
        font-size: 12px;
        margin-bottom: 0;
        margin-left: 8px;
    }
    
    .step-label {
        font-size: 12px;
        font-weight: 600;
    }

/* Mobile Landscape and Small Tablets (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .cid-auth-page {
        padding: 15px;
        align-items: center;
    }
    
    .cid-auth-container {
        max-width: 90%;
        width: 90%;
    }
    
    .cid-auth-card {
        padding: 25px;
        border-radius: 15px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .cid-registration-wizard {
        width: 100%;
        overflow-x: hidden;
    }
    
    .cid-auth-header h1 {
        font-size: 22px;
        margin-bottom: 15px;
    }
    
    .cid-auth-header p {
        font-size: 14px;
        margin-bottom: 20px;
    }

    /* Wizard Progress - Mobile Landscape */
    .cid-wizard-progress {
        margin-bottom: 25px;
    }
    
    .progress-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .progress-bar::before {
        display: none;
    }
    
    .progress-step {
        flex-direction: row;
        justify-content: flex-start;
        width: 100%;
        padding: 12px 15px;
        border-radius: 10px;
        background: rgba(115, 103, 240, 0.05);
        border: 1px solid rgba(115, 103, 240, 0.1);
    }
    
    .progress-step.active {
        background: rgba(115, 103, 240, 0.15);
        border: 2px solid #7367f0;
    }
    
    .progress-step.completed {
        background: rgba(46, 204, 151, 0.15);
        border: 2px solid #2ecc97;
    }
    
    .step-number {
        width: 30px;
        height: 30px;
        line-height: 26px;
        font-size: 14px;
        margin-left: 10px;
        margin-bottom: 0;
    }
    
    .step-label {
        font-size: 14px;
    }

    /* Immigration Type Cards */
    .immigration-type-cards {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .immigration-type-card {
        width: 100%;
        padding: 20px;
        text-align: center;
    }
    
    .immigration-type-card h4 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .immigration-type-card p {
        font-size: 13px;
        line-height: 1.4;
    }

    /* Form Elements */
    .cid-form-group {
        margin-bottom: 18px;
    }
    
    .cid-form-row {
        display: flex;
        flex-direction: column;
        gap: 18px;
    }
    
    .cid-form-input,
    .cid-form-select {
        padding: 12px 16px;
        font-size: 16px;
        border-radius: 10px;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Navigation */
    .wizard-navigation {
        flex-direction: column;
        gap: 12px;
    }
    
    .cid-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
        border-radius: 10px;
    }
}

/* Tablets (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .cid-auth-container {
        max-width: 600px;
    }
    
    .cid-auth-card {
        padding: 35px;
        border-radius: 18px;
    }
    
    .cid-auth-header h1 {
        font-size: 28px;
    }
    
    .cid-auth-header p {
        font-size: 15px;
    }
    
    /* Form layout improvements */
    .cid-form-row {
        display: flex;
        gap: 20px;
        margin-bottom: 20px;
    }
    
    .cid-form-row .cid-form-group {
        flex: 1;
        margin-bottom: 0;
    }
    
    /* Wizard Progress - Horizontal on tablets */
    .progress-bar {
        flex-direction: row;
        gap: 0;
    }
    
    .progress-step {
        flex: 1;
        flex-direction: column;
        text-align: center;
        padding: 15px 10px;
    }
    
    .step-number {
        margin-bottom: 8px;
        margin-left: 0;
    }
}

/* Desktop (1025px and up) */
@media (min-width: 1025px) {
    .cid-auth-container {
        max-width: 700px;
    }
    
    .cid-auth-card {
        padding: 40px;
        border-radius: 20px;
    }
    
    /* Enhanced form layout for desktop */
    .cid-form-row {
        display: flex;
        gap: 25px;
        margin-bottom: 25px;
    }
    
    .cid-form-row .cid-form-group {
        flex: 1;
        margin-bottom: 0;
    }
    
    /* Immigration type cards grid */
    .immigration-type-cards {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
        margin-bottom: 25px;
    }
    
    .immigration-type-card {
        transition: all 0.3s ease;
        cursor: pointer;
    }
    
    .immigration-type-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(115, 103, 240, 0.2);
    }
}

/* High-resolution screens */
@media (min-width: 1200px) {
    .cid-auth-container {
        max-width: 800px;
    }
    
    .immigration-type-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .cid-btn,
    .immigration-type-card,
    .cid-form-input,
    .cid-form-select {
        min-height: 44px; /* Apple's recommended minimum */
    }
    
    .cid-form-input,
    .cid-form-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Larger touch targets */
    .progress-step {
        min-height: 50px;
        padding: 12px 15px;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        line-height: 31px;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .cid-auth-card,
    .cid-btn,
    .immigration-type-card,
    .progress-step,
    .cid-form-input {
        transition: none;
        animation: none;
    }
    
    .cid-auth-backdrop {
        animation: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .cid-auth-card {
        background: #ffffff;
        border: 2px solid #000000;
    }
    
    .cid-form-input,
    .cid-form-select {
        border: 2px solid #000000;
        background: #ffffff;
    }
    
    .cid-btn-primary {
        background: #000000;
        color: #ffffff;
        border: 2px solid #000000;
    }
    
    .progress-step.active {
        background: #000000;
        color: #ffffff;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .cid-auth-page {
        background-color: #0d1117;
    }
    
    .cid-auth-backdrop {
        background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    }
    
    .cid-auth-card {
        background: rgba(22, 27, 34, 0.95);
        color: #f0f6fc;
        border: 1px solid rgba(240, 246, 252, 0.1);
    }
    
    .cid-form-input,
    .cid-form-select {
        background-color: rgba(240, 246, 252, 0.05);
        border-color: rgba(240, 246, 252, 0.2);
        color: #f0f6fc;
    }
    
    .cid-form-input::placeholder {
        color: rgba(240, 246, 252, 0.6);
    }
    
    .immigration-type-card {
        background: rgba(240, 246, 252, 0.03);
        border-color: rgba(240, 246, 252, 0.1);
        color: #f0f6fc;
    }
    
    .progress-step {
        background: rgba(240, 246, 252, 0.05);
        color: #f0f6fc;
    }
    
    .progress-step.active {
        background: rgba(115, 103, 240, 0.2);
        border-color: #7367f0;
    }
}

/* Print styles */
@media print {
    .cid-auth-page {
        background: white;
        color: black;
    }
    
    .cid-auth-card {
        background: white;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .cid-btn,
    .wizard-navigation {
        display: none;
    }
}

/* Orientation-specific styles */
@media (orientation: landscape) and (max-height: 600px) {
    .cid-auth-page {
        padding: 10px;
        align-items: flex-start;
    }
    
    .cid-auth-card {
        margin-top: 10px;
        margin-bottom: 10px;
    }
    
    .cid-auth-header {
        margin-bottom: 15px;
    }
    
    .cid-wizard-progress {
        margin-bottom: 15px;
    }
}

/* ==========================================================================
   ACCESSIBILITY ENHANCEMENTS
   ========================================================================== */

/* Focus indicators */
.cid-form-input:focus,
.cid-form-select:focus,
.cid-btn:focus,
.immigration-type-card:focus {
    outline: 2px solid #7367f0;
    outline-offset: 2px;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip links */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* ==========================================================================
   SIMPLE LOGIN FORM FIX
   Clean mobile styles without complex positioning
   ========================================================================== */

@media screen and (max-width: 768px) {
    /* Remove any transforms or complex positioning */
    .cid-auth-card::before,
    .cid-auth-card::after {
        display: none !important;
    }
    
    .cid-auth-card:hover {
        transform: none !important;
    }
    
    .cid-auth-backdrop {
        display: none !important;
    }
}

/* Mobile-specific select styling */
@media screen and (max-width: 768px) {
    /* Improve select dropdown styling for mobile */
    .cid-form-select {
        appearance: none !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        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='%23333' 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") !important;
        background-repeat: no-repeat !important;
        background-position: left 12px center !important;
        background-size: 16px !important;
        padding-left: 40px !important;
        padding-right: 15px !important;
        cursor: pointer !important;
        min-height: 50px !important;
        line-height: 1.4 !important;
        text-overflow: ellipsis !important;
    }
    
    .cid-form-select:focus {
        outline: none !important;
        border-color: #7367f0 !important;
        box-shadow: 0 0 0 3px rgba(115, 103, 240, 0.2) !important;
    }
    
    /* Style select options for better readability */
    .cid-form-select option {
        padding: 10px !important;
        font-size: 16px !important;
        color: #333 !important;
        background: #ffffff !important;
    }
    
    .cid-form-select option:checked {
        background: #7367f0 !important;
        color: #ffffff !important;
    }
}

/* RTL specific adjustments for select */
[dir="rtl"] .cid-form-select {
    background-position: right 12px center !important;
    padding-right: 40px !important;
    padding-left: 15px !important;
}

/* Fix progress bar text contrast for registration wizard */
.cid-registration-wizard .cid-wizard-progress .progress-step .step-label {
    color: #333333 !important;
}
.cid-registration-wizard .cid-wizard-progress .progress-step.active {
    background-color: #7367f0 !important;
    color: #ffffff !important;
}
.cid-registration-wizard .cid-wizard-progress .progress-step.active .step-label {
    color: #ffffff !important;
}
.cid-registration-wizard .cid-wizard-progress .progress-step.completed {
    background-color: #2ecc97 !important;
    color: #ffffff !important;
}
.cid-registration-wizard .cid-wizard-progress .progress-step.completed .step-label {
    color: #ffffff !important;
}

/* Enhanced selected card styling without radio buttons */
.immigration-type-card.selected .card-content {
    border-color: #7367f0 !important;
    background: rgba(115, 103, 240, 0.1) !important;
    box-shadow: 0 12px 35px rgba(115, 103, 240, 0.3) !important;
    transform: translateY(-3px) !important;
}

.immigration-type-card.selected .card-content h4 {
    color: #7367f0 !important;
}

.immigration-type-card.selected .card-content .card-icon {
    color: #7367f0 !important;
    transform: scale(1.1) !important;
}

/* Wizard navigation button improvements */
.wizard-navigation {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-top: 25px !important;
    padding-top: 20px !important;
    border-top: 1px solid rgba(0,0,0,0.1) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.wizard-navigation button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 24px !important;
    min-height: 48px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    opacity: 1 !important;
    visibility: visible !important;
}

#next-step-btn {
    background-color: #7367f0 !important;
    color: white !important;
}

#prev-step-btn {
    background-color: #6c757d !important;
    color: white !important;
}

#submit-registration-btn {
    background-color: #28c76f !important;
    color: white !important;
}

.wizard-navigation button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2) !important;
}

/* --- Button and Wizard Navigation Fixes --- */
.wizard-navigation button,
.cid-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    text-align: center !important;
    width: 100% !important;
    font-size: 16px !important;
}

.wizard-navigation button svg,
.cid-btn svg {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
}

/* Icon on right for prev, left for next/submit */
#prev-step-btn svg { order: -1 !important; margin-right: 8px !important; margin-left: 0 !important; }
#next-step-btn svg, #submit-registration-btn svg { order: 1 !important; margin-left: 8px !important; margin-right: 0 !important; }

/* Persian date modal footer buttons: center and full width on mobile */
@media (max-width: 600px) {
  .persian-date-footer {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 10px 0 !important;
  }
  .persian-date-footer button {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    gap: 8px !important;
  }
}

@media (max-width: 600px) {
  .step-number {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    border-radius: 50% !important;
    background: #7367f0 !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    margin: 0 10px 0 0 !important;
    box-shadow: 0 2px 8px rgba(115,103,240,0.12) !important;
    border: 2px solid #fff !important;
  }
  .progress-step {
    min-height: 40px !important;
    padding: 8px 12px !important;
    gap: 10px !important;
  }
}


