/* Mobile-specific fixes for Micro Loan Journey */
@media (max-width: 768px) {
    /* Employment Type Select Dropdown Fixes */
    #employmentType {
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
        background: white !important;
        border: 2px solid #e5e7eb !important;
        border-radius: 8px !important;
        padding: 12px 40px 12px 16px !important;
        font-size: 16px !important;
        line-height: 1.5 !important;
        width: 100% !important;
        cursor: pointer !important;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
        background-position: right 12px center !important;
        background-repeat: no-repeat !important;
        background-size: 16px !important;
        min-height: 48px !important;
    }

    #employmentType:focus {
        outline: none !important;
        border-color: #3b82f6 !important;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    }

    #employmentType option {
        padding: 12px !important;
        font-size: 16px !important;
        line-height: 1.5 !important;
        background: white !important;
        color: #374151 !important;
    }

    /* Fix for iOS Safari select styling */
    #employmentType::-webkit-outer-spin-button,
    #employmentType::-webkit-inner-spin-button {
        -webkit-appearance: none !important;
        margin: 0 !important;
    }

    /* Monthly Income Input Fixes */
    #monthlyIncome {
        -webkit-appearance: none !important;
        border: 2px solid #e5e7eb !important;
        border-radius: 8px !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
        line-height: 1.5 !important;
        width: 100% !important;
        min-height: 48px !important;
        background: white !important;
    }

    #monthlyIncome:focus {
        outline: none !important;
        border-color: #3b82f6 !important;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    }

    /* Company Name Input Fixes */
    #companyName {
        -webkit-appearance: none !important;
        border: 2px solid #e5e7eb !important;
        border-radius: 8px !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
        line-height: 1.5 !important;
        width: 100% !important;
        min-height: 48px !important;
        background: white !important;
    }

    #companyName:focus {
        outline: none !important;
        border-color: #3b82f6 !important;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    }

    /* Experience Select Dropdown Fixes */
    #experience {
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
        background: white !important;
        border: 2px solid #e5e7eb !important;
        border-radius: 8px !important;
        padding: 12px 40px 12px 16px !important;
        font-size: 16px !important;
        line-height: 1.5 !important;
        width: 100% !important;
        cursor: pointer !important;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
        background-position: right 12px center !important;
        background-repeat: no-repeat !important;
        background-size: 16px !important;
        min-height: 48px !important;
    }

    #experience:focus {
        outline: none !important;
        border-color: #3b82f6 !important;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    }

    #experience option {
        padding: 12px !important;
        font-size: 16px !important;
        line-height: 1.5 !important;
        background: white !important;
        color: #374151 !important;
    }

    /* Terms Checkbox Fixes */
    #termsCheck {
        width: 20px !important;
        height: 20px !important;
        margin-right: 12px !important;
        cursor: pointer !important;
    }

    .checkbox-group {
        display: flex !important;
        align-items: flex-start !important;
        margin: 20px 0 !important;
        padding: 16px !important;
        background: #f9fafb !important;
        border-radius: 8px !important;
        border: 1px solid #e5e7eb !important;
    }

    .checkbox-group label {
        font-size: 14px !important;
        line-height: 1.5 !important;
        color: #374151 !important;
        cursor: pointer !important;
        flex: 1 !important;
    }

    .checkbox-group a {
        color: #3b82f6 !important;
        text-decoration: underline !important;
    }

    /* Submit Button Mobile Fixes */
    #step5 .continue-btn {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        padding: 1rem 1.5rem !important;
        font-size: 1rem !important;
        border-radius: 0 !important;
        margin: 0 !important;
        font-weight: 600 !important;
        background: #16a34a !important;
        color: white !important;
        border: none !important;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15) !important;
        z-index: 999 !important;
        transition: all 0.3s ease !important;
        cursor: pointer !important;
        user-select: none !important;
        -webkit-tap-highlight-color: transparent !important;
        min-height: 60px !important;
    }

    #step5 .continue-btn:hover,
    #step5 .continue-btn:active {
        background: #15803d !important;
        transform: none !important;
    }

    #step5 .continue-btn:disabled {
        background: #9ca3af !important;
        cursor: not-allowed !important;
        opacity: 0.7 !important;
    }

    /* Form Grid Mobile Responsive */
    .form-grid-2 {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Form Section Spacing */
    .form-section {
        margin-bottom: 30px !important;
    }

    .form-section h3 {
        font-size: 18px !important;
        font-weight: 600 !important;
        color: #374151 !important;
        margin-bottom: 20px !important;
    }

    /* Form Group Spacing */
    .form-group {
        margin-bottom: 20px !important;
    }

    .form-group label {
        display: block !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        color: #374151 !important;
        margin-bottom: 8px !important;
    }

    /* Step 5 Content Padding */
    #step5 .form-card {
        padding-bottom: 100px !important;
    }

    #step5 .container {
        padding-bottom: 80px !important;
    }

    /* Employment tabs mobile fixes */
    .employment-tabs {
        display: flex !important;
        margin-bottom: 2rem !important;
        border-bottom: 2px solid #e5e7eb !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .tab-btn {
        flex: 1 !important;
        padding: 1rem 0.5rem !important;
        border: none !important;
        background: transparent !important;
        font-size: 0.9rem !important;
        font-weight: 500 !important;
        color: #6b7280 !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        border-bottom: 3px solid transparent !important;
        white-space: nowrap !important;
        min-width: 100px !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: rgba(59, 130, 246, 0.1) !important;
    }

    .tab-btn.active {
        color: #3b82f6 !important;
        border-bottom-color: #3b82f6 !important;
        background: rgba(59, 130, 246, 0.05) !important;
    }

    .tab-btn:hover {
        color: #3b82f6 !important;
        background: rgba(59, 130, 246, 0.05) !important;
    }

    /* Employment sections mobile fixes */
    .employment-section {
        display: none !important;
    }

    .employment-section.active {
        display: block !important;
    }

    /* Enhanced touch targets for mobile */
    #step5 input,
    #step5 select {
        touch-action: manipulation !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }

    /* Fix for input zoom on iOS */
    #step5 input[type="number"],
    #step5 input[type="text"],
    #step5 select {
        font-size: 16px !important;
    }

    /* Prevent zoom on double tap */
    #step5 * {
        touch-action: manipulation !important;
    }
}

