/* Installments calculator — modern blue / slate UI */

.icc-page {
    --icc-bg: #f3f6fb;
    --icc-card: #ffffff;
    --icc-text: #0f172a;
    --icc-muted: #64748b;
    --icc-line: rgba(148, 163, 184, 0.32);
    --icc-blue: #3b82f6;
    --icc-green: #059669;
    direction: rtl;
    text-align: right;
    font-family: iransans, yekan, Tahoma, sans-serif;
    color: var(--icc-text);
    padding: 16px 0 48px;
    background-color: var(--icc-bg);
    background-image:
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(16, 185, 129, 0.1), transparent 55%),
        radial-gradient(ellipse 50% 35% at 0% 10%, rgba(59, 130, 246, 0.08), transparent 50%),
        linear-gradient(180deg, #e7eef9 0%, #eef3fa 140px, #f3f6fb 280px, #f3f6fb 100%);
}

.icc-page a { text-decoration: none !important; }

.icc-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--icc-muted);
}

.icc-crumb a {
    color: #1d4ed8 !important;
    font-weight: 600;
}

.icc-crumb a:hover { color: #2563eb !important; }

.icc-crumb-sep { opacity: 0.4; }

.icc-crumb-current {
    margin: 0;
    display: inline;
    font-family: yekan, iransans;
    font-size: 15px;
    font-weight: 700;
    color: var(--icc-text);
}

.icc-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    padding: 20px 22px;
    border-radius: 20px;
    border: 1px solid var(--icc-line);
    background:
        radial-gradient(ellipse 60% 80% at 0% 0%, rgba(16, 185, 129, 0.12), transparent 55%),
        radial-gradient(ellipse 50% 70% at 100% 100%, rgba(59, 130, 246, 0.1), transparent 50%),
        var(--icc-card);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.icc-hero-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.icc-hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(59, 130, 246, 0.14));
    color: var(--icc-green);
    font-size: 18px;
}

.icc-hero-kicker {
    margin: 0 0 4px;
    font-size: 12px;
    color: var(--icc-muted);
}

.icc-hero-title {
    margin: 0;
    font-family: yekan, iransans;
    font-size: clamp(18px, 3vw, 22px);
    font-weight: 700;
}

.icc-hero-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857 !important;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: background .15s ease, border-color .15s ease;
}

.icc-hero-link:hover {
    background: #d1fae5;
    border-color: #6ee7b7;
}

.icc-notes {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.icc-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--icc-card);
    border: 1px solid var(--icc-line);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    font-size: 13px;
    line-height: 1.9;
    color: #334155;
}

.icc-note i {
    margin-top: 4px;
    color: var(--icc-blue);
    flex: 0 0 auto;
}

.icc-note strong {
    color: #0f172a;
}

.icc-note-cta {
    border-color: rgba(16, 185, 129, 0.35);
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(59, 130, 246, 0.04)),
        var(--icc-card);
}

.icc-note-cta .icc-inline-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 8px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #fef9c3;
    color: #854d0e !important;
    font-weight: 700;
    border: 1px solid #fde047;
    white-space: nowrap;
}

.icc-note-cta .icc-inline-link:hover {
    background: #fef08a;
}

.icc-panel {
    margin-bottom: 16px;
    padding: 22px 22px 18px;
    border-radius: 20px;
    background: var(--icc-card);
    border: 1px solid var(--icc-line);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.icc-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    font-family: yekan, iransans;
    font-size: 17px;
    font-weight: 700;
}

.icc-panel-title i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    font-size: 14px;
}

.icc-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.icc-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.icc-field.full { grid-column: 1 / -1; }

