/* ==========================================================================
   Right Lender - Loan Application Wizard Stylesheet
   Theme: White + Light Blue Gradient, Poppins, Bootstrap 5
   ========================================================================== */

.loan-wizard-wrapper {
    background: var(--bg-section, linear-gradient(180deg, #FFFFFF 0%, #F7FBFF 100%));
    min-height: calc(100vh - 80px);
    padding-top: 2rem;
    padding-bottom: 4rem;
}

/* Wizard Header / Hero Bar */
.wizard-header-card {
    background: linear-gradient(135deg, #1E40AF 0%, #265DF5 50%, #3B82F6 100%);
    border-radius: 20px;
    color: #FFFFFF;
    padding: 1.5rem 2rem;
    box-shadow: 0 12px 32px rgba(38, 93, 245, 0.2);
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.wizard-header-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

/* Flash Banner Notice */
.wizard-notice-banner {
    background: #EEF2FF;
    border: 1px solid #C7D2FE;
    border-radius: 12px;
    padding: 0.85rem 1.25rem;
    color: #3730A3;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.wizard-notice-banner i {
    font-size: 1.2rem;
    color: #4F46E5;
}

/* Sticky Stepper Sidebar */
.wizard-stepper-card {
    background: #FFFFFF;
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    border: 1px solid #E2E8F0;
    position: sticky;
    top: 100px;
    z-index: 10;
    min-height: 420px;
    overflow: hidden;
}

.wizard-form-card {
    position: relative;
    min-height: 420px;
    overflow: hidden;
}

/* Card Preloader Overlay & Skeleton Loading */
.wizard-card-preloader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #FFFFFF;
    border-radius: 24px;
    z-index: 25;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.wizard-card-preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.stepper-actual-content,
.form-actual-content {
    transition: opacity 0.35s ease;
}

.stepper-actual-content.is-loaded,
.form-actual-content.is-loaded {
    opacity: 1 !important;
}

/* Skeleton loader shimmers */
.skeleton-shimmer {
    background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Sidebar Hero Header (Inside Stepper Card) */
.sidebar-hero-header {
    background: linear-gradient(135deg, #1E40AF 0%, #265DF5 100%);
    border-radius: 16px;
    padding: 1.25rem;
    color: #FFFFFF;
    box-shadow: 0 8px 20px rgba(38, 93, 245, 0.2);
    position: relative;
    overflow: hidden;
}

.sidebar-hero-header::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 110px;
    height: 110px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.bg-white-20 {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

.border-white-30 {
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.text-white-80 {
    color: rgba(255, 255, 255, 0.85) !important;
}

.extra-small {
    font-size: 0.78rem;
    line-height: 1.4;
}

.stepper-progress-box {
    margin-bottom: 1.75rem;
}

.stepper-progress-bar-container {
    height: 8px;
    background: #E2E8F0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.stepper-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #265DF5 0%, #6FC3FF 100%);
    width: 25%;
    border-radius: 10px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stepper Steps List */
.stepper-steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.stepper-steps-list::before {
    content: '';
    position: absolute;
    left: 23px;
    top: 30px;
    bottom: 30px;
    width: 2px;
    background: #E2E8F0;
    z-index: 1;
}

.stepper-step-item {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 1.75rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.stepper-step-item:last-child {
    padding-bottom: 0;
}

.stepper-step-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #F1F5F9;
    color: #64748B;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    border: 2px solid #E2E8F0;
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

.stepper-step-info {
    flex-grow: 1;
    padding-top: 0.25rem;
}

.stepper-step-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 0.15rem;
    transition: color 0.3s ease;
}

.stepper-step-sub {
    font-size: 0.8rem;
    color: #94A3B8;
    font-weight: 400;
}

/* Stepper States */
/* Pending */
.stepper-step-item.pending .stepper-step-icon {
    background: #F8FAFC;
    color: #94A3B8;
    border-color: #E2E8F0;
}

/* Active */
.stepper-step-item.active .stepper-step-icon {
    background: #265DF5;
    color: #FFFFFF;
    border-color: #265DF5;
    box-shadow: 0 0 0 5px rgba(38, 93, 245, 0.18);
}
.stepper-step-item.active .stepper-step-title {
    color: #0F172A;
    font-weight: 700;
}
.stepper-step-item.active .stepper-step-sub {
    color: #265DF5;
    font-weight: 500;
}

/* Completed */
.stepper-step-item.completed .stepper-step-icon {
    background: #10B981;
    color: #FFFFFF;
    border-color: #10B981;
}
.stepper-step-item.completed .stepper-step-title {
    color: #0F172A;
}

/* Mobile Stepper Bar */
.mobile-stepper-bar {
    display: none;
    background: #FFFFFF;
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    margin-bottom: 1.5rem;
    border: 1px solid #E2E8F0;
}

/* Form Container Card */
.wizard-form-card {
    background: #FFFFFF;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    border: 1px solid #E2E8F0;
    margin-bottom: 2rem;
}

.wizard-section-heading {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wizard-section-card {
    background: #FAFCFF;
    border: 1px solid #E2E8F0;
    border-radius: 18px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Option Pill Selectors (Buttons / Cards) */
.option-pills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.option-pill-btn {
    background: #F1F5F9;
    color: #475569;
    border: 1.5px solid #E2E8F0;
    border-radius: 100px;
    padding: 0.55rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.option-pill-btn:hover {
    background: #E2E8F0;
    color: #1E293B;
}

.option-pill-btn.active, 
.option-pill-btn input[type="radio"]:checked + label,
.option-pill-btn:has(input[type="radio"]:checked) {
    background: #265DF5;
    color: #FFFFFF;
    border-color: #265DF5;
    box-shadow: 0 4px 14px rgba(38, 93, 245, 0.3);
    font-weight: 600;
}

.option-pill-btn input[type="radio"] {
    display: none;
}

/* Input Fields Styling */
.form-label-custom {
    font-weight: 600;
    font-size: 0.88rem;
    color: #334155;
    margin-bottom: 0.4rem;
}

.form-control-custom, .form-select-custom {
    background-color: #F8FAFC;
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: #0F172A;
    transition: var(--transition-smooth);
}

.form-control-custom:focus, .form-select-custom:focus {
    background-color: #FFFFFF;
    border-color: #265DF5;
    box-shadow: 0 0 0 4px rgba(38, 93, 245, 0.12);
    outline: none;
}

.form-control-custom::placeholder {
    color: #94A3B8;
}

.input-highlight-box {
    background: #F4F8FF;
    border: 1px solid #BFDBFE;
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 1.25rem;
}

/* Document Upload Cards (Final Step) */
.doc-upload-grid {
    display: block;
    margin-bottom: 1.5rem;
}

.doc-upload-card {
    background: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    border-radius: 16px;
    padding: 1.25rem;
    text-align: left;
    transition: var(--transition-smooth);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 195px;
    height: 100%;
}

.doc-upload-card:hover {
    border-color: #265DF5;
    background: #F8FAFF;
    box-shadow: 0 8px 24px rgba(38, 93, 245, 0.08);
    transform: translateY(-2px);
}

.doc-upload-card.has-file {
    border-style: solid;
    border-color: #10B981;
    background: #F0FDF4;
}

.doc-icon-wrapper {
    width: 54px;
    height: 54px;
    background: #EFF6FF;
    color: #265DF5;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 0.85rem;
}

.doc-upload-card.has-file .doc-icon-wrapper {
    background: #DCFCE7;
    color: #166534;
}

.doc-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1E293B;
    margin-bottom: 0.25rem;
}

.doc-req-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    background: #FEE2E2;
    color: #DC2626;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.doc-req-badge.optional {
    background: #F1F5F9;
    color: #64748B;
}

.doc-file-input {
    display: none;
}

.btn-upload-trigger {
    background: #265DF5;
    color: #FFFFFF;
    border: none;
    border-radius: 100px;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-upload-trigger:hover {
    background: #1D4ED8;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(38, 93, 245, 0.25);
}

.doc-file-info {
    font-size: 0.8rem;
    color: #166534;
    font-weight: 500;
    word-break: break-all;
    margin-top: 0.5rem;
}

.btn-remove-doc {
    background: transparent;
    border: none;
    color: #EF4444;
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 0.25rem;
    font-weight: 500;
}
.btn-remove-doc:hover {
    text-decoration: underline;
}

/* Action Buttons Footer Bar */
.wizard-footer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E2E8F0;
    margin-top: 2rem;
}

.btn-wizard-prev {
    background: #FFFFFF;
    border: 1.5px solid #CBD5E1;
    color: #475569;
    border-radius: 100px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.btn-wizard-prev:hover {
    background: #F1F5F9;
    color: #0F172A;
    border-color: #94A3B8;
}

.btn-wizard-next {
    background: linear-gradient(135deg, #265DF5 0%, #1D4ED8 100%);
    border: none;
    color: #FFFFFF;
    border-radius: 100px;
    padding: 0.75rem 2.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 8px 20px rgba(38, 93, 245, 0.3);
    transition: var(--transition-smooth);
}

.btn-wizard-next:hover {
    background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
    box-shadow: 0 10px 25px rgba(38, 93, 245, 0.4);
    transform: translateY(-1px);
}

.btn-wizard-skip {
    background: #FFFFFF;
    color: #475569;
    border: 1.5px solid #CBD5E1;
    border-radius: 100px;
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-wizard-skip:hover {
    background: #F8FAFC;
    color: #0F172A;
    border-color: #2563EB;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    transform: translateY(-1px);
}

/* Premium Submit & Finalize Button */
.btn-submit-finalize {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 100px !important;
    padding: 0.85rem 2.25rem !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    letter-spacing: 0.3px;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-submit-finalize:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.5) !important;
    transform: translateY(-2px) scale(1.02);
    color: #FFFFFF !important;
}

.btn-submit-finalize:active {
    transform: translateY(0) scale(0.98);
}

/* Step Panels Animations */
.wizard-step-panel {
    display: none;
    animation: fadeInStep 0.35s ease-in-out forwards;
}

.wizard-step-panel.active {
    display: block;
}

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

/* ==========================================================================
   Thanks Card Success Screen Styles
   ========================================================================== */
.thanks-card-container {
    animation: fadeInStep 0.4s ease-in-out forwards;
    padding: 1rem 0;
}

.thanks-success-badge {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.thanks-reference-box {
    background: linear-gradient(135deg, #EFF6FF 0%, #EEF2FF 100%);
    border: 2px dashed #93C5FD;
    border-radius: 20px;
}

.thanks-ref-number {
    letter-spacing: 2px;
    font-family: monospace;
}

.thanks-instructions-list li {
    font-size: 0.95rem;
    color: #334155;
}

.thanks-buttons-grid .btn {
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
}

.thanks-buttons-grid .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Responsive Rules */
@media (max-width: 991.98px) {
    .wizard-stepper-card {
        display: none;
    }
    .mobile-stepper-bar {
        display: block;
    }
    .wizard-form-card {
        padding: 1.25rem;
    }
    .wizard-footer-actions {
        flex-direction: column-reverse;
    }
    .btn-wizard-prev, .btn-wizard-next {
        width: 100%;
        text-align: center;
    }
    .thanks-buttons-grid .btn {
        width: 100%;
    }
}

/* Premium Tenure Range Slider UI */
.tenure-badge-pill {
    background: #FFFFFF;
    border: 1.5px solid #CBD5E1;
    color: #0F172A;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.35rem 0.9rem;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -0.2px;
}

.tenure-slider-wrapper {
    position: relative;
    padding: 0.4rem 0 0.1rem 0;
}

.custom-tenure-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 10px;
    background: #E2E8F0;
    outline: none;
    cursor: pointer;
    transition: background 0.1s linear;
}

/* Chrome / Safari / Edge Thumb */
.custom-tenure-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #2563EB;
    border: 3px solid #FFFFFF;
    cursor: grab;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4), 0 0 0 3px rgba(37, 99, 235, 0.15);
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s ease;
}

.custom-tenure-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5), 0 0 0 5px rgba(37, 99, 235, 0.2);
}

.custom-tenure-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.22);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.6), 0 0 0 7px rgba(37, 99, 235, 0.25);
}

/* Firefox Thumb */
.custom-tenure-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #2563EB;
    border: 3px solid #FFFFFF;
    cursor: grab;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4), 0 0 0 3px rgba(37, 99, 235, 0.15);
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s ease;
}

.custom-tenure-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
}

.custom-tenure-slider::-moz-range-thumb:active {
    cursor: grabbing;
    transform: scale(1.22);
}

.slider-ticks-labels span {
    font-size: 0.78rem;
    font-weight: 500;
    color: #64748B;
}

/* Premium EMI Box UI */
#est-emi-box {
    background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%) !important;
    border: 1.5px solid #DBEAFE !important;
    border-radius: 14px !important;
    padding: 1.1rem 1.25rem !important;
    transition: all 0.2s ease-in-out;
}

#est-emi-box:hover {
    border-color: #BFDBFE !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}