/* Additional mobile-specific styling for better UX */
@media (max-width: 480px) {
    #step5 .form-header h1 {
        font-size: 24px !important;
        line-height: 1.3 !important;
    }

    #step5 .form-header p {
        font-size: 14px !important;
        line-height: 1.4 !important;
    }
}

/* MOBILE MICRO LOAN SPECIFIC FIXES - BUSINESS LOAN OTP STYLE */

@media (max-width: 768px) {
    /* HIDE ALL STEP INDICATORS AND NUMBERS */
    .step-indicator,
    .step-number,
    .step-text,
    .step,
    .step-circle,
    .step-icon,
    .nav-steps,
    .mobile-step-bar,
    .step-progress,
    .progress-step,
    .journey-steps,
    .step-counter,
    .step-label {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
    }

    /* Hide navbar completely on mobile */
    .navbar {
        display: none !important;
    }

    /* ENSURE MOBILE NUMBER INPUT SECTION IS VISIBLE */
    .step-content h2,
    .form-header h2,
    .phone-input-title,
    .mobile-number-title,
    .micro-loan-title {
        display: block !important;
        visibility: visible !important;
        font-size: 1.25rem !important;
        font-weight: 700 !important;
        color: #1f2937 !important;
        text-align: center !important;
        margin-bottom: 1rem !important;
        line-height: 1.3 !important;
    }

    /* Container height fix */
    .main-content {
        min-height: 100vh !important;
        padding-top: 0 !important;
    }

    /* MICRO LOAN SPECIFIC OTP STYLING */
    .micro-loan .otp-input-container,
    .micro-loan-journey .otp-input-container {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0.5rem !important;
        margin: 1.5rem 0 !important;
        padding: 0 1rem !important;
    }

    .micro-loan .otp-digit,
    .micro-loan-journey .otp-digit {
        width: 45px !important;
        height: 50px !important;
        font-size: 1.25rem !important;
        font-weight: 600 !important;
        text-align: center !important;
        border: 2px solid #d1d5db !important;
        border-radius: 8px !important;
        background: white !important;
        color: #1f2937 !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .micro-loan .otp-digit:focus,
    .micro-loan-journey .otp-digit:focus {
        border-color: #3b82f6 !important;
        outline: none !important;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    }
}