.calculator-box {
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    max-width: 100%;
    margin: 20px auto;
    background: #fff;
    direction: rtl;
}

.calculator-box h3 {
    margin-bottom: 15px;
    font-size: 20px;
    text-align: center;
}

/* الحقول */
.calculator-box .elementor-field {
    display: block;
    width: 100%;
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 15px;
    background: #FFF;
}

/* زر احسب */
.calculator-box .elementor-button {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #2271b1;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.calculator-box .elementor-button:hover {
    background-color: #135e96;
}

/* النتيجة */
.calculator-box .result {
    margin-top: 15px;
    font-weight: bold;
    color: #1a1a1a;
    background: #f3f3f3;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    color:red;
}

/* ترتيب أزرار الراديو أفقيًا */
.calculator-box .sp10 {
    margin-bottom: 12px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.calculator-box .sp10 label {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    font-weight: 400;
    font-size: 14px;
}

/* Select2 تعديل السيلكت */
.select2-container--default .select2-selection--single {
    height: 44px !important;
    padding: 8px 12px;
    border: 1px solid #ccc !important;
    border-radius: 6px !important;
    font-size: 15px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    background: #FFF;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.5;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    top: 8px;
    right: 8px;
}
.select2-container--default .select2-results > .select2-results__options {
    font-size: 15px;
    line-height: 1.6;
}

.calculator-box table {
    margin-top: 15px;
    width: 100%;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 14px;
    border-collapse: collapse;
}
.calculator-box table th,
.calculator-box table td {
    border: 1px solid #ddd;
    padding: 8px;
}
.calculator-box table th {
    background: #f0f0f0;
    font-weight: bold;
}

/* حاسبة التراكم: تنسيق النتيجة كنص وليس أحمر فقط */
#compound-calculator .result {
    color: #1a1a1a;
    background: #f3f3f3;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    font-weight: normal;
}


#drawdown-calculator .result {
    color: #1a1a1a;
    background: #f3f3f3;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    font-weight: normal;
}

#compound-calculator table th {
    background-color: #dfefff;
    color: #333;
}

#compound-calculator table td {
    background-color: #fff;
}

/* تنسيق قائمة نوع الفترة */
.calculator-box select.period-type {
    background-color: #fff;
    color: #000;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 6px;
    font-size: 15px;
    margin-bottom: 12px;
}

/* إصلاح لون الخيارات داخل القائمة */
.calculator-box select.period-type option {
    background-color: #fff;
    color: #000;
}

.calculator-box label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

.calculator-box select.dd-type {
    background-color: #fff;
    color: #000;
}


#swap-currencies {
    width: 100px;
  margin-top: 10px;
  background-color: #2271b1;
  color: white;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  padding: 10px;
  transition: all 0.3s ease;
  font-weight: 400;
}
}
#swap-currencies:hover {
    background-color: #e0e0e0;
    color:#000;
}


/* تنسيق حاسبة الزكاة */
.zakat-result-container {
    margin-top: 20px;
}

.zakat-details-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.zakat-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007cba;
}

.zakat-icon {
    font-size: 24px;
    margin-left: 10px;
}

.zakat-header h4 {
    color: #2c3e50;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.zakat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.zakat-row:last-child {
    border-bottom: none;
}

.zakat-label {
    font-weight: 500;
    color: #495057;
    flex: 1;
}

.zakat-value {
    font-weight: 600;
    color: #2c3e50;
    text-align: left;
    min-width: 120px;
}

/* صندوق النتيجة - تجب الزكاة */
.zakat-due {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

/* صندوق النتيجة - لا تجب الزكاة */
.zakat-no-due {
    background: linear-gradient(135deg, #f8d7da 0%, #f1b0b7 100%);
    border: 2px solid #dc3545;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.2);
}

.zakat-status-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.zakat-status-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.zakat-due .zakat-status-title {
    color: #155724;
}

.zakat-no-due .zakat-status-title {
    color: #721c24;
}

.zakat-status-desc {
    font-size: 16px;
    color: #721c24;
    margin-bottom: 15px;
}

.zakat-amount-display {
    background: rgba(255,255,255,0.8);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.zakat-amount-label {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.zakat-amount-value {
    font-size: 28px;
    font-weight: 800;
    color: #155724;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.zakat-percentage {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 15px;
    font-style: italic;
}

.zakat-note {
    background: rgba(255,255,255,0.9);
    border-radius: 6px;
    padding: 12px;
    font-size: 13px;
    color: #495057;
    border-right: 4px solid #ffc107;
}

.zakat-shortage {
    background: rgba(255,255,255,0.9);
    border-radius: 6px;
    padding: 12px;
    font-size: 14px;
    color: #721c24;
    font-weight: 500;
    margin-top: 15px;
    border-right: 4px solid #dc3545;
}

/* تجاوب مع الشاشات الصغيرة */
@media (max-width: 768px) {
    .zakat-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .zakat-value {
        text-align: right;
        min-width: auto;
        width: 100%;
    }
    
    .zakat-amount-value {
        font-size: 24px;
    }
    
    .zakat-details-box,
    .zakat-result-box {
        padding: 15px;
    }
}

/* تنسيقات حاسبة العائد على الاستثمار */
.roi-result-container {
    margin-top: 20px;
}

.roi-metrics {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.roi-metric {
    background: rgba(255,255,255,0.8);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(0,0,0,0.1);
}

.roi-metric-label {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 5px;
}

.roi-metric-value {
    font-size: 18px;
    font-weight: 600;
}

/* تعديل لتحسين تجربة المستخدم على الأجهزة المحمولة */
@media (max-width: 768px) {
    .roi-metrics {
        gap: 8px;
    }
    
    .roi-metric {
        padding: 10px;
    }
    
    .roi-metric-value {
        font-size: 16px;
    }
}


/* Validation – Personal & Mortgage Only */
#personal-loan-calculator .field-error,
#mortgage-calculator .field-error {
    border: 1px solid #e53935 !important;
    background: #fff5f5;
}

#personal-loan-calculator .calc-error,
#mortgage-calculator .calc-error {
    color: #e53935;
    font-size: 13px;
    margin-top: 8px;
}

