/* ============================================================
   Installment Calculator Page — Ellaithy Auto
   ============================================================ */

:root {
    --ic-dark:        #0f1a2e;
    --ic-primary:     #db2d2e;
    --ic-primary-lt:  rgba(219, 45, 46, 0.08);
    --ic-track:       #d8dde6;
    --ic-bg:          #ffffff;
    --ic-section-bg:  #f4f6f9;
    --ic-border:      #e2e8f0;
    --ic-text:        #1a202c;
    --ic-muted:       #718096;
    --ic-radius:      12px;
    --ic-shadow:      0 4px 20px rgba(0,0,0,0.07);
}

/* ══════════════════════════════════════════════════════════════
   CALCULATOR SECTION
   ══════════════════════════════════════════════════════════════ */
.ic-section {
    padding: 70px 0 60px;
    background: var(--ic-bg);
}

.ic-main-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--ic-dark);
    text-align: center;
    margin: 0 0 14px;
    letter-spacing: -1px;
    line-height: 1.1;
}

.ic-main-subtitle {
    text-align: center;
    font-size: 15px;
    color: var(--ic-muted);
    margin: 0 auto 56px;
    max-width: 520px;
    line-height: 1.6;
}

/* ── Calculator wrapper ───────────────────────────────────── */
.ic-calculator {
    max-width: 860px;
    margin: 0 auto;
}

/* ── Slider group ─────────────────────────────────────────── */
.ic-slider-group {
    margin-bottom: 36px;
}

.ic-slider-group:last-child {
    margin-bottom: 0;
}

/* Header row: label  ←→  value */
.ic-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.ic-label {
    font-size: 20px;
    font-weight: 700;
    color: var(--ic-dark);
}

/* Price input box */
.ic-price-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--ic-bg);
    border: 2px solid var(--ic-border);
    border-radius: 8px;
    padding: 6px 14px;
    transition: border-color 0.2s;
}

.ic-price-box:focus-within {
    border-color: var(--ic-dark);
}

.ic-price-input {
    width: 140px;
    border: none;
    outline: none;
    font-size: 16px;
    font-weight: 700;
    color: var(--ic-dark);
    background: transparent;
    text-align: start;
    padding: 0;
    /* Hide spin buttons */
    -moz-appearance: textfield;
}

.ic-price-input::-webkit-inner-spin-button,
.ic-price-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

.ic-price-currency {
    font-size: 13px;
    color: var(--ic-muted);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Text value display (for dp% and duration) */
.ic-value-display {
    font-size: 17px;
    color: var(--ic-muted);
    font-weight: 600;
}

.ic-value-display strong {
    color: var(--ic-dark);
    font-weight: 800;
    font-size: 20px;
}

/* ── Range Slider ─────────────────────────────────────────── */
.ic-range {
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    background: var(--ic-track); /* overridden by JS */
    display: block;
}

/* Webkit thumb */
.ic-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--ic-dark);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(15, 26, 46, 0.25);
    transition: transform 0.15s, box-shadow 0.15s;
}

.ic-range::-webkit-slider-thumb:hover,
.ic-range::-webkit-slider-thumb:active {
    transform: scale(1.2);
    box-shadow: 0 3px 14px rgba(15, 26, 46, 0.35);
}

/* Firefox thumb */
.ic-range::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--ic-dark);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(15, 26, 46, 0.25);
}

/* ── Tick marks ───────────────────────────────────────────── */
.ic-ticks {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding: 0 2px;
}

.ic-tick {
    font-size: 11px;
    color: var(--ic-muted);
    line-height: 1;
    user-select: none;
}

/* ── Result box (below dp + duration sliders) ─────────────── */
.ic-result-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--ic-section-bg);
    border-radius: 10px;
    padding: 17px 22px;
    margin-top: 14px;
}

.ic-result-label {
    font-size: 14px;
    color: var(--ic-muted);
    font-weight: 500;
}

.ic-result-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--ic-dark);
    letter-spacing: -0.3px;
}

/* ── Divider between slider groups ───────────────────────── */
.ic-divider {
    height: 1px;
    background: var(--ic-border);
    margin: 36px 0;
}

/* ── Disclaimer ───────────────────────────────────────────── */
.ic-note {
    text-align: center;
    font-size: 12px;
    color: var(--ic-muted);
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--ic-border);
}

/* ══════════════════════════════════════════════════════════════
   BANKS RESULTS SECTION
   ══════════════════════════════════════════════════════════════ */
