/* Premium calculator, on top of the site theme (portal.css). Navy #2D4174, orange #F7A71E. */
.calc-page { padding-bottom: 50px; }

.calc-card {
    background: #fff;
    border: 1px solid #e3e6ee;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(45, 65, 116, .08);
    padding: 24px 26px;
}

/* ---------- form ---------- */
#frmCalculate .calc-step { padding-bottom: 6px; margin-bottom: 18px; border-bottom: 1px dashed #e3e6ee; }
#frmCalculate .calc-step:last-of-type { border-bottom: 0; }
.calc-step-head { font-size: 15px; font-weight: 700; color: #2D4174; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 14px; }
.calc-step-head small { text-transform: none; color: #999; font-weight: 400; letter-spacing: 0; }
.calc-step-no {
    display: inline-block; width: 26px; height: 26px; line-height: 26px; margin-right: 8px;
    border-radius: 50%; background: #2D4174; color: #fff; text-align: center; font-size: 13px;
}
#frmCalculate label { font-weight: 600; color: #333; }
#frmCalculate .form-control { height: 42px; border-radius: 4px; box-shadow: none; border-color: #CCD0D4; }
#frmCalculate .form-control:focus { border-color: #2D4174; box-shadow: 0 0 0 3px rgba(45, 65, 116, .12); }
#frmCalculate .input-group-addon { background: #f4f6fa; border-color: #CCD0D4; color: #2D4174; font-weight: 600; }
#frmCalculate .has-error .form-control { border-color: #d9534f; }
#frmCalculate .has-error .form-control:focus { box-shadow: 0 0 0 3px rgba(217, 83, 79, .15); }
#frmCalculate .calc-error { color: #d9534f; font-size: 13px; margin: 5px 0 0; }
#frmCalculate .calc-hint { color: #2D4174; font-size: 13px; margin: 6px 0 0; }
#frmCalculate .calc-hint .label { margin-right: 6px; font-size: 11px; }
#frmCalculate .calc-hint:empty, #frmCalculate .calc-error:empty, .calc-plan-info:empty { display: none; }

.calc-plan-info {
    margin-top: 10px; padding: 10px 14px; background: #f4f6fa; border-left: 3px solid #F7A71E;
    border-radius: 0 4px 4px 0; font-size: 13px; color: #444;
}
.calc-plan-info b { color: #2D4174; }

.calc-segment { display: inline-flex; border: 1px solid #CCD0D4; border-radius: 4px; overflow: hidden; }
.calc-segment label { margin: 0; font-weight: 600 !important; cursor: pointer; }
.calc-segment input { position: absolute; opacity: 0; pointer-events: none; }
.calc-segment span { display: block; padding: 9px 26px; color: #2D4174; transition: background .15s; }
.calc-segment label + label span { border-left: 1px solid #CCD0D4; }
.calc-segment input:checked + span { background: #2D4174; color: #fff; }
.calc-segment input:focus-visible + span { outline: 2px solid #F7A71E; outline-offset: -2px; }

/* ---------- riders ---------- */
.calc-riders { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: start; }
.calc-rider {
    border: 1px solid #e3e6ee; border-radius: 6px; padding: 12px 14px; transition: border-color .15s, background .15s;
}
.calc-rider.is-checked { border-color: #2D4174; background: #f7f9fd; }
.calc-rider.is-disabled { background: #fafafa; }
.calc-rider-top { display: flex; align-items: flex-start; gap: 10px; margin: 0; cursor: pointer; font-weight: 400 !important; }
.calc-rider.is-disabled .calc-rider-top { cursor: not-allowed; }
.calc-rider-top input { margin-top: 3px; width: 17px; height: 17px; flex: none; }
.calc-rider-name { font-weight: 700; color: #2D4174; display: block; }
.calc-rider.is-disabled .calc-rider-name { color: #999; }
.calc-rider-meta { font-size: 12px; color: #888; display: block; margin-top: 2px; }
.calc-rider-tags { margin-top: 4px; }
.calc-rider-tags .label { font-weight: 600; font-size: 11px; margin-right: 4px; display: inline-block; }
.calc-rider-sa { display: flex; align-items: center; gap: 10px; margin: 10px 0 0 27px; flex-wrap: wrap; }
.calc-rider-sa .input-group { width: 210px; }
.calc-rider-sa .form-control { height: 34px !important; }
.calc-rider-sa small { color: #888; }
.calc-rider .calc-error { display: block; margin: 6px 0 0 27px !important; }
.calc-rider .calc-error:empty { display: none; }

.calc-actions { display: flex; align-items: center; gap: 10px; padding-top: 4px; }
#btnCalculate { padding: 11px 30px; font-size: 15px; font-weight: 600; border-radius: 4px; }
#btnCalculate[disabled] { opacity: .7; }
#btnReset { color: #2D4174; }

/* ---------- result (right column) ---------- */
.calc-result-wrap { position: sticky; top: 20px; }
.calc-empty { text-align: center; color: #777; padding: 40px 30px; }
.calc-empty .mdi { font-size: 54px; color: #CCD0D4; line-height: 1; }
.calc-empty h3 { color: #2D4174; font-weight: 700; margin: 10px 0; }

.calc-invalid { border-top: 4px solid #d9534f; }
.calc-invalid h3 { margin: 0 0 10px; font-size: 18px; color: #d9534f; font-weight: 700; }
.calc-invalid ul { margin: 0; padding-left: 18px; color: #555; }

.calc-result { padding: 0; overflow: hidden; }
.calc-result > :not(.calc-result-head) { margin-left: 24px; margin-right: 24px; }
.calc-result-head { background: linear-gradient(135deg, #2D4174, #1f2c4f); color: #fff; padding: 22px 24px 20px; position: relative; }
.calc-result-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #F7A71E; }
.calc-result-plan { font-size: 13px; opacity: .85; margin-bottom: 10px; }
.calc-result-label { text-transform: uppercase; font-size: 12px; letter-spacing: 1px; color: #F7A71E; font-weight: 700; }
.calc-result-amount { font-size: 36px; font-weight: 700; line-height: 1.15; margin-top: 2px; }
.calc-result-amount small { font-size: 18px; font-weight: 400; opacity: .85; }
.calc-result-sub { font-size: 13px; opacity: .85; margin-top: 4px; }
.calc-result-na { font-size: 15px; margin-top: 6px; }

.calc-breakdown { width: calc(100% - 48px); margin-top: 18px; margin-bottom: 6px; }
.calc-breakdown td { padding: 8px 0; border-bottom: 1px solid #eef0f4; vertical-align: top; }
.calc-breakdown td:last-child { text-align: right; white-space: nowrap; font-weight: 600; }
.calc-breakdown td small { display: block; color: #999; font-size: 11px; }
.calc-breakdown-total td { border-bottom: 0; font-weight: 700; color: #2D4174; font-size: 16px; padding-top: 12px; }

.calc-facts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 16px; margin-bottom: 0; }
.calc-facts div { background: #f4f6fa; border-radius: 6px; padding: 8px 10px; }
.calc-facts dt { font-size: 11px; color: #888; font-weight: 400; text-transform: uppercase; }
.calc-facts dd { color: #2D4174; font-weight: 700; }

.calc-compare-title { margin-top: 22px; margin-bottom: 8px; font-size: 14px; font-weight: 700; color: #2D4174; text-transform: uppercase; }
.calc-compare { width: calc(100% - 48px) !important; margin-bottom: 10px; font-size: 13px; }
.calc-compare > thead > tr > th { border-bottom: 2px solid #2D4174; color: #2D4174; font-size: 12px; }
.calc-compare > tbody > tr.active > td { background: #fff6e5; font-weight: 700; }
.calc-note { font-size: 11px; color: #999; margin-top: 8px; }
.calc-print { padding-left: 0; margin-left: 24px; margin-bottom: 14px; color: #2D4174; }

@media (max-width: 991px) {
    .calc-result-wrap { position: static; margin-top: 24px; }
}
@media (max-width: 480px) {
    .calc-card { padding: 18px 16px; }
    .calc-facts { grid-template-columns: 1fr 1fr; }
}
@media print {
    .dt-header, .dt-quicklinks, .dt-footer, footer, .page-header, .col-md-7, .calc-print { display: none !important; }
    .col-md-5 { width: 100%; }
    .calc-result-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

#frmCalculate .form-group > label { display: block; }
@media (min-width: 768px) {
    .calc-riders { grid-template-columns: 1fr 1fr; }
    .calc-rider-sa { margin-left: 0; }
    .calc-rider-sa .input-group { width: 100%; }
    .calc-rider .calc-error { margin-left: 0 !important; }
}

/* Rates hidden for now; remove this rule to show them again. */
.calc-result .calc-rate { display: none; }
.calc-note strong { color: #2D4174; }
