/* BCC Bilingual Calculator — calculator.css  v2.0.0
   Scoped entirely under .bcc-wrap to avoid WP theme conflicts
   ---------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600&family=DM+Mono:wght@400;500&display=swap');

/* ── Base ─────────────────────────────────────────────────── */
.bcc-wrap *, .bcc-wrap *::before, .bcc-wrap *::after {
  box-sizing: border-box; margin: 0; padding: 0;
}
.bcc-wrap {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: #1a1a2e;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 0 2.5rem;
  line-height: 1.55;
}

/* ── Language switcher ──────────────────────────────────────── */
.bcc-lang-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  padding: 10px 0 8px;
}
.bcc-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border: 1.5px solid #dce3f0;
  border-radius: 24px;
  background: #f7f9fd;
  color: #64748b;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  line-height: 1;
}
.bcc-lang-btn:hover {
  border-color: #1B4FD8;
  background: #eef2ff;
  color: #1B4FD8;
}
.bcc-lang-btn.active {
  border-color: #1B4FD8;
  background: #1B4FD8;
  color: #fff;
  box-shadow: 0 2px 10px rgba(27,79,216,.28);
}
.bcc-lang-btn:focus-visible {
  outline: 3px solid rgba(27,79,216,.4);
  outline-offset: 2px;
}
/* Flag icons */
.bcc-flag {
  display: inline-flex;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.12);
  flex-shrink: 0;
}
.bcc-flag svg { width: 24px; height: auto; display: block; }
.bcc-lang-label { font-size: 12.5px; }