.ic-banks-section {
    padding: 56px 0 80px;
    background: var(--ic-section-bg);
}

.ic-banks-section-head {
    text-align: center;
    margin-bottom: 40px;
}

.ic-banks-title {
    font-size: 30px;
    font-weight: 800;
    color: var(--ic-dark);
    margin: 0 0 8px;
}

.ic-banks-subtitle {
    font-size: 14px;
    color: var(--ic-muted);
    margin: 0;
}

/* ── Banks grid ───────────────────────────────────────────── */
.ic-banks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
}

/* ── Bank card ────────────────────────────────────────────── */
.ic-bank-card {
    background: var(--ic-bg);
    border-radius: var(--ic-radius);
    border: 1px solid var(--ic-border);
    overflow: hidden;
    box-shadow: var(--ic-shadow);
    transition: box-shadow 0.2s, transform 0.2s;
}

.ic-bank-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.11);
    transform: translateY(-2px);
}

/* Card header */
.ic-bank-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    background: var(--ic-dark);
}

.ic-bank-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    padding: 5px;
    flex-shrink: 0;
}

.ic-bank-logo-placeholder {
    width: 52px;
    height: 52px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    font-size: 22px;
    flex-shrink: 0;
}

.ic-bank-meta {
    flex: 1;
    min-width: 0;
}

.ic-bank-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ic-bank-dp-range {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin: 0;
}

/* Highlighted "best" monthly payment for selected duration */
.ic-bank-best {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 22px;
    background: var(--ic-primary-lt);
    border-bottom: 1px solid var(--ic-border);
}

.ic-bank-best__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ic-primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ic-bank-best__amount {
    font-size: 22px;
    font-weight: 800;
    color: var(--ic-primary);
    letter-spacing: -0.5px;
}

.ic-bank-best__na {
    font-size: 14px;
    color: var(--ic-muted);
    font-weight: 500;
}

/* Plans table */
.ic-plans-table {
    width: 100%;
    border-collapse: collapse;
}

.ic-plans-table thead th {
    font-size: 10px;
    font-weight: 700;
    color: var(--ic-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--ic-border);
    background: #fbfcfd;
    text-align: start;
}

.ic-plans-table tbody tr {
    border-bottom: 1px solid var(--ic-border);
    transition: background 0.15s;
}

.ic-plans-table tbody tr:last-child {
    border-bottom: none;
}

.ic-plans-table tbody tr:hover {
    background: var(--ic-section-bg);
}

/* Highlighted row when duration matches selected */
.ic-plans-table tbody tr.ic-row-active {
    background: var(--ic-primary-lt);
}

.ic-plans-table tbody tr.ic-row-active td {
    color: var(--ic-primary);
    font-weight: 600;
}

.ic-plans-table tbody td {
    font-size: 13px;
    color: var(--ic-text);
    padding: 11px 18px;
    text-align: start;
}

.ic-plans-table tbody td.ic-monthly-cell {
    font-weight: 700;
    color: var(--ic-dark);
    font-size: 14px;
}

.ic-plans-table tbody tr.ic-row-active td.ic-monthly-cell {
    color: var(--ic-primary);
    font-size: 15px;
}

/* Admin fees note */
.ic-bank-footer-note {
    font-size: 11px;
    color: var(--ic-muted);
    padding: 9px 18px;
    background: #fbfcfd;
    border-top: 1px solid var(--ic-border);
}

/* No banks fallback */
.ic-no-banks {
    text-align: center;
    padding: 60px 0;
    color: var(--ic-muted);
    font-size: 16px;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 991px) {
    .ic-main-title    { font-size: 36px; }
    .ic-banks-grid    { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}

@media (max-width: 768px) {
    .ic-section        { padding: 50px 0 40px; }
    .ic-main-title     { font-size: 28px; }
    .ic-label          { font-size: 17px; }
    .ic-result-value   { font-size: 17px; }
    .ic-banks-grid     { grid-template-columns: 1fr; }
    .ic-bank-best__amount { font-size: 18px; }
}

@media (max-width: 575px) {
    .ic-main-title     { font-size: 24px; letter-spacing: 0; }
    .ic-main-subtitle  { font-size: 13px; }
    .ic-label          { font-size: 15px; }
    .ic-price-input    { width: 110px; font-size: 14px; }
    .ic-result-box     { padding: 13px 16px; }
}
