/*
 * Blue Henry — DIY vs. Blue Henry Cost Calculator
 * All rules are scoped under .bh-calc.bh-calc so the WordPress theme cannot break the
 * calculator and the calculator cannot leak styles into the surrounding page.
 */

.bh-calc.bh-calc {
  --bh-sea-glass: #6aa6a9;
  --bh-navy: #3a547c;
  --bh-white: #ffffff;
  --bh-citrus-yellow: #f8e646;
  --bh-blood-orange: #fd794c;
  --bh-grapefruit-blush: #ff9e9e;
  --bh-botanical-forest: #3e493d;
  --bh-font-display: "Governor", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --bh-font-script: "Better Times", "Brush Script MT", "Segoe Script", cursive;
  --bh-font-body: "Avenir LT Std", "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  font-family: var(--bh-font-body);
  color: var(--bh-botanical-forest);
  background: var(--bh-white);
  max-width: 900px;
  margin: 0 auto;
  padding: 0;
  line-height: 1.55;
  font-size: 16px;
  box-sizing: border-box;
}
.bh-calc.bh-calc *, .bh-calc.bh-calc *::before, .bh-calc.bh-calc *::after { box-sizing: border-box !important; }

/* ---------- header ---------- */
.bh-calc.bh-calc .bhc-header {
  background: var(--bh-navy);
  color: var(--bh-white);
  padding: 40px 32px 34px;
  border-radius: 14px 14px 0 0;
  text-align: center;
}
.bh-calc.bh-calc .bhc-header h2 {
  font-family: var(--bh-font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  line-height: 1.05;
  font-size: clamp(26px, 4.5vw, 40px);
  margin: 0 0 6px;
  color: var(--bh-white);
}
.bh-calc.bh-calc .bhc-header .bhc-script {
  font-family: var(--bh-font-script);
  font-size: clamp(22px, 3.5vw, 30px);
  color: var(--bh-citrus-yellow);
  margin: 0 0 14px;
}
.bh-calc.bh-calc .bhc-header p.bhc-intro {
  max-width: 560px;
  margin: 0 auto;
  font-size: 16px;
  color: var(--bh-white);
  opacity: 0.92;
}

/* ---------- body layout ---------- */
.bh-calc.bh-calc .bhc-body {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 2px solid var(--bh-navy);
  border-top: none;
  border-radius: 0 0 14px 14px;
  overflow: hidden;
}
.bh-calc.bh-calc .bhc-inputs  { flex: 1 1 340px; padding: 28px 28px 20px; background: var(--bh-white); }
.bh-calc.bh-calc .bhc-results { flex: 1 1 340px; padding: 28px 28px 24px; background: #f4f7f7; border-left: 1px solid #d9e2e2; }
@media (max-width: 719px) {
  .bh-calc.bh-calc .bhc-results { border-left: none; border-top: 1px solid #d9e2e2; }
  .bh-calc.bh-calc .bhc-header { padding: 30px 20px 26px; }
  .bh-calc.bh-calc .bhc-inputs, .bh-calc.bh-calc .bhc-results { padding: 22px 18px; }
}

/* ---------- form ---------- */
.bh-calc.bh-calc .bhc-label {
  display: block;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--bh-navy);
  margin: 0 0 5px;
}
.bh-calc.bh-calc .bhc-field { margin-bottom: 18px; }
.bh-calc.bh-calc .bhc-hint { font-size: 12.5px; color: #6b756a; margin: 4px 0 0; }
.bh-calc.bh-calc select,
.bh-calc.bh-calc input[type="number"] {
  width: 100%;
  font-family: var(--bh-font-body);
  font-size: 16px;
  color: var(--bh-botanical-forest);
  background: var(--bh-white);
  border: 2px solid var(--bh-sea-glass);
  border-radius: 8px;
  padding: 10px 12px;
  appearance: auto;
  /* The theme (Foundation) puts margin-bottom and a fixed height on all
     inputs; the phantom margin breaks flex centering in .bhc-affix. */
  margin: 0;
  height: auto;
  line-height: 1.4;
}
.bh-calc.bh-calc select:focus-visible,
.bh-calc.bh-calc input:focus-visible,
.bh-calc.bh-calc a:focus-visible,
.bh-calc.bh-calc summary:focus-visible {
  outline: 3px solid var(--bh-citrus-yellow);
  outline-offset: 2px;
}
.bh-calc.bh-calc .bhc-row2 { display: flex; gap: 14px; }
.bh-calc.bh-calc .bhc-row2 .bhc-field { flex: 1; min-width: 0; }
@media (max-width: 460px) {
  .bh-calc.bh-calc .bhc-row2 { flex-direction: column; gap: 0; }
}

/* fruit program rows */
.bh-calc.bh-calc .bhc-rowhead,
.bh-calc.bh-calc .bhc-fruitrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 96px 24px;
  gap: 8px;
  align-items: center;
}
.bh-calc.bh-calc .bhc-rowhead {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #6b756a;
  margin-bottom: 4px;
}
.bh-calc.bh-calc .bhc-fruitrow { margin-bottom: 8px; }
.bh-calc.bh-calc .bhc-fruitrow select,
.bh-calc.bh-calc .bhc-fruitrow input[type="number"] {
  padding: 9px 10px;
  font-size: 15px;
}
.bh-calc.bh-calc .bhc-rowdel {
  background: none;
  border: none;
  color: #8a9389;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 2px;
  font-family: var(--bh-font-body);
}
.bh-calc.bh-calc .bhc-rowdel:hover { color: var(--bh-blood-orange); }
.bh-calc.bh-calc .bhc-addrow {
  display: block;
  width: 100%;
  background: none;
  border: 2px dashed var(--bh-sea-glass);
  border-radius: 8px;
  color: var(--bh-sea-glass);
  font-family: var(--bh-font-body);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 12px;
  padding: 9px 12px;
  margin-top: 2px;
  cursor: pointer;
  transition: filter 0.15s ease;
}
.bh-calc.bh-calc .bhc-addrow:hover { filter: brightness(0.85); }
@media (max-width: 400px) {
  .bh-calc.bh-calc .bhc-rowhead,
  .bh-calc.bh-calc .bhc-fruitrow {
    grid-template-columns: minmax(0, 1fr) 74px 84px 20px;
    gap: 6px;
  }
}

/* prefix/suffix input decorations — the wrapper carries the border so the
   "$" and the value read as one unit instead of a detached symbol. */
.bh-calc.bh-calc .bhc-affix {
  display: flex;
  align-items: center;
  background: var(--bh-white);
  border: 2px solid var(--bh-sea-glass);
  border-radius: 8px;
}
.bh-calc.bh-calc .bhc-affix .bhc-prefix {
  color: #6b756a;
  font-size: 15px;
  padding: 0 2px 0 12px;
  pointer-events: none;
}
.bh-calc.bh-calc .bhc-affix input[type="number"] {
  border: none;
  flex: 1;
  min-width: 0;
  padding: 10px 12px 10px 4px;
}
.bh-calc.bh-calc .bhc-affix:focus-within {
  outline: 3px solid var(--bh-citrus-yellow);
  outline-offset: 2px;
}
.bh-calc.bh-calc .bhc-affix input:focus-visible { outline: none; }
.bh-calc.bh-calc .bhc-fruitrow .bhc-affix .bhc-prefix { padding-left: 9px; }
.bh-calc.bh-calc .bhc-fruitrow .bhc-affix input[type="number"] { padding: 9px 8px 9px 3px; }

/* advanced accordion */
.bh-calc.bh-calc details.bhc-adv {
  margin: 6px 0 10px;
  border-top: 1px solid #d9e2e2;
  padding-top: 12px;
}
.bh-calc.bh-calc details.bhc-adv summary {
  cursor: pointer;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--bh-sea-glass);
  list-style: none;
  display: flex; align-items: center; gap: 8px;
  user-select: none;
}
.bh-calc.bh-calc details.bhc-adv summary::-webkit-details-marker { display: none; }
.bh-calc.bh-calc details.bhc-adv summary::after {
  content: "▾"; font-size: 13px; transition: transform 0.15s ease;
}
.bh-calc.bh-calc details.bhc-adv[open] summary::after { transform: rotate(180deg); }
.bh-calc.bh-calc details.bhc-adv .bhc-advbody { padding-top: 14px; }

/* ---------- results ---------- */
.bh-calc.bh-calc .bhc-verdict {
  background: var(--bh-navy);
  color: var(--bh-white);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 18px;
}
.bh-calc.bh-calc .bhc-verdict .bhc-verdict-eyebrow {
  font-size: 11.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.1em; opacity: 0.85; margin: 0 0 4px;
}
.bh-calc.bh-calc .bhc-verdict .bhc-verdict-big {
  font-family: var(--bh-font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.1;
  margin: 0;
}
/* Governor has no numerals, so digits fall through to the next font in the
   stack, which reads thin and mis-aligned next to Governor's heavy caps.
   Set the number in Montserrat Bold — a brand font the site self-hosts —
   so it carries the same visual weight as the display type around it. */
.bh-calc.bh-calc .bhc-verdict .bhc-verdict-big .bhc-accent {
  color: var(--bh-citrus-yellow);
  font-family: "Montserrat", "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
}
.bh-calc.bh-calc .bhc-verdict .bhc-verdict-sub { margin: 6px 0 0; font-size: 14.5px; opacity: 0.92; }

.bh-calc.bh-calc .bhc-compare { display: flex; gap: 12px; margin-bottom: 16px; }
.bh-calc.bh-calc .bhc-card {
  flex: 1; border-radius: 10px; padding: 14px 16px; background: var(--bh-white);
  border: 2px solid #d9e2e2;
}
.bh-calc.bh-calc .bhc-card.bhc-card-bh { border-color: var(--bh-sea-glass); }
.bh-calc.bh-calc .bhc-card h3 {
  margin: 0 0 2px; font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--bh-navy);
  font-family: var(--bh-font-body);
}
.bh-calc.bh-calc .bhc-card .bhc-cost { font-size: 26px; font-weight: 800; color: var(--bh-botanical-forest); margin: 0; }
.bh-calc.bh-calc .bhc-card .bhc-cost small { font-size: 13px; font-weight: 400; color: #6b756a; white-space: nowrap; }
.bh-calc.bh-calc .bhc-card ul { margin: 8px 0 0; padding: 0; list-style: none; font-size: 12.5px; color: #55604f; }
.bh-calc.bh-calc .bhc-card ul li { display: flex; justify-content: space-between; gap: 8px; padding: 1.5px 0; }
.bh-calc.bh-calc .bhc-card ul li.bhc-total { border-top: 1px solid #d9e2e2; margin-top: 4px; padding-top: 4px; }
@media (max-width: 460px) { .bh-calc.bh-calc .bhc-compare { flex-direction: column; } }

.bh-calc.bh-calc .bhc-stats { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.bh-calc.bh-calc .bhc-stat {
  flex: 1 1 120px; background: var(--bh-white); border: 2px solid #d9e2e2;
  border-radius: 10px; padding: 10px 12px; text-align: center;
}
.bh-calc.bh-calc .bhc-stat .bhc-stat-num { font-size: 20px; font-weight: 800; color: var(--bh-navy); display: block; }
.bh-calc.bh-calc .bhc-stat .bhc-stat-lbl {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.07em; color: #6b756a;
}

.bh-calc.bh-calc .bhc-cta { text-align: center; margin-bottom: 8px; }
.bh-calc.bh-calc .bhc-cta .bhc-script {
  font-family: var(--bh-font-script);
  font-size: 24px; color: var(--bh-navy); margin: 0 0 10px;
}
.bh-calc.bh-calc .bhc-btn {
  display: inline-block;
  font-family: var(--bh-font-body);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 14px;
  text-decoration: none;
  border-radius: 999px;
  padding: 13px 26px;
  margin: 4px 6px;
  transition: filter 0.15s ease;
}
.bh-calc.bh-calc .bhc-btn:hover { filter: brightness(1.08); }
.bh-calc.bh-calc .bhc-btn-primary { background: var(--bh-blood-orange); color: #402413; }
.bh-calc.bh-calc .bhc-btn-secondary { background: var(--bh-navy); color: var(--bh-white); }

.bh-calc.bh-calc .bhc-foot {
  font-size: 11.5px; color: #8a9389; margin: 14px 0 0; text-align: center;
}

/* Time cost, sitting below the money total on both cards. */
.bh-calc.bh-calc li.bhc-time {
  border-top: 1px dashed rgba(58, 84, 124, 0.3);
  margin-top: 6px;
  padding-top: 7px;
}
.bh-calc.bh-calc li.bhc-time b { font-weight: 700; }

/* Documented operational cost that carries no dollar figure. */
.bh-calc.bh-calc .bhc-cardnote {
  font-size: 11.5px;
  line-height: 1.45;
  color: #6d7a6c;
  margin: 10px 0 0;
}

/* Cost per garnish is the number Blue Henry wins on, so it leads. */
.bh-calc.bh-calc .bhc-stat-hero .bhc-stat-num {
  font-size: 1.5em;
  color: var(--bh-blood-orange);
}

/* Next price break, inside the Blue Henry card. */
.bh-calc.bh-calc .bhc-tiernote {
  font-size: 12px;
  line-height: 1.45;
  color: var(--bh-navy);
  background: rgba(58, 84, 124, 0.07);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 10px 0 0;
}

/* ---------- modal (CTA anchor targets that start hidden) ----------
   The overlay is appended to <body>, outside .bh-calc, so these rules
   cannot ride the double-class scope above. Class names stay bhc-prefixed
   to avoid colliding with theme styles. */
.bhc-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(58, 84, 124, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.bhc-modal {
  position: relative;
  background: #ffffff;
  border-radius: 14px;
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 34px 18px 18px;
  box-sizing: border-box;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.bhc-modal-close {
  position: absolute;
  top: 6px;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  color: #6b756a;
  padding: 4px 8px;
}
.bhc-modal-close:hover { color: #fd794c; }
.bhc-modal-body > * {
  margin: 0 !important;
  max-width: 100% !important;
}
