/* ============================================================
   calculator.css — Modul Kalkulator (Sesi 84)
   Warna mengikuti --brand global (Setting brand_color).
   ============================================================ */

.calc-wrap {
    max-width: 720px;
    margin: 0 auto;
}

/* ---------- Breadcrumb ---------- */
.calc-crumb {
    font-size: .8125rem;
    color: #6b7280;
    margin-bottom: .75rem;
    display: flex;
    gap: .4rem;
    align-items: center;
    flex-wrap: wrap;
}
.calc-crumb a { color: #6b7280; text-decoration: none; }
.calc-crumb a:hover { color: var(--brand, #F07A29); text-decoration: underline; }

/* ---------- Judul ---------- */
.calc-title {
    font-size: 1.75rem;
    line-height: 1.25;
    font-weight: 800;
    color: #111827;
    margin: 0 0 .5rem;
}
.calc-lead {
    font-size: 1rem;
    line-height: 1.65;
    color: #4b5563;
    margin: 0 0 1.5rem;
}

/* ---------- Kartu kalkulator ---------- */
.calc-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

/* ---------- Input ---------- */
.calc-inputs {
    display: grid;
    gap: 1rem;
}
.calc-field label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: .35rem;
}
.calc-input-row {
    display: flex;
    align-items: stretch;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.calc-input-row:focus-within {
    border-color: var(--brand, #F07A29);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, #F07A29) 18%, transparent);
}
.calc-input-row input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: .7rem .75rem;
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
    color: #111827;
    background: transparent;
}
.calc-affix {
    display: flex;
    align-items: center;
    padding: 0 .75rem;
    background: #f9fafb;
    color: #6b7280;
    font-size: .875rem;
    font-weight: 600;
    border-right: 1px solid #e5e7eb;
    white-space: nowrap;
}
.calc-affix-end {
    border-right: 0;
    border-left: 1px solid #e5e7eb;
}
.calc-help {
    display: block;
    margin-top: .3rem;
    font-size: .75rem;
    color: #6b7280;
    line-height: 1.5;
}

/* ---------- Perantara (langkah antara) ---------- */
.calc-steps {
    margin-top: 1.1rem;
    padding-top: 1.1rem;
    border-top: 1px dashed #e5e7eb;
    display: grid;
    gap: .4rem;
}
.calc-step {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: .45rem .85rem;
    border-radius: 8px;
    background: #f9fafb;
    border: 1px dashed #e5e7eb;
}
.calc-step-label {
    font-size: .8125rem;
    color: #6b7280;
    font-weight: 600;
}
.calc-step-value {
    font-size: .9375rem;
    font-weight: 700;
    color: #4b5563;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.calc-step-value.is-empty { color: #9ca3af; font-weight: 600; }

/* ---------- Hasil ---------- */
.calc-results {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px dashed #e5e7eb;
    display: grid;
    gap: .6rem;
}
.calc-result {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: .6rem .85rem;
    border-radius: 10px;
    background: #f9fafb;
}
.calc-result.is-primary {
    background: color-mix(in srgb, var(--brand, #F07A29) 10%, white);
    border: 1px solid color-mix(in srgb, var(--brand, #F07A29) 25%, white);
    padding: .85rem;
}
.calc-result-label {
    font-size: .875rem;
    color: #4b5563;
    font-weight: 600;
}
.calc-result.is-primary .calc-result-label {
    color: color-mix(in srgb, var(--brand, #F07A29) 75%, black);
}
.calc-result-value {
    font-size: 1.125rem;
    font-weight: 800;
    color: #111827;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.calc-result.is-primary .calc-result-value {
    font-size: 1.5rem;
    color: var(--brand, #F07A29);
}
.calc-result-value.is-empty { color: #9ca3af; font-weight: 600; }

/* ---------- Error ---------- */
.calc-error {
    margin: .85rem 0 0;
    padding: .6rem .75rem;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: .8125rem;
}

/* ---------- Blok SEO ---------- */
.calc-body {
    margin-top: 2rem;
    font-size: 1rem;
    line-height: 1.75;
    color: #374151;
}
.calc-body h2 { font-size: 1.25rem; font-weight: 700; color: #111827; margin: 1.75rem 0 .6rem; }
.calc-body h3 { font-size: 1.05rem; font-weight: 700; color: #111827; margin: 1.4rem 0 .5rem; }
.calc-body p  { margin: 0 0 1rem; }
.calc-body ul, .calc-body ol { margin: 0 0 1rem; padding-left: 1.4rem; }
.calc-body li { margin-bottom: .4rem; }
.calc-body a  { color: var(--brand, #F07A29); text-decoration: underline; }
.calc-body table { width: 100%; border-collapse: collapse; margin: 0 0 1rem; font-size: .9375rem; }
.calc-body th, .calc-body td { border: 1px solid #e5e7eb; padding: .5rem .65rem; text-align: left; }
.calc-body th { background: #f9fafb; font-weight: 700; }

.calc-disclaimer {
    margin-top: 2rem;
    font-size: .75rem;
    color: #9ca3af;
    line-height: 1.6;
    border-top: 1px solid #f3f4f6;
    padding-top: 1rem;
}

/* ---------- Hub ---------- */
.calc-hub-head { margin-bottom: 1.75rem; }
.calc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: .85rem;
}
.calc-tile {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: 1.1rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
.calc-tile:hover {
    border-color: var(--brand, #F07A29);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,.07);
}
.calc-tile-title { font-size: 1.0625rem; font-weight: 700; color: #111827; }
.calc-tile-desc  { font-size: .875rem; color: #6b7280; line-height: 1.55; }
.calc-tile-cta   { font-size: .8125rem; font-weight: 700; color: var(--brand, #F07A29); margin-top: .3rem; }

.calc-empty { color: #6b7280; padding: 2rem 0; text-align: center; }

.calc-hub-note {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f3f4f6;
    font-size: .9375rem;
    line-height: 1.7;
    color: #4b5563;
}
.calc-hub-note h2 { font-size: 1.15rem; font-weight: 700; color: #111827; margin: 0 0 .6rem; }
.calc-hub-note p  { margin: 0 0 .85rem; }
.calc-hub-note a  { color: var(--brand, #F07A29); text-decoration: underline; }

/* ---------- Desktop ---------- */
@media (min-width: 768px) {
    .calc-title { font-size: 2.125rem; }
    .calc-card  { padding: 1.75rem; }
    .calc-inputs { grid-template-columns: 1fr 1fr; gap: 1.1rem; }
    .calc-grid  { grid-template-columns: 1fr 1fr; }
}