.icc-label {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.icc-label span {
    color: var(--icc-muted);
    font-weight: 500;
}

.icc-input,
.icc-select {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid var(--icc-line);
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    font-family: iransans, yekan, Tahoma, sans-serif;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.icc-input {
    direction: ltr;
    text-align: left;
}

.icc-select {
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    appearance: menulist !important;
    background: #fff none !important;
    cursor: pointer;
    direction: ltr;
    text-align: left;
}

.icc-select option {
    color: #0f172a;
    background: #fff;
}

.icc-input:focus,
.icc-select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.icc-error {
    min-height: 18px;
    font-size: 12px;
    color: #dc2626;
    line-height: 1.6;
}

.icc-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 18px;
}

.icc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-family: yekan, iransans;
    font-size: 15px;
    font-weight: 700;
    color: #fff !important;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 55%, #1d4ed8 100%);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
    transition: filter .15s ease, transform .12s ease;
    user-select: none;
}

.icc-btn:hover {
    filter: brightness(1.05);
}

.icc-btn:active {
    transform: translateY(1px);
}

.icc-results {
    display: none;
    margin-bottom: 16px;
}

.icc-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.icc-stat {
    padding: 18px 16px;
    border-radius: 18px;
    background: var(--icc-card);
    border: 1px solid var(--icc-line);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.icc-stat-label {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--icc-muted);
    font-weight: 600;
    line-height: 1.7;
}

.icc-stat-value {
    margin: 0;
    font-family: iransans, yekan;
    font-size: clamp(16px, 2.4vw, 20px);
    font-weight: 800;
    color: var(--icc-green);
    direction: rtl;
}

.icc-stat-value span {
    color: var(--icc-muted) !important;
    font-size: 13px !important;
    font-weight: 600;
}

.icc-stat.is-total {
    background:
        linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(16, 185, 129, 0.06)),
        var(--icc-card);
    border-color: rgba(59, 130, 246, 0.25);
}

.icc-stat.is-total .icc-stat-value {
    color: #1d4ed8;
}

.icc-cheques {
    display: none;
}

.icc-cheque-panel {
    padding: 20px 18px;
    border-radius: 20px;
    background: var(--icc-card);
    border: 1px solid var(--icc-line);
    border-right: 4px solid var(--icc-blue);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.icc-cheque-warn {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #9f1239;
    font-size: 13px;
    line-height: 1.8;
}

.icc-cheque-warn strong {
    color: #be123c;
}

.icc-cheque-head,
.icc-cheque-row {
    display: grid;
    grid-template-columns: 1.1fr 1.6fr 1.6fr;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
}

.icc-cheque-head {
    margin-bottom: 6px;
    border-radius: 12px;
    background: #f1f5f9;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.icc-cheque-row {
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

.icc-cheque-row:nth-child(odd) {
    background: #f8fafc;
}

.icc-cheque-row:nth-child(even) {
    background: #fff;
}

.icc-cheque-idx { color: #0f172a; }
.icc-cheque-date { direction: ltr; text-align: left; color: #334155; }
.icc-cheque-amount { color: #0f172a; }

.icc-cheque-amount .icc-rial {
    margin-right: 4px;
    color: #be123c;
    font-size: 12px;
    font-weight: 700;
}

.icc-cheque-totals {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--icc-line);
}

.icc-cheque-total {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #eff6ff;
    color: #1e3a5f;
    font-size: 14px;
    font-weight: 700;
}

.icc-cheque-buy {
    margin-top: 18px;
    text-align: center;
}

.icc-buy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 28px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-family: yekan, iransans;
    font-size: 16px;
    font-weight: 700;
    color: #fff !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 60%, #047857 100%);
    box-shadow: 0 10px 24px rgba(5, 150, 105, 0.28);
}

.icc-buy-btn:hover {
    filter: brightness(1.05);
}

@media screen and (max-width: 768px) {
    .icc-form-grid,
    .icc-summary {
        grid-template-columns: 1fr;
    }

    .icc-hero {
        padding: 16px;
    }

    .icc-panel {
        padding: 16px;
    }

    .icc-cheque-head,
    .icc-cheque-row {
        grid-template-columns: 0.8fr 1.2fr 1.2fr;
        padding: 10px 8px;
        font-size: 12px;
        gap: 6px;
    }

    .icc-actions {
        justify-content: stretch;
    }

    .icc-btn {
        width: 100%;
    }
}
