/* Multi-Step Insurance Form Styles */

.insurance-form-page {
    color: #333;
    line-height: 1.6;
    padding: 2rem 0;
    width: 100%;
}

.insurance-form-page .container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.form-header {
    background: white;
    color: #333;
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid #e1e5e9;
}

.form-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #8c8a89;
}

.form-header p {
    color: #666;
    font-size: 0.95rem;
}

.logo-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.logo-placeholder {
    width: 100px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #8c8a89;
    border-radius: 4px;
    overflow: hidden;
}

.logo-placeholder img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.progress-bar {
    height: 4px;
    background: #e1e5e9;
    position: relative;
    margin-top: 1.5rem;
    border-radius: 2px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #598e27 0%, #75c32c 100%);
    transition: width 0.3s ease;
    width: 12.5%;
    border-radius: 2px;
}

.progress-percentage {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #8c8a89;
    font-weight: 500;
}

.form-content {
    padding: 2rem;
}

.step {
    display: none;
}

.step.active {
    display: block;
}

.step-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-weight: 600;
}

.step p {
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.required-asterisk {
    color: #e74c3c;
    font-weight: bold;
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px; /* Prevent zoom on iOS - must be at least 16px */
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #2fc1ff;
    box-shadow: 0 0 0 3px rgba(47, 193, 255, 0.1);
}

.form-control.error {
    border-color: #e74c3c;
}

.error-message {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message.show {
    display: block;
}

.dob-container {
    display: flex;
    align-items: center;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 0;
    background: white;
    transition: border-color 0.3s ease;
    overflow: hidden;
}

.dob-container:focus-within {
    border-color: #2fc1ff;
    box-shadow: 0 0 0 3px rgba(47, 193, 255, 0.1);
}

.dob-container.error {
    border-color: #e74c3c;
}

.dob-input {
    border: none !important;
    outline: none !important;
    padding: 0.75rem;
    font-size: 16px; /* Prevent zoom on iOS - must be at least 16px */
    text-align: center;
    background: transparent !important;
    flex: 1;
    width: 32%;
}

.dob-input:focus {
    background: rgba(47, 193, 255, 0.05);
}

.dob-separator {
    color: #8c8a89;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0 0.5rem;
}

.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Button styles with high specificity */
.insurance-form-page .btn,
.insurance-form-page .button-group .btn {
    color: inherit !important;
    padding: 1.25rem !important;
    border: 2px solid #e1e5e9 !important;
    background: white !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    flex: 1 !important;
    min-width: 120px !important;
    text-decoration: none !important;
    display: inline-block !important;
    text-align: center !important;
}

.insurance-form-page .btn:hover,
.insurance-form-page .button-group .btn:hover {
    border-color: #2fc1ff !important;
    background: rgba(47, 193, 255, 0.05) !important;
}

.insurance-form-page .btn.selected,
.insurance-form-page .button-group .btn.selected {
    background: #2fc1ff !important;
    border-color: #2fc1ff !important;
    color: white !important;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.checkbox-btn {
    position: relative;
    cursor: pointer;
}

.checkbox-btn input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.insurance-form-page .checkbox-btn .btn {
    width: 100% !important;
    text-align: center !important;
    padding: 1rem !important;
    min-height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.insurance-form-page .checkbox-btn input[type="checkbox"]:checked + .btn {
    background: #2fc1ff !important;
    border-color: #2fc1ff !important;
    color: white !important;
}

.slider-container {
    margin: 1rem 0;
    position: relative;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

/* Slider styles with maximum specificity to override ALL theme styles */
.insurance-form-page .slider,
.insurance-form-page input[type="range"],
.insurance-form-page .slider-container .slider,
.insurance-form-page .slider-container input[type="range"],
.insurance-form-page .form-group .slider,
.insurance-form-page .form-group input[type="range"],
.insurance-form-page #amount,
.insurance-form-page #term {
    padding: 10px 5px !important;
    width: 100% !important;
    border-radius: 4px !important;
    background: #f2f2f2 !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    border: none !important;
    margin: 0 !important;
    box-shadow: none !important;
    font-size: inherit !important;
    line-height: inherit !important;
    vertical-align: baseline !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: auto !important;
}

/* Remove shadows from slider track and progress fill */
.insurance-form-page input[type="range"]::-webkit-slider-track {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    background: #f2f2f2 !important;
}

.insurance-form-page input[type="range"]::-webkit-slider-runnable-track {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    background: linear-gradient(to right, #2fc1ff 0%, #2fc1ff var(--slider-progress, 0%), #e1e5e9 var(--slider-progress, 0%), #e1e5e9 100%) !important;
}

.insurance-form-page input[type="range"]::-moz-range-track {
    box-shadow: none !important;
    -moz-box-shadow: none !important;
    background: #f2f2f2 !important;
}

.insurance-form-page input[type="range"]::-moz-range-progress {
    box-shadow: none !important;
    -moz-box-shadow: none !important;
    filter: none !important;
    background: #2fc1ff !important;
}

.insurance-form-page .slider::-webkit-slider-track,
.insurance-form-page input[type="range"]::-webkit-slider-track {
    width: 100% !important;
    height: 8px !important;
    cursor: pointer !important;
    background: #e1e5e9 !important;
    border-radius: 4px !important;
    border: none !important;
}

.insurance-form-page .slider::-webkit-slider-runnable-track,
.insurance-form-page input[type="range"]::-webkit-slider-runnable-track {
    width: 100% !important;
    height: 8px !important;
    cursor: pointer !important;
    background: linear-gradient(to right, #2fc1ff 0%, #2fc1ff var(--slider-progress, 0%), #e1e5e9 var(--slider-progress, 0%), #e1e5e9 100%) !important;
    border-radius: 4px !important;
    border: none !important;
}

.insurance-form-page .slider::-webkit-slider-thumb,
.insurance-form-page input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    background: #2fc1ff !important;
    cursor: pointer !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
    margin-top: -8px !important;
    border: none !important;
}

.insurance-form-page .slider::-moz-range-track,
.insurance-form-page input[type="range"]::-moz-range-track {
    width: 100% !important;
    height: 8px !important;
    cursor: pointer !important;
    background: #e1e5e9 !important;
    border-radius: 4px !important;
    border: none !important;
}

.insurance-form-page .slider::-moz-range-progress,
.insurance-form-page input[type="range"]::-moz-range-progress {
    height: 8px !important;
    background: #2fc1ff !important;
    border-radius: 4px !important;
}

.insurance-form-page .slider::-moz-range-thumb,
.insurance-form-page input[type="range"]::-moz-range-thumb {
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    background: #2fc1ff !important;
    cursor: pointer !important;
    border: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
    margin-top: -8px !important;
}

.slider-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2fc1ff;
    margin: 0;
}

.form-navigation {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e1e5e9;
}

.btn-nav {
    padding: 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-next {
    background: #2fc1ff;
    color: white;
}

.btn-next:hover {
    background: #1bb3f0;
}

.btn-submit {
    background: #75c32c;
    color: white;
    font-weight:600;
}

.btn-submit:hover {
    background: #6bb028;
}

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

.step-indicator {
    text-align: center;
    margin-bottom: 1rem;
    color: #8c8a89;
    font-size: 0.9rem;
}

.security-section {
    background: #f8f9fa;
    padding: 1.5rem 2rem;
    text-align: center;
    border-top: 1px solid #e1e5e9;
}

.security-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 0.75rem;
}

.security-logo .logo-placeholder {
    width: 60px;
    height: auto;
    font-size: 0.8rem;
    font-weight: 500;
    overflow: hidden;
}

.security-logo .logo-placeholder img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.security-text {
    color: #8c8a89;
    font-size: 0.75rem;
    margin: 0;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .insurance-form-page .container {
        margin: 1rem;
        border-radius: 8px;
    }

    .form-content {
        padding: 1.5rem;
    }

    .dob-container {
        flex-direction: row !important;
        gap: 0 !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .dob-input {
        font-size: 16px !important; /* Keep at 16px to prevent zoom on iOS */
        padding: 0.6rem 0.4rem !important;
        min-width: 0 !important;
        flex: 1 !important;
        width: auto !important;
        display: block !important;
    }

    .button-group {
        flex-direction: column;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }

    .form-navigation {
        justify-content: center;
    }

    .logo-section {
        gap: 1rem;
    }

    .logo-placeholder {
        width: 60px;
        height: 30px;
        font-size: 0.7rem;
    }

    .logo-placeholder img {
        max-width: 100%;
        max-height: 100%;
    }

    .security-section {
        padding: 1rem;
    }

    .security-logos {
        gap: 1rem;
    }

    .security-logo .logo-placeholder {
        width: 80px;
        height: 40px;
        font-size: 0.7rem;
    }

    .security-logo .logo-placeholder img {
        max-width: 100%;
        max-height: 100%;
    }
}

/* Additional mobile rules for iPhone and small screens */
@media (max-width: 480px) {
    .dob-container {
        flex-direction: row !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    .dob-input {
        flex: 1 !important;
        margin: 0 2px !important;
        min-width: 0 !important;
    }
}

/* iPhone specific fixes */
@media screen and (max-width: 414px) and (-webkit-min-device-pixel-ratio: 2) {
    .dob-container {
        flex-direction: row !important;
        display: flex !important;
    }
    
    .dob-input {
        flex: 1 !important;
        width: 30% !important;
    }
}