/* ── Header ─────────────────────────────────────────────────── */
.bcc-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0 14px;
  border-bottom: 2px solid #e8edf5;
  margin-bottom: 14px;
}
.bcc-header-icon { flex-shrink: 0; line-height: 0; }
.bcc-title {
  font-size: 21px;
  font-weight: 600;
  color: #0f1c3f;
  letter-spacing: -0.3px;
  margin-bottom: 3px;
}
.bcc-subtitle { font-size: 12.5px; color: #6b7a99; }

/* ── Disclaimer ─────────────────────────────────────────────── */
.bcc-disclaimer {
  background: #f0f4ff;
  border: 1px solid #c7d5f5;
  border-left: 4px solid #1B4FD8;
  border-radius: 7px;
  padding: 10px 15px;
  font-size: 12px;
  color: #374875;
  margin-bottom: 14px;
  line-height: 1.65;
}

/* ── Sections ───────────────────────────────────────────────── */
.bcc-section {
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 11px;
  padding: 14px 16px 18px;
  margin-bottom: 10px;
}
.bcc-prop-sec {
  border-color: #c7d5f5;
  background: linear-gradient(135deg, #f8faff 0%, #fff 55%);
}
.bcc-prop-sec .bcc-section-header h3 { color: #1B4FD8; }
.bcc-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.bcc-section-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: #0f1c3f;
}
.bcc-step-num {
  width: 27px; height: 27px;
  border-radius: 50%;
  background: #1B4FD8;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bcc-prop-step { background: #1B4FD8; line-height: 0; }
.bcc-new-tag {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 10px; border-radius: 20px;
  background: #e0e9ff; color: #1B4FD8;
}
.bcc-sec-note { font-size: 12px; color: #5e6e8c; margin: -6px 0 12px; }

/* ── Sub-labels ─────────────────────────────────────────────── */
.bcc-sublabel {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: #8895b0; margin-bottom: 8px;
}
.bcc-mt  { margin-top: 14px; }
.bcc-mt-sm { margin-top: 8px; }
.bcc-divider { height: 1px; background: #f0f2f7; margin: 12px 0; }

/* ── Toggles ────────────────────────────────────────────────── */
.bcc-toggle-group { display: flex; gap: 8px; flex-wrap: wrap; }
.bcc-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  border: 1.5px solid #dce3f0; border-radius: 8px;
  background: #f7f9fd; color: #4a5568;
  font-family: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.15s;
}
.bcc-toggle:hover  { border-color: #1B4FD8; background: #eef2ff; color: #1B4FD8; }
.bcc-toggle.active { border-color: #1B4FD8; background: #1B4FD8; color: #fff; }
.bcc-toggle:focus-visible { outline: 3px solid rgba(27,79,216,.35); outline-offset: 2px; }

/* ── Purpose row ────────────────────────────────────────────── */
.bcc-purpose-row {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.bcc-purpose-label { font-size: 12px; font-weight: 500; color: #374151; }

/* ── Grids ──────────────────────────────────────────────────── */
.bcc-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.bcc-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }

/* ── Form fields ────────────────────────────────────────────── */
.bcc-field { display: flex; flex-direction: column; }
.bcc-field label { font-size: 12px; font-weight: 500; color: #374151; margin-bottom: 4px; }
.bcc-req { color: #e53e3e; }
.bcc-iw { position: relative; display: flex; align-items: center; }
.bcc-iw.bcc-d::before {
  content: '$'; position: absolute; left: 10px;
  font-size: 12px; color: #8895b0; pointer-events: none; z-index: 1;
}
.bcc-iw.bcc-p::after {
  content: '%'; position: absolute; right: 10px;
  font-size: 12px; color: #8895b0; pointer-events: none;
}
.bcc-field input[type=number],
.bcc-field select {
  width: 100%;
  padding: 8px 10px 8px 22px;
  border: 1.5px solid #dce3f0;
  border-radius: 7px;
  font-family: inherit;
  font-size: 13px;
  color: #1a1a2e;
  background: #fafbfd;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -moz-appearance: textfield;
  appearance: textfield;
}
.bcc-field input[type=number]::-webkit-outer-spin-button,
.bcc-field input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
.bcc-field select { padding-left: 9px; }
.bcc-field input:focus,
.bcc-field select:focus {
  border-color: #1B4FD8;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(27,79,216,.09);
}
.bcc-hint { font-size: 11px; color: #8895b0; margin-top: 3px; line-height: 1.4; }

/* ── Advanced details ───────────────────────────────────────── */
.bcc-adv {
  margin-top: 10px;
  border: 1px dashed #d0d9ed;
  border-radius: 7px;
  padding: 8px 12px;
}
.bcc-adv summary {
  font-size: 12px; color: #5a6888;
  cursor: pointer; font-weight: 500;
  user-select: none;
}
.bcc-adv summary:hover { color: #1B4FD8; }

/* ── Property snapshot ──────────────────────────────────────── */
.bcc-snapshot {
  background: #f0f4ff;
  border: 1.5px solid #c7d5f5;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 14px;
}
.bcc-snapshot-title {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: #1B4FD8; margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.bcc-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}
.bcc-snap-card {
  background: #fff;
  border: 1px solid #dce3f0;
  border-radius: 7px;
  padding: 8px 10px;
}
.bcc-snap-lbl { font-size: 10.5px; color: #8895b0; font-weight: 500; margin-bottom: 3px; }
.bcc-snap-val {
  font-family: 'DM Mono', monospace;
  font-size: 13.5px; font-weight: 500; color: #1B4FD8;
}
.bcc-snap-val.bcc-green { color: #0a7a4c; }
.bcc-snap-val.bcc-amber { color: #b45309; }
.bcc-snap-val.bcc-red   { color: #b91c1c; }

/* ── Action row ─────────────────────────────────────────────── */
.bcc-action-row {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 6px; flex-wrap: wrap;
}
.bcc-calc-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 26px;
  background: #1B4FD8; color: #fff;
  border: none; border-radius: 8px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: -0.1px;
}
.bcc-calc-btn:hover   { background: #1641b3; }
.bcc-calc-btn:active  { transform: scale(0.98); }
.bcc-calc-btn:focus-visible { outline: 3px solid rgba(27,79,216,.4); outline-offset: 3px; }

.bcc-reset-btn {
  padding: 10px 18px;
  background: transparent; color: #6b7a99;
  border: 1.5px solid #dce3f0; border-radius: 8px;
  font-family: inherit; font-size: 13px; cursor: pointer;
  transition: all 0.15s;
}
.bcc-reset-btn:hover { border-color: #b0bdd5; color: #374151; }

/* ── Error ──────────────────────────────────────────────────── */
.bcc-error {
  background: #fff5f5; border: 1px solid #feb2b2;
  color: #c53030; border-radius: 7px;
  padding: 9px 14px; font-size: 13px; margin-top: 8px;
}

/* ── Hidden utility ─────────────────────────────────────────── */
.bcc-hidden { display: none !important; }

/* ── Results panel ──────────────────────────────────────────── */
.bcc-results {
  margin-top: 20px;
  animation: bccFadeIn 0.35s ease;
}
@keyframes bccFadeIn {
  from { opacity: 0; transform: translateY(9px); }
  to   { opacity: 1; transform: translateY(0); }
}
.bcc-res-hdr {
  padding-bottom: 12px;
  border-bottom: 2px solid #e8edf5;
  margin-bottom: 14px;
}
.bcc-res-hdr h3 {
  font-size: 20px; font-weight: 700;
  color: #0f1c3f; margin-bottom: 5px; letter-spacing: -0.3px;
}
.bcc-res-sub { font-size: 13px; color: #5e6e8c; }

/* ── Tier rows ──────────────────────────────────────────────── */
.bcc-tiers { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.bcc-trow {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 15px; border-radius: 10px;
  border: 1.5px solid transparent; flex-wrap: wrap;
}
.bcc-t1 { background: #f0f4ff; border-color: #c7d5f5; }
.bcc-t2 { background: #f0faf5; border-color: #c0e6d5; }
.bcc-t3 { background: #fdf4e7; border-color: #f5d99a; }

.bcc-tbadge {
  flex-shrink: 0; width: 54px; text-align: center;
  padding: 5px 0; border-radius: 5px;
  font-size: 10px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
}
.bcc-bdg-t1 { background: #1B4FD8; color: #fff; }
.bcc-bdg-t2 { background: #0e9e62; color: #fff; }
.bcc-bdg-t3 { background: #d97706; color: #fff; }

.bcc-tinfo { flex: 1; min-width: 0; }
.bcc-tname   { font-size: 13.5px; font-weight: 600; color: #1a1a2e; margin-bottom: 2px; }
.bcc-tbanks  { font-size: 11px; color: #5e6e8c; margin-bottom: 2px; }
.bcc-tpolicy { font-size: 11px; color: #8895b0; }

.bcc-tres { text-align: right; flex-shrink: 0; }
.bcc-t-amount {
  font-family: 'DM Mono', monospace;
  font-size: 21px; font-weight: 500;
}
.bcc-t1 .bcc-t-amount { color: #1B4FD8; }
.bcc-t2 .bcc-t-amount { color: #0a7a4c; }
.bcc-t3 .bcc-t-amount { color: #b45309; }
.bcc-t-insuff { font-size: 13px !important; color: #6b7a99 !important; }
.bcc-t-rates  { font-size: 10.5px; color: #8895b0; margin-top: 2px; }

/* Feasibility badges */
.bcc-feas {
  font-size: 11px; margin-top: 4px;
  padding: 3px 8px; border-radius: 4px; display: inline-block;
}
.bcc-feas-ok    { background: #dcfce7; color: #166534; }
.bcc-feas-tight { background: #fef9c3; color: #854d0e; }
.bcc-feas-no    { background: #fee2e2; color: #991b1b; }

/* ── Purchase feasibility panel ─────────────────────────────── */
.bcc-purch-panel { margin-bottom: 14px; }
.bcc-purch-hdr {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: #1B4FD8; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}

/* ── Summary stats ──────────────────────────────────────────── */
.bcc-sgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px; margin-bottom: 12px;
}
.bcc-scard {
  background: #f7f9fd; border: 1px solid #e4e9f0;
  border-radius: 8px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.bcc-slabel {
  font-size: 10.5px; color: #8895b0;
  font-weight: 500; text-transform: uppercase; letter-spacing: .04em;
}
.bcc-sval {
  font-family: 'DM Mono', monospace;
  font-size: 15px; font-weight: 500; color: #1a1a2e;
}
.bcc-sval.bcc-green { color: #0a7a4c; }
.bcc-sval.bcc-red   { color: #b91c1c; }
.bcc-sval.bcc-amber { color: #b45309; }

/* ── Breakdown ──────────────────────────────────────────────── */
.bcc-bkdet {
  margin-bottom: 10px;
  border: 1px solid #e4e9f0;
  border-radius: 8px; overflow: hidden;
}
.bcc-bkdet summary {
  padding: 9px 14px; font-size: 12.5px; font-weight: 500;
  color: #374151; cursor: pointer;
  background: #f7f9fd; user-select: none;
}
.bcc-bkdet summary:hover { background: #eef2ff; color: #1B4FD8; }
.bcc-bktable { width: 100%; border-collapse: collapse; font-size: 12px; }
.bcc-bktable th {
  background: #f0f4ff; padding: 7px 12px;
  font-weight: 600; color: #374151; font-size: 11px;
  text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid #dce3f0;
}
.bcc-bktable th:last-child,
.bcc-bktable td:last-child { text-align: right; }
.bcc-bktable td { padding: 7px 12px; border-bottom: 1px solid #f0f2f7; color: #374151; }
.bcc-bk-pos td:last-child { color: #0a7a4c; font-family: 'DM Mono', monospace; }
.bcc-bk-neg td:last-child { color: #b91c1c; font-family: 'DM Mono', monospace; }
.bcc-bk-sub { background: #f7f9fd; }
.bcc-bk-sub td { font-weight: 600; }
.bcc-bk-sub td:last-child { color: #1B4FD8; font-family: 'DM Mono', monospace; }

/* ── Results footer note ────────────────────────────────────── */
.bcc-res-note {
  font-size: 11px; color: #8895b0;
  background: #f7f9fd; border: 1px solid #e4e9f0;
  border-radius: 7px; padding: 10px 14px; line-height: 1.65;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 620px) {
  .bcc-section { padding: 12px 12px 14px; }
  .bcc-trow { flex-direction: column; align-items: flex-start; }
  .bcc-tres { width: 100%; text-align: left; margin-top: 6px; }
  .bcc-t-amount { font-size: 18px; }
  .bcc-action-row { flex-direction: column; align-items: stretch; }
  .bcc-calc-btn, .bcc-reset-btn { justify-content: center; width: 100%; }
  .bcc-lang-bar { gap: 5px; }
  .bcc-lang-label { display: none; }
  .bcc-lang-btn { padding: 7px 10px; }
}
