/* ─── Guest counter widget ─────────────────────────────────────
   Styles for the in-article door counter injected by build-blog.mjs
   ({{widget:guest-counter}}). Loaded only on posts that opt in, so nothing
   here leaks into the global blog chrome. Brand tokens from css/styles.css;
   the card, the hard offset shadow and the navy panel follow
   css/roi-calculator.css.

   Phone first: the In and Out buttons are the biggest targets on the card,
   with In on the thumb side. Capacity states read in text first; colour
   only repeats it (amber near capacity, coral at and over). Every rule is
   scoped under .gc so .post-body p / h2 / a (0,1,1) never win. */

.gc{margin:44px 0;padding:28px;background:#fff;border:1px solid var(--line);border-radius:24px;box-shadow:18px 18px 0 var(--lav)}
.gc [hidden]{display:none !important}
.gc .gc-title{font-size:clamp(26px,2.6vw,32px);line-height:1.05;margin:4px 0 10px}
.gc .gc-note{font-size:15px;line-height:1.55;color:var(--muted);margin:0 0 20px}

.gc .gc-areas{display:grid;gap:14px}
.gc .gc-area{background:var(--navy);color:#cbd5e1;border:2px solid var(--navy);border-radius:18px;padding:20px 20px 18px;min-width:0;transition:border-color .2s,background-color .2s}
.gc .gc-area-name{display:none;margin:0 0 4px;font-size:11.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#94a3b8}
.gc .gc-app[data-two] .gc-area-name{display:block}

.gc .gc-readout{margin:0;text-align:center;line-height:1}
.gc .gc-count{display:block;font-size:clamp(64px,15vw,96px);font-weight:800;line-height:1;letter-spacing:-.05em;color:var(--white);font-variant-numeric:tabular-nums;transition:color .2s}
.gc .gc-inside{display:block;margin-top:6px;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#94a3b8}
/* Reserves its line so setting a capacity does not shift the buttons. */
.gc .gc-status{display:block;min-height:22px;margin-top:10px;font-size:15px;font-weight:700;line-height:22px;letter-spacing:-.01em;color:#cbd5e1}

.gc .gc-meter{height:8px;margin:12px 0 0;border-radius:999px;background:rgba(255,255,255,.12);overflow:hidden}
.gc .gc-meter span{display:block;width:0;height:100%;border-radius:inherit;background:var(--mint);transition:width .2s ease}

.gc .gc-pad{display:grid;grid-template-columns:1fr 1.4fr;gap:12px;margin-top:18px}
.gc .gc-btn{display:flex;align-items:center;justify-content:center;gap:10px;height:76px;padding:0 12px;border-radius:16px;font-family:inherit;font-size:22px;font-weight:800;letter-spacing:-.02em;cursor:pointer;touch-action:manipulation;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;transition:transform .08s ease,background-color .2s,opacity .2s}
.gc .gc-btn span{font-size:34px;font-weight:700;line-height:1}
.gc .gc-btn:active{transform:scale(.97)}
.gc .gc-btn:focus-visible{outline:3px solid var(--lime);outline-offset:3px}
.gc .gc-in{border:0;background:var(--mint);color:var(--navy)}
.gc .gc-out{border:2px solid rgba(255,255,255,.32);background:transparent;color:var(--white)}
.gc .gc-out[aria-disabled="true"]{opacity:.4;cursor:default}
.gc .gc-out[aria-disabled="true"]:active{transform:none}

.gc .gc-cap{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;padding-top:14px;border-top:1px solid rgba(255,255,255,.12)}
.gc .gc-cap span{font-size:11.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#94a3b8}
/* 16px keeps iOS from zooming the page on focus. */
.gc .gc-cap input{width:128px;height:44px;padding:0 13px;border:1px solid rgba(255,255,255,.22);border-radius:12px;background:rgba(255,255,255,.06);color:var(--white);font-family:inherit;font-size:16px;font-weight:700;letter-spacing:-.01em;text-align:right;transition:border-color .2s,box-shadow .2s}
.gc .gc-cap input::placeholder{color:#7c8aa0;font-weight:600}
.gc .gc-cap input:focus{outline:0;border-color:var(--mint);box-shadow:0 0 0 3px rgba(93,254,194,.22)}
.gc .gc-cap input::-webkit-outer-spin-button,.gc .gc-cap input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.gc .gc-cap input[type=number]{-moz-appearance:textfield;appearance:textfield}

/* Capacity states. The status line already says it in words. */
.gc .gc-area[data-level="near"]{border-color:#f6a417}
.gc .gc-area[data-level="near"] .gc-count,.gc .gc-area[data-level="near"] .gc-status{color:#f6a417}
.gc .gc-area[data-level="near"] .gc-meter span{background:#f6a417}
.gc .gc-area[data-level="full"],.gc .gc-area[data-level="over"]{border-color:#ff7a6b}
.gc .gc-area[data-level="over"]{background:#2a0b12}
.gc .gc-area[data-level="full"] .gc-count,.gc .gc-area[data-level="full"] .gc-status,
.gc .gc-area[data-level="over"] .gc-count,.gc .gc-area[data-level="over"] .gc-status{color:#ff7a6b}
.gc .gc-area[data-level="full"] .gc-meter span,.gc .gc-area[data-level="over"] .gc-meter span{background:#ff7a6b}

.gc .gc-total{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:14px 0 0;padding:12px 4px 0;border-top:1px solid var(--line);font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.gc .gc-total strong{font-size:26px;font-weight:800;letter-spacing:-.03em;text-transform:none;color:var(--heading);font-variant-numeric:tabular-nums}

.gc .gc-tools{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 18px;margin-top:16px}
.gc .gc-second{display:inline-flex;align-items:center;gap:10px;min-height:44px;font-size:15px;font-weight:700;letter-spacing:-.01em;color:var(--heading);cursor:pointer;-webkit-tap-highlight-color:transparent}
.gc .gc-second input{flex:none;width:20px;height:20px;margin:0;accent-color:var(--indigo);cursor:pointer}
.gc .gc-reset{flex:none;height:44px;padding:0 18px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--heading);font-family:inherit;font-size:14px;font-weight:700;letter-spacing:0;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:background-color .2s,border-color .2s,color .2s}
.gc .gc-reset:hover{border-color:var(--peri)}
.gc .gc-reset:focus-visible{outline:3px solid var(--indigo);outline-offset:3px}
.gc .gc-reset[data-armed]{border-color:#e0533f;background:#fff3f1;color:#b42318}
.gc .gc-nostore{margin:12px 0 0;font-size:13.5px;line-height:1.5;color:var(--muted)}

.gc .gc-cta{margin-top:24px;padding-top:22px;border-top:1px solid var(--line)}
.gc .gc-cta p{margin:0 0 16px;font-size:16px;line-height:1.55;color:var(--body)}
.gc .gc-cta strong{color:var(--heading)}
/* .post-body a (0,1,1) would paint the CTA as an indigo underlined link. */
.gc .button-mint{color:var(--navy);border-bottom:0}

.gc .gc-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

.gc .gc-fallback{margin:0;font-size:15px;line-height:1.55;color:var(--muted)}
html.js .gc .gc-fallback{display:none}
html:not(.js) .gc .gc-app{display:none}

/* Two areas sit side by side once each still gets a thumb-sized pad. */
@media (min-width:700px){
  .gc .gc-app[data-two] .gc-areas{grid-template-columns:1fr 1fr}
  .gc .gc-app[data-two] .gc-count{font-size:64px}
  .gc .gc-app[data-two] .gc-pad{grid-template-columns:1fr 1.2fr}
  .gc .gc-app[data-two] .gc-cap input{width:104px}
}
@media (max-width:620px){
  .gc{padding:20px;box-shadow:10px 10px 0 var(--lav)}
  .gc .gc-area{padding:18px 16px 16px}
  .gc .gc-btn{height:72px}
}
@media (prefers-reduced-motion:reduce){
  .gc .gc-area,.gc .gc-count,.gc .gc-meter span,.gc .gc-btn,.gc .gc-reset{transition:none}
  .gc .gc-btn:active{transform:none}
}
