.loan-calculator {
    direction: rtl;
    font-family: inherit;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 16px 20px;
    max-width: 420px;
    background-color: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    box-sizing: border-box;
    margin: auto;
}

.loan-section {
    margin-bottom: 16px;
}

.loan-label {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: #333;
}
.loan-amount-section h3.module-title {
    text-align: center;
}
.karmozdbox {
        background: #f7f7f7;
    padding: 10px 10px 5px;
    border-radius: 10px;
}
.loan-amount-display {
    background: #f7f7f7;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    direction: rtl;
}

.fee-type-option {
    display: block;
    font-size: 15px;
    margin: 4px 0 12px;
    cursor: pointer;
    color: #444;
}
.fee-type-option input[type="radio"]:checked {
    accent-color: #4a6bf8;
}
.fee-type-option input {
    margin-left: 6px;
    width: 20px;
    height: 20px;
    vertical-align: -6px;
}

/* باکس‌های مدت اقساط */
.installment-boxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.installment-box {
    flex: 1 1 calc(50% - 8px);
    min-width: 90px;
    text-align: center;
    padding: 8px 6px;
    border-radius: 6px;
    border: 1px solid #ddd;
    cursor: pointer;
    font-size: 18px;
    user-select: none;
    transition: all 0.2s ease;
    background-color: #fafafa;
}

.installment-box:hover {
    border-color: #2196f3;
    background-color: #f0f8ff;
}

.installment-box.active {
    border-color: #2196f3;
    background-color: #e3f2fd;
    color: #0d47a1;
    font-weight: 600;
}

/* نتیجه و لودر */
.result-box {
    position: relative;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e3f2fd;
    padding: 13px 0;
    border-radius: 10px;
}

/* لودر ساده دایره‌ای */
.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2196f3;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    animation: loan-spinner 0.8s linear infinite;
    margin-right: 4px;
}

@keyframes loan-spinner {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.result-value {
    font-size: 26px;
    font-weight: 600;
    color: #222;
}

.result-value .currency {
    margin-right: 9px;
    font-size: 24px;
    color: #555;
    font-weight: normal;
}

/* عدد قسط جهت چپ برای راحتی خواندن */
#installmentAmount {
    direction: ltr;
    display: inline-block;
    min-width: 90px;
    text-align: left;
}

/* ریسپانسیو ساده */
@media (max-width: 480px) {
    .loan-calculator {
        max-width: 100%;
        padding: 12px 14px;
    }

    .installment-box {
        flex: 1 1 48%;
    }
}
