﻿/* ==========================================================================
   Credit Flow Custom Styles (Dark & Light Mode Adaptive)
   ========================================================================== */

/* متغیرهای رنگی تم هماهنگ با قالب */
:root {
    --cf-primary: #696cff;
    --cf-primary-hover: #5f61e6;
    --cf-primary-subtle: rgba(105, 108, 255, 0.16);
    --cf-card-bg: rgba(255, 255, 255, 0.04);
    --cf-border-color: rgba(255, 255, 255, 0.12);
    --cf-text-main: #dbdade;
    --cf-text-muted: #8692d0;
}

/* کارت مرکزی فرم */
.credit-calc-card,
.supplementary-info-wrapper {
    max-width: 620px;
    margin: 0 auto;
}

/* اصلاح باکس اصلی کارت در تم */
.credit-calc-card {
    background-color: transparent !important;
    border: none !important;
}

/* ==========================================================================
   ۱. اسلایدر و دکمه‌های کنترل (+ / -)
   ========================================================================== */
.btn-slider-ctrl {
    width: 42px;
    height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background-color: var(--cf-primary) !important;
    border-color: var(--cf-primary) !important;
    color: #fff !important;
    transition: all 0.2s ease-in-out;
}

    .btn-slider-ctrl:hover {
        background-color: var(--cf-primary-hover) !important;
        transform: scale(1.05);
    }

/* شخصی‌سازی NoUiSlider هماهنگ با تم */
#slider-basic {
    height: 8px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

    #slider-basic .noUi-connect {
        background: var(--cf-primary);
        border-radius: 8px;
    }

    #slider-basic .noUi-handle {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: #ffffff;
        border: 4px solid var(--cf-primary);
        box-shadow: 0 0 10px rgba(105, 108, 255, 0.5);
        cursor: pointer;
        top: -8px;
    }

        #slider-basic .noUi-handle::before,
        #slider-basic .noUi-handle::after {
            display: none;
        }

/* ==========================================================================
   ۲. دکمه‌های انتخاب مدت بازپرداخت (Pills)
   ========================================================================== */
.btn-duration-pill {
    flex: 1;
    min-width: 75px;
    padding: 10px 14px;
    border-radius: 50rem;
    border: 1.5px solid var(--cf-border-color);
    background-color: rgba(255, 255, 255, 0.05);
    color: #a1acb8;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

    .btn-duration-pill:hover {
        border-color: var(--cf-primary);
        color: #fff;
        background-color: var(--cf-primary-subtle);
    }

    .btn-duration-pill.active {
        border-color: var(--cf-primary) !important;
        background-color: var(--cf-primary-subtle) !important;
        color: var(--cf-primary) !important;
        box-shadow: 0 0 0 1px var(--cf-primary);
    }

/* ==========================================================================
   ۳. باکس خلاصه محاسبات
   ========================================================================== */
.calculation-summary-box {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--cf-border-color);
    border-radius: 1rem;
}

/* ==========================================================================
   ۴. کارت‌های انتخاب بانک (استپ ۲)
   ========================================================================== */
.bank-radio-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.bank-select-card {
    cursor: pointer;
    user-select: none;
    margin-bottom: 1rem;
}

.bank-card-inner {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1.5px solid var(--cf-border-color);
    border-radius: 1.25rem;
    transition: all 0.25s ease;
}

.bank-select-card:hover .bank-card-inner {
    border-color: rgba(105, 108, 255, 0.4);
    transform: translateY(-2px);
}

.bank-check-circle {
    display: inline-block;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #7e8299;
    background-color: transparent;
    transition: all 0.2s ease;
}

/* فعال‌سازی کارت با انتخاب */
.bank-select-card:has(.bank-radio-input:checked) .bank-card-inner {
    border-color: var(--cf-primary) !important;
    background-color: var(--cf-primary-subtle);
    box-shadow: 0 4px 18px rgba(105, 108, 255, 0.15);
}

.bank-select-card:has(.bank-radio-input:checked) .bank-check-circle {
    border-color: var(--cf-primary) !important;
    border-width: 6px;
    background-color: #fff;
}

/* لیست شروط */
.bank-conditions ul,
.info-bullet-list {
    list-style: disc;
    padding-right: 1.2rem;
    padding-left: 0;
}

    .bank-conditions ul li,
    .info-bullet-list li {
        margin-bottom: 0.4rem;
        line-height: 1.8;
    }

/* ==========================================================================
   ۵. کارت‌های اطلاعات تکمیلی (استپ ۳)
   ========================================================================== */
.info-card {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border: 1.5px solid var(--cf-border-color) !important;
}

.notice-callout {
    background-color: rgba(105, 108, 255, 0.08);
    border: 1px solid rgba(105, 108, 255, 0.2);
}




/* استایل فیلدهای ورودی فرم */
.form-control, .form-select {
    border-radius: 0.5rem;
    padding: 0.65rem 0.9rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

    /* وضعیت خطای فیلد دقیقاً مثل طرح ارسالی */
    .form-control.is-invalid,
    .was-validated .form-control:invalid {
        border-color: #ff3e1d !important;
        background-image: none !important;
    }

.field-validation-error {
    color: #ff3e1d;
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

/* دکمه انتخاب تاریخ در Input Group */
#btn-birthdate-picker {
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

[dir="rtl"] .date-picker-input {
    border-top-right-radius: 0.5rem !important;
    border-bottom-right-radius: 0.5rem !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}
    