@charset "UTF-8";
/* =============================================================================
   BSB Interactive Card — shared vocabulary for interactive Gutenberg blocks
   (calculators, decision tools, etc.) in bionic-blocks.

   This is the single source of truth for the visual shell + design tokens that
   every interactive block shares, so calculators stay consistent with each
   other and with the BSB brand theme. Tokens are seeded from
   abstracts/_colors.scss — change a brand colour there and it flows here.

   Authored in SCSS; compile to interactive-card.css and enqueue it (once,
   lazily) from each interactive block alongside that block's own thin
   internals stylesheet:

     sass interactive-card.scss interactive-card.css --no-source-map --style=expanded
     (run from assets/styles/ so the abstracts/ import resolves)

   ── STRUCTURE (BEM) ─────────────────────────────────────────────────────────
     .bsb-icard                    container — width, design tokens, typography
       .bsb-icard__frame           bordered, rounded card surface
         .bsb-icard__header        brand-orange bar (on EVERY card)
           .bsb-icard__title       <h2> — the calculator's name
           .bsb-icard__subtitle    <p>  — one line, always directly after title
         .bsb-icard__body          padded content area
     .bsb-icard__footnote          optional "read next" panel, continues the card

   ── SHARED PRIMITIVES (opt-in, used inside __body) ───────────────────────────
     __section-label  __field __label __hint __input __error
     __btn __btn--primary __btn--ghost   __result   __note   __warning

   A block keeps its own scoped stylesheet for bespoke internals (diagrams,
   tabs, decision UI) but consumes the tokens below via var(--orange) etc.
   ============================================================================= */
.bsb-icard {
  /* ---- design tokens (brand-seeded; override per-card if ever needed) ---- */
  --orange: #ec6607; /* #ec6607 — primary accent      */
  --orange-hover: #fc8a39; /* #fc8a39 — hover/active accent  */
  --orange-dark: #c65606; /* #c65606 — pressed/strong text  */
  --tint: #fff8f4; /* warm wash behind accented panels */
  --tint-border: #f0c8a0;
  --text: #242425; /* #242425 — headings / strong    */
  --body-text: #404040; /* #404040 — long-form body copy  */
  --muted: #707070; /* hints, secondary labels        */
  --faint: #909090; /* captions, placeholders         */
  --border: #d6d6d6;
  --rule: #ebebeb; /* hairline dividers              */
  --surface: #ffffff;
  --light-bg: #f5f5f5; /* subtle panel background        */
  --radius: 10px;
  --radius-sm: 6px;
  /* status palette */
  --warning-bg: #fff3cd;
  --warning-border: #ffc107;
  --warning-text: #6d4c00;
  --success-bg: #f0faf0;
  --success-border: #4caf50;
  --success-text: #1b5e20;
  --danger-bg: #fff0f0;
  --danger-border: #f44336;
  --danger-text: #b71c1c;
  display: block;
  width: 100%; /* full content-column width, reflows naturally    */
  margin: 2em 0;
  font-family: inherit; /* inherits the theme's Poppins                    */
  color: var(--body-text);
  line-height: 1.6;
}

.bsb-icard *,
.bsb-icard *::before,
.bsb-icard *::after {
  box-sizing: border-box;
}

/* ── card shell ──────────────────────────────────────────────────────────── */
.bsb-icard__frame {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden; /* clips the orange bar to the rounded corners     */
}

.bsb-icard__header {
  background: var(--orange);
  color: #fff;
  padding: 20px 24px;
}

.bsb-icard__title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.2px;
  color: #fff;
}

.bsb-icard__subtitle {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #fff;
  opacity: 0.9;
}

.bsb-icard__body {
  padding: 24px;
}

/* "read next" panel that visually continues below the frame */
.bsb-icard__footnote {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  margin-top: -1px;
  padding: 16px 24px 20px;
}

/* ── shared primitives ───────────────────────────────────────────────────── */
.bsb-icard__section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
  margin: 22px 0 14px;
}

.bsb-icard__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bsb-icard__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.bsb-icard__hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.bsb-icard__input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s;
}

.bsb-icard__input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(236, 102, 7, 0.08);
}

.bsb-icard__error {
  font-size: 11px;
  color: var(--danger-text);
}

.bsb-icard__btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 8px;
  padding: 11px 24px;
  border: 1.5px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.bsb-icard__btn--primary {
  background: var(--orange);
  color: #fff;
}

.bsb-icard__btn--primary:hover {
  background: var(--orange-hover);
}

.bsb-icard__btn--ghost {
  background: none;
  border-color: var(--border);
  color: var(--muted);
  font-weight: 600;
}

.bsb-icard__btn--ghost:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.bsb-icard__result {
  background: var(--orange);
  color: #fff;
  border-radius: 8px;
  padding: 16px 20px;
}

.bsb-icard__note {
  background: var(--light-bg);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}

.bsb-icard__warning {
  background: var(--warning-bg);
  border: 1.5px solid var(--warning-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--warning-text);
  line-height: 1.5;
}

/* ── small screens ───────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .bsb-icard__header {
    padding: 16px 18px;
  }
  .bsb-icard__body {
    padding: 18px;
  }
  .bsb-icard__footnote {
    padding: 14px 18px 16px;
  }
}
