/* ==========================================================================
   MBBSDirect — Cost calculator page only  (v2.0, Nov 2026)
   Loaded after mbbsdirect.css on /mbbs-abroad-cost-calculator/ and nowhere else.
   Uses the site tokens; every class here starts with "calc-".
   ========================================================================== */
#calc [hidden] { display: none !important; }
.calc-anchor { position: relative; top: -90px; display: block; height: 0; }

/* ---------- Hero + university cards ---------- */
.calc-hero { padding: 28px 0 48px; }
.calc-intro { display: flex; flex-direction: column; gap: 14px; max-width: 820px; margin-bottom: 26px; }
.calc-intro h1 { font-size: clamp(28px, 4.2vw, 48px); }
.calc-howto { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; counter-reset: h; }
.calc-howto li { counter-increment: h; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--ink-700); color: #ECE9FC; font-size: 14px; font-weight: 600; }
.calc-howto li::before { content: counter(h); width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }

.calc-unis { display: grid; gap: 14px; grid-template-columns: 1fr; min-height: 300px; }
@media (min-width: 560px) { .calc-unis { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .calc-unis { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.calc-uni {
  font: inherit; text-align: left; cursor: pointer; padding: 0; border: 2px solid transparent; border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text); overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 10px 26px rgba(19, 11, 74, .28); transition: transform .15s ease, border-color .15s ease;
}
.calc-uni:hover { transform: translateY(-3px); border-color: var(--brand-soft); }
.calc-uni:focus-visible { outline: 3px solid var(--star-on-dark); outline-offset: 3px; }
.calc-uni[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft), 0 10px 26px rgba(19, 11, 74, .28); }
.calc-uni-img { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--placeholder); }
.calc-uni-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.calc-tag { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.94); color: var(--ink-900); }
.calc-tag-kg::before, .calc-tag-uz::before, .calc-tag-ru::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.calc-tag-kg::before { background: #D62828; }
.calc-tag-uz::before { background: #1E9BD7; }
.calc-tag-ru::before { background: #2B4FB3; }
.calc-uni-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex-grow: 1; }
.calc-uni-body strong { font-family: var(--font-head); font-size: 17px; line-height: 1.3; }
.calc-uni-body small { color: var(--text-3); font-size: 14px; }
.calc-uni-fee { font-size: 14px; color: var(--text-2); margin-top: auto; padding-top: 6px; }
.calc-uni-fee b { color: var(--text); font-size: 15px; margin-left: 4px; }
.calc-uni-cta { color: var(--brand); font-weight: 700; font-size: 15px; }
.calc-uni[aria-pressed="true"] .calc-uni-cta { color: var(--ink-900); }

/* ---------- Shared card + table ---------- */
.calc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 20px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 14px 36px rgba(19, 11, 74, .08); }
@media (min-width: 768px) { .calc-card { padding: 30px; } }
.calc-card h3 { font-size: clamp(20px, 2.2vw, 26px); }
.calc-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.calc-card-head h2 { font-size: clamp(22px, 2.8vw, 32px); margin-top: 4px; }
.calc-sub { color: var(--text-2); font-size: 16px; line-height: 1.55; margin: -8px 0 0; }
.calc-hint { color: var(--text-3); font-size: 14px; line-height: 1.5; margin: 0; }
.calc-link { font: inherit; cursor: pointer; border-radius: 999px; border: 1px solid var(--input-line); background: var(--surface); color: var(--brand); font-weight: 700; font-size: 14px; padding: 8px 14px; min-height: 40px; }
.calc-link:hover { border-color: var(--brand); background: var(--brand-tint); }

.calc-table { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.calc-tr { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 12px 14px; border-top: 1px solid var(--line-soft); font-size: 15px; }
.calc-tr:first-child { border-top: 0; }
.calc-tr > span:first-child { display: flex; flex-direction: column; gap: 2px; color: var(--text); font-weight: 600; }
.calc-tr small { color: var(--text-3); font-weight: 400; font-size: 13px; }
.calc-tr > span:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.calc-tr b { font-weight: 700; }
.calc-th { background: var(--bg); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); padding: 10px 14px; }
.calc-th > span:first-child { color: var(--text-3); font-weight: 700; }
.calc-tf { background: var(--brand-tint-2); font-weight: 700; }
.calc-tf b { color: var(--brand); font-family: var(--font-head); font-size: 17px; }
.calc-table-years .calc-tr > span { flex: 1; text-align: right; }
.calc-table-years .calc-tr > span:first-child { flex: .8; text-align: left; }

/* ---------- Wizard ---------- */
.calc-wizard-sec { padding-top: 32px; }
.calc-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; counter-reset: st; }
.calc-steps li { counter-increment: st; display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-3); }
.calc-steps li::before { content: ""; height: 6px; border-radius: 999px; background: var(--line); }
.calc-steps li.is-done::before, .calc-steps li.is-current::before { background: var(--brand); }
.calc-steps li.is-current { color: var(--brand); font-weight: 700; }
.calc-steps li.is-done { color: var(--text-2); }
.calc-step { display: flex; flex-direction: column; gap: 16px; min-height: 180px; }
.calc-opts { display: grid; gap: 10px; }
.calc-opt { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer; background: var(--surface); }
.calc-opt:hover { border-color: var(--brand-soft); }
.calc-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-tint-2); }
.calc-opt input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand); flex-shrink: 0; }
.calc-opt span { display: flex; flex-direction: column; gap: 2px; }
.calc-opt strong { font-size: 16px; }
.calc-opt small { color: var(--text-3); font-size: 14px; }
.calc-slider { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--radius); background: var(--bg); }
.calc-slider-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.calc-slider label { font-weight: 700; font-size: 15px; }
.calc-slider output { font-family: var(--font-head); font-weight: 700; font-size: 24px; color: var(--brand); white-space: nowrap; font-variant-numeric: tabular-nums; }
.calc-range { width: 100%; height: 34px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.calc-range:focus-visible { outline: 3px solid var(--brand-soft); outline-offset: 2px; border-radius: 6px; }
.calc-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); }
.calc-card-foot { display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--line); padding-top: 16px; }
@media (min-width: 640px) { .calc-card-foot { flex-direction: row; align-items: center; justify-content: space-between; } }
.calc-running { display: flex; flex-direction: column; gap: 2px; }
.calc-running span { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.calc-running b { font-family: var(--font-head); font-size: 26px; color: var(--text); }
.calc-running small { font-size: 13px; color: var(--text-3); }
.calc-nav { display: flex; gap: 10px; }
.calc-nav .btn-primary { flex-grow: 1; }
.calc-nav .btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Result ---------- */
.calc-result-sec { padding-top: 32px; }
.calc-shared { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius); padding: 12px 14px; font-size: 15px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.calc-res-head { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 720px) { .calc-res-head { flex-direction: row; justify-content: space-between; align-items: flex-end; } }
.calc-res-title h2 { font-size: clamp(34px, 5vw, 52px); color: var(--brand); margin: 6px 0 4px; }
.calc-res-title h2 small { font-size: 18px; color: var(--text-2); font-family: var(--font-body); font-weight: 600; }
.calc-res-title p { margin: 0; color: var(--text-2); }
.calc-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.calc-kpis div { background: var(--brand-tint-2); border-radius: var(--radius); padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 150px; }
.calc-kpis span { font-size: 13px; color: var(--text-3); font-weight: 600; }
.calc-kpis b { font-family: var(--font-head); font-size: 20px; }
.calc-split { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: #C4BBFF; }
.calc-split-uni { background: var(--brand); }
.calc-split-key { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; color: var(--text-2); margin-top: -8px; }
.calc-split-key b { color: var(--text); }
.calc-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.calc-dot-uni { background: var(--brand); }
.calc-dot-live { background: #C4BBFF; }
.calc-groups { display: grid; gap: 14px; }
@media (min-width: 860px) { .calc-groups { grid-template-columns: 1fr 1fr; align-items: start; } }
.calc-years summary { cursor: pointer; font-weight: 700; color: var(--brand); padding: 6px 0 10px; }
.calc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.calc-actions .btn { flex: 1 1 200px; }
.calc-actions-sm { margin-top: 10px; }
.calc-actions-sm .calc-link { flex: 0 0 auto; }
.calc-others-card { margin-top: 24px; }
.calc-others { display: flex; flex-direction: column; gap: 6px; }
.calc-other { font: inherit; cursor: pointer; display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid transparent; background: transparent; color: var(--text); text-align: left; }
.calc-other:hover { background: var(--bg); }
.calc-other.is-me { background: var(--brand-tint-2); border-color: var(--brand-soft); }
.calc-other-name { font-weight: 700; font-size: 15px; display: flex; flex-direction: column; line-height: 1.2; }
.calc-other-name small { font-weight: 400; color: var(--text-3); font-size: 12px; }
.calc-other-bar { height: 10px; background: var(--line-soft); border-radius: 999px; overflow: hidden; }
.calc-other-bar span { display: block; height: 100%; background: #8A7EE8; border-radius: 999px; }
.calc-other.is-me .calc-other-bar span { background: var(--brand); }
.calc-other b { font-variant-numeric: tabular-nums; font-size: 15px; white-space: nowrap; }
.calc-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink-900); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 15px; font-weight: 600; z-index: 80; box-shadow: var(--shadow); max-width: calc(100% - 32px); text-align: center; }

/* ---------- Phones: compact university list ---------- */
@media (max-width: 559px) {
  .calc-unis { gap: 10px; }
  .calc-uni { flex-direction: row; align-items: stretch; box-shadow: 0 6px 16px rgba(19, 11, 74, .3); }
  .calc-uni:hover { transform: none; }
  .calc-uni-img { width: 104px; flex-shrink: 0; aspect-ratio: auto; }
  .calc-tag { left: 6px; top: 6px; padding: 2px 7px; font-size: 10px; }
  .calc-tag-kg::before, .calc-tag-uz::before, .calc-tag-ru::before { width: 6px; height: 6px; margin-right: 4px; }
  .calc-uni-body { padding: 10px 12px; gap: 3px; }
  .calc-uni-body strong { font-size: 15px; }
  .calc-uni-body small { font-size: 13px; }
  .calc-uni-fee { font-size: 13px; padding-top: 2px; }
  .calc-uni-cta { font-size: 14px; }
  .calc-other { grid-template-columns: 92px 1fr auto; gap: 8px; }
}
