/* Simplified CSS for Loan Application Form */

:root {
    --primary-color: #0072bb;
    --primary-dark: #005f9e;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --light-bg: #f8f9fa;
    --border-radius: 0.375rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

/* Override Bootstrap bg-primary class */
.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Card styling */
.card {
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Form controls */
.form-control, .form-select {
    padding: 0.625rem 0.75rem;
    border-radius: var(--border-radius);
    border: 1px solid #ced4da;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 114, 187, 0.25);
}

.form-control.is-invalid, .form-select.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    font-size: 0.875rem;
    color: #dc3545;
}

/* Custom checkbox */
.custom-checkbox {
    display: flex;
    align-items: flex-start;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.25rem;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    cursor: pointer;
}

/* Progress steps */
.progress-container {
    position: relative;
}

.progress-step {
    text-align: center;
    z-index: 1;
    position: relative;
    cursor: pointer;
}

.progress-circle {
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--light-bg);
    border: 2px solid var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-weight: bold;
    transition: var(--transition);
}

.progress-label {
    font-size: 0.875rem;
    color: var(--secondary-color);
    transition: var(--transition);
}

.progress-connector {
    height: 2px;
    background-color: var(--secondary-color);
    flex-grow: 1;
    margin-top: 1.25rem;
    z-index: 0;
}

/* Active and completed steps */
.progress-step.active .progress-circle {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.progress-step.active .progress-label {
    color: var(--primary-color);
    font-weight: bold;
}

.progress-step.completed .progress-circle {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.progress-step.completed .progress-label {
    color: var(--primary-color);
}

.progress-step.completed + .progress-connector,
.progress-step.active + .progress-connector {
    background-color: var(--primary-color);
}

/* Section styling */
.section-title {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    margin-right: 10px;
    font-weight: bold;
}

/* Form steps */
.form-step {
    transition: var(--transition);
}

.form-step:not(.active) {
    display: none;
}

/* Animation for form transitions */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-step {
    animation: fadeIn 0.5s ease-out;
}

/* Range sliders */
.form-range {
    height: 1.5rem;
    padding: 0;
}

.form-range::-webkit-slider-thumb {
    background: var(--primary-color);
}

.form-range::-moz-range-thumb {
    background: var(--primary-color);
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-secondary:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .progress-label {
        font-size: 0.75rem;
    }
    
    .progress-circle {
        width: 2rem;
        height: 2rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Loading image effect */
.loading-image {
    opacity: 0.6;
    filter: blur(2px);
    transition: all 0.3s ease;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 0.8; }
    100% { opacity: 0.6; }
}

/* Fireworks Animation */
.firework {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.1);
    display: none;
}

.firework.active {
    display: block;
}

.firework-particle {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.8);
    animation: firework-explode 1s ease-out forwards;
}

@keyframes firework-explode {
    0% {
        transform: translate(0, 0);
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--y));
        opacity: 0;
    }
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    display: none;
}

.spinner-overlay.active {
    display: flex;
}

.spinner-container {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow);
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Form step transition */
.form-step {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.form-step.active {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

/* OTP Modal Styling */
.otp-modal {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.otp-modal .modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: none;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}





.otp-modal .modal-title {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.otp-icon-container {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background-color: rgba(0, 114, 187, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.otp-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
}

/* OTP Input Styling */
.otp-input-container {
    margin: 20px 0;
}

.otp-input {
    width: 45px;
    height: 55px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 5px;
    border-radius: 10px;
    border: 2px solid #ced4da;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.otp-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 114, 187, 0.25);
    transform: translateY(-2px);
}

@media (max-width: 576px) {
    .otp-input {
        width: 40px;
        height: 50px;
        font-size: 1.25rem;
        margin: 0 3px;
    }
}

#resendOtpBtn {
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

#resendOtpBtn:hover {
    color: var(--primary-dark);
    text-decoration: underline !important;
}

#resendOtpBtn.disabled {
    color: var(--secondary-color);
    pointer-events: none;
    opacity: 0.6;
}

.resend-container {
    background-color: rgba(0, 0, 0, 0.02);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

#otpTimer {
    margin-top: 8px;
}

#otpTimerCount {
    color: var(--primary-color);
}

/* Alert styling in OTP modal */
.otp-modal .alert-danger {
    border-radius: 10px;
    border-left: 4px solid #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

/* Verify OTP button */
.otp-modal .modal-footer {
    border-top: none;
    padding: 1rem 1.5rem 1.5rem;
    justify-content: center;
}

.otp-modal .btn-primary {
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 0.75rem 2rem;
    box-shadow: 0 4px 10px rgba(0, 114, 187, 0.3);
    transition: all 0.3s ease;
}

.otp-modal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 114, 187, 0.4);
}

/* Custom alert styling */
.alert-info {
    background-color: rgba(0, 114, 187, 0.1);
    border-color: rgba(0, 114, 187, 0.3);
    color: #0072bb;
}

/* Improved mobile checkbox */
.form-check-input {
    min-width: 20px;
    min-height: 20px;
    margin-top: 0.25rem;
}

.form-check-label {
    padding-left: 5px;
}

@media (max-width: 576px) {
    .form-check-input {
        min-width: 24px;
        min-height: 24px;
    }
    
    .form-check-label {
        padding-left: 8px;
    }
}
