/* ===================================================================
   EZY LOAN APPLICATION FORM - ENHANCED STYLES (QUICK WINS)
   Version: 2.4.0
   =================================================================== */

/* ===================================================================
   1. FLOATING LABELS - SIMPLIFIED (NO OVERLAP)
   =================================================================== */

.form-field {
    position: relative;
    margin-bottom: 25px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 14px 12px;
    border: 1px solid #ddd;
    border-radius: 12px; /* MODERN: Increased from 4px */
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: #2271b1 !important;
    border-width: 2px;
    outline: none;
    box-shadow: 0 0 0 4px rgba(34, 113, 177, 0.1); /* MODERN: Larger glow */
}

/* Label color changes on focus */
.form-field input:focus + label,
.form-field select:focus + label,
.form-field textarea:focus + label {
    color: #2271b1;
}

/* ===================================================================
   2. FIELD ICONS - REMOVED (CAUSED ISSUES)
   =================================================================== */

/* Icons feature disabled - was causing typing issues */

/* ===================================================================
   3. SUCCESS CHECKMARKS
   =================================================================== */

.form-field.validated::after {
    content: '✓';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #00a32a;
    font-weight: bold;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-field.validated.valid::after {
    opacity: 1;
    animation: checkmarkPop 0.3s ease;
}

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

/* ===================================================================
   4. REAL-TIME VALIDATION COLORS
   =================================================================== */

.form-field input.valid,
.form-field select.valid,
.form-field textarea.valid {
    border-color: #00a32a !important;
    border-width: 2px;
}

.form-field input.invalid,
.form-field select.invalid,
.form-field textarea.invalid {
    border-color: #d63638 !important;
    border-width: 2px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: #2271b1 !important;
    border-width: 2px;
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

/* ===================================================================
   5. ANIMATED PROGRESS BAR
   =================================================================== */

.ezy-progress-wrapper {
    margin-bottom: 40px;
}

.ezy-progress-percentage {
    text-align: center;
    margin-bottom: 15px;
}

.ezy-progress-percentage-text {
    font-size: 24px;
    font-weight: 700;
    color: #2271b1;
    display: inline-block;
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.ezy-progress-percentage-label {
    font-size: 14px;
    color: #666;
    margin-left: 8px;
}

.ezy-progress-track {
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
    position: relative;
}

.ezy-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2271b1 0%, #0073aa 50%, #00a32a 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
    position: relative;
    box-shadow: 0 2px 4px rgba(34, 113, 177, 0.3);
}

.ezy-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Enhanced Step Circles */
.ezy-step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #e0e0e0;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: #999;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.ezy-progress-step.active .ezy-step-number {
    background: linear-gradient(135deg, #2271b1 0%, #0073aa 100%);
    border-color: #2271b1;
    color: white;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.4);
    animation: stepPulse 1.5s ease-in-out infinite;
}

@keyframes stepPulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(34, 113, 177, 0.4); }
    50% { box-shadow: 0 4px 20px rgba(34, 113, 177, 0.6); }
}

.ezy-progress-step.completed .ezy-step-number {
    background: #00a32a;
    border-color: #00a32a;
    color: white;
}

.ezy-progress-step.completed .ezy-step-number::before {
    content: '✓';
    position: absolute;
    font-size: 24px;
}

/* Hide number when completed */
.ezy-progress-step.completed .ezy-step-number span {
    display: none;
}

/* Step titles */
.ezy-step-title {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    margin-top: 8px;
}

.ezy-progress-step.active .ezy-step-title {
    color: #2271b1;
    font-weight: 700;
}

.ezy-progress-step.completed .ezy-step-title {
    color: #00a32a;
    font-weight: 600;
}

/* ===================================================================
   6. BETTER BUTTON STYLING
   =================================================================== */

.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 12px; /* MODERN: Increased from 6px */
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #2271b1 0%, #0073aa 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 113, 177, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background: linear-gradient(135deg, #00a32a 0%, #008a20 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 163, 42, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 163, 42, 0.4);
}

.btn-secondary {
    background: #f0f0f1;
    color: #2c3338;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: #e0e0e1;
    transform: translateY(-1px);
}

.btn-large {
    padding: 16px 40px;
    font-size: 18px;
}

.btn-icon {
    font-size: 20px;
}

/* ===================================================================
   7. CARD ELEVATION & SHADOWS
   =================================================================== */

.ezy-loan-application-form {
    background: white;
    border-radius: 20px; /* MODERN: Increased from 12px */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 40px;
    margin: 20px auto;
    max-width: 800px;
}

.ezy-form-step {
    background: white;
    border-radius: 16px; /* MODERN: Increased from 8px */
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ezy-form-step.active {
    animation: slideIn 0.4s ease;
}

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

/* ===================================================================
   8. SMOOTH TRANSITIONS
   =================================================================== */

input, select, textarea, button {
    transition: all 0.3s ease;
}

input:hover, select:hover, textarea:hover {
    border-color: #2271b1;
}

/* ===================================================================
   9. CONFETTI SUCCESS ANIMATION
   =================================================================== */

.success-screen {
    text-align: center;
    padding: 60px 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #00a32a 0%, #008a20 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 50px;
    color: white;
    animation: successBounce 0.6s ease;
    box-shadow: 0 8px 24px rgba(0, 163, 42, 0.4);
}

@keyframes successBounce {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(0.9); }
    50% { transform: scale(1.1); }
    75% { transform: scale(0.95); }
}

.reference-number {
    font-size: 32px;
    font-weight: 700;
    color: #2271b1;
    background: linear-gradient(135deg, #e8f4f8 0%, #d0e7f0 100%);
    padding: 20px 30px;
    border-radius: 8px;
    margin: 20px 0;
    display: inline-block;
    letter-spacing: 2px;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.2);
}

/* ===================================================================
   10. MOBILE RESPONSIVE ENHANCEMENTS
   =================================================================== */

@media screen and (max-width: 768px) {
    .ezy-loan-application-form {
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    }
    
    .ezy-form-step {
        padding: 20px;
    }
    
    .ezy-step-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .ezy-step-title {
        font-size: 11px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 16px;
    }
    
    .ezy-progress-percentage-text {
        font-size: 20px;
    }
}

/* ===================================================================
   11. LOADING STATES
   =================================================================== */

.btn.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* ===================================================================
   12. TOOLTIP HINTS
   =================================================================== */

.field-hint {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    display: block;
    font-style: italic;
}

.field-hint::before {
    content: '💡 ';
}

/* ===================================================================
   13. FORM SECTION HEADERS
   =================================================================== */

.section-header {
    font-size: 20px;
    font-weight: 700;
    color: #2c3338;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #2271b1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header::before {
    content: attr(data-icon);
    font-size: 24px;
}

/* ===================================================================
   14. GRID IMPROVEMENTS
   =================================================================== */

.form-grid {
    display: grid;
    gap: 20px;
}

.form-grid.two-col {
    grid-template-columns: repeat(2, 1fr);
}

@media screen and (max-width: 768px) {
    .form-grid.two-col {
        grid-template-columns: 1fr;
    }
}
