/* ==========================================================================
   HERO CARD - "How Much Cash Can I Get?" (inc/hero-card.php, fsl_hero_card()).
   One card for every new hero; values from the 2026-11-23 mockups
   (workspace/5starloans/hero-build/mockup/). Stand-alone: not scoped to any
   hero, no bare element selectors, own resets against the theme's globals.
   Desktop above 1100px, compact (mobile) layout at 1100px and below - the
   same breakpoint as the location hero.
   Kanit 600/700 and Lato 400/700 are loaded site-wide.
   ========================================================================== */

.fsl-hcard {
  --hc-ink: #101422;
  --hc-text: #3d4352;
  --hc-muted: #5b6273;
  --hc-or: #6b7180;
  --hc-yellow: #FFCB05;
  --hc-yellow-hover: #f2bf00;
  --hc-blue-tint: #e4f2ff;
  --hc-blue-tint-hover: #d4eaff;
  --hc-blue: #48a6f6;

  box-sizing: border-box;
  display: flex; flex-direction: column; gap: 18px;
  width: 100%; padding: 32px; border-radius: 20px;
  background: #fff; box-shadow: 0 24px 60px rgba(10,14,30,.28);
  font-family: 'Lato', system-ui, -apple-system, sans-serif; color: var(--hc-ink);
  text-align: left; -webkit-font-smoothing: antialiased;
}
.fsl-hcard *,
.fsl-hcard *::before,
.fsl-hcard *::after { box-sizing: border-box; }

/* -- Question + line ------------------------------------------------------ */
.fsl-hcard .fsl-hcard__head { display: flex; flex-direction: column; gap: 6px; text-align: center; }
.fsl-hcard .fsl-hcard__q {
  margin: 0; padding: 0;
  font-family: 'Kanit', 'Lato', sans-serif; font-weight: 600;
  font-size: 26px; line-height: 1.2; letter-spacing: 0; text-transform: none;
  color: var(--hc-ink); text-wrap: balance;
}
.fsl-hcard .fsl-hcard__line {
  margin: 0; padding: 0;
  font-size: 16px; font-weight: 400; line-height: 1.4; color: var(--hc-text);
}
/* GP sets sup{position:relative;bottom:1ex}; reset it or the offset doubles. */
.fsl-hcard .fsl-hcard__fn {
  position: static; bottom: auto; height: auto;
  font-size: 9px; font-weight: 400; line-height: 0; vertical-align: super; margin-left: 1px;
}

/* -- Call button (primary) ------------------------------------------------ */
.fsl-hcard a.fsl-hcard__tel {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 66px; margin: 0; padding: 0 16px;
  border: 0; border-radius: 999px;
  background: var(--hc-yellow); color: var(--hc-ink);
  box-shadow: 0 6px 0 rgba(16,20,34,.12);
  font-family: 'Kanit', 'Lato', sans-serif; font-weight: 700; font-size: 26px; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s;
}
.fsl-hcard a.fsl-hcard__tel:hover,
.fsl-hcard a.fsl-hcard__tel:focus,
.fsl-hcard a.fsl-hcard__tel:active { background: var(--hc-yellow-hover); color: var(--hc-ink); text-decoration: none; }
.fsl-hcard a.fsl-hcard__tel:focus-visible { outline: 2px solid var(--hc-ink); outline-offset: 3px; }
.fsl-hcard .fsl-hcard__tel .gb-button-text { font: inherit; color: inherit; }
.fsl-hcard .fsl-hcard__ico--phone { flex: none; display: block; width: 24px; height: 24px; }

/* -- "or" divider --------------------------------------------------------- */
.fsl-hcard .fsl-hcard__or {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; line-height: 1.2; color: var(--hc-or);
}
.fsl-hcard .fsl-hcard__or > span { flex: 1; height: 1px; background: #e2e5ea; }

/* -- Estimate button (secondary) ------------------------------------------
   Same link as inc/amount-buttons.php estimate mode (btn_to_apply_form
   fsl-estimate-btn). That file's wp_head rule (.fsl-estimate-btn x3, 0,3,0,
   !important) sets 15px for every other estimate button; this card is 16px
   (mockup), so the selector below is 0,5,1 + !important. Colours are set here
   too, so the card looks the same if estimate mode's CSS is ever switched off. */
.fsl-hcard a.fsl-hcard__est.fsl-estimate-btn.fsl-estimate-btn.fsl-estimate-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 52px; margin: 0; padding: 0 16px;
  border-radius: 999px;
  background: var(--hc-blue-tint) !important;
  border: 1.5px solid var(--hc-blue) !important;
  color: var(--hc-ink) !important;
  font-family: 'Lato', system-ui, sans-serif; font-weight: 700;
  font-size: 16px !important; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s;
}
.fsl-hcard a.fsl-hcard__est.fsl-estimate-btn.fsl-estimate-btn.fsl-estimate-btn:hover,
.fsl-hcard a.fsl-hcard__est.fsl-estimate-btn.fsl-estimate-btn.fsl-estimate-btn:focus,
.fsl-hcard a.fsl-hcard__est.fsl-estimate-btn.fsl-estimate-btn.fsl-estimate-btn:active {
  background: var(--hc-blue-tint-hover) !important; border-color: var(--hc-blue) !important; color: var(--hc-ink) !important; text-decoration: none;
}
.fsl-hcard a.fsl-hcard__est.fsl-estimate-btn.fsl-estimate-btn.fsl-estimate-btn:focus-visible { outline: 2px solid var(--hc-ink) !important; outline-offset: 3px !important; }
.fsl-hcard .fsl-hcard__est .fsl-est-in { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.fsl-hcard .fsl-hcard__est .fsl-est-arrow { flex: none; display: block; width: 16px; height: 16px; }

/* -- Trust line ------------------------------------------------------------ */
.fsl-hcard ul.fsl-hcard__trust {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  column-gap: 10px; row-gap: 6px;
  margin: 2px 0 0; padding: 14px 0 0; border-top: 1px solid #eef0f3;
  list-style: none;
  font-size: 13px; font-weight: 600; line-height: 1.2; letter-spacing: .01em; color: var(--hc-muted);
}
.fsl-hcard.fsl-hcard--n3 ul.fsl-hcard__trust { column-gap: 8px; }
.fsl-hcard .fsl-hcard__trust > li {
  margin: 0; padding: 0; list-style: none;
  font-size: inherit; line-height: inherit; color: inherit;
}
.fsl-hcard .fsl-hcard__trust > li::before,
.fsl-hcard .fsl-hcard__trust > li::after { content: none; display: none; }
.fsl-hcard .fsl-hcard__ti { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.fsl-hcard.fsl-hcard--n3 .fsl-hcard__ti { gap: 4px; }
.fsl-hcard .fsl-hcard__sep { flex: none; width: 1px; height: 12px; background: #d5d9e0; }
.fsl-hcard .fsl-hcard__ti .fsl-hcard__ico { flex: none; display: block; width: 14px; height: 14px; }

/* -- Compact layout (phones and tablets) ----------------------------------- */
@media (max-width: 1100px) {
  .fsl-hcard { gap: 16px; padding: 24px 20px; box-shadow: 0 16px 40px rgba(10,14,30,.16); }
  .fsl-hcard .fsl-hcard__q { font-size: 22px; }
  .fsl-hcard a.fsl-hcard__tel { height: 62px; font-size: 22px; /* number Kanit 700 22px on mobile (owner 2026-11-23); icon stays 22px */ box-shadow: 0 5px 0 rgba(16,20,34,.12); }
  .fsl-hcard .fsl-hcard__ico--phone { width: 22px; height: 22px; }
  .fsl-hcard .fsl-hcard__or { font-size: 13px; }
  .fsl-hcard a.fsl-hcard__est.fsl-estimate-btn.fsl-estimate-btn.fsl-estimate-btn { height: 50px; }
  .fsl-hcard .fsl-hcard__est .fsl-est-arrow { width: 15px; height: 15px; }
  .fsl-hcard ul.fsl-hcard__trust { column-gap: 8px; }
  .fsl-hcard .fsl-hcard__ti { gap: 4px; }
  .fsl-hcard.fsl-hcard--n3 ul.fsl-hcard__trust { column-gap: 6px; font-size: 12px; }
}

/* -- Hours switch (homepage; inc/hero-card.php 'hours') -----------------------
   Both bodies are in the HTML; each takes only its own height. The open body
   shows by default (no JS = open card); the inline script printed right after
   the card adds .is-closed before first paint, so there is no layout shift. */
.fsl-hcard .fsl-hcard__faces { display: block; min-width: 0; }
.fsl-hcard .fsl-hcard__face { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.fsl-hcard .fsl-hcard__face--closed,
.fsl-hcard.is-closed .fsl-hcard__face--open { display: none; }
.fsl-hcard.is-closed .fsl-hcard__face--closed { display: flex; }
.fsl-hcard .fsl-hcard__head--closed { gap: 10px; }

/* Off hours: the estimate takes the yellow slot (mockup OffHours: 76px, Kanit 24). */
.fsl-hcard a.fsl-hcard__est.fsl-hcard__est--primary.fsl-estimate-btn.fsl-estimate-btn.fsl-estimate-btn {
  height: 76px; border: 0 !important; background: var(--hc-yellow) !important;
  box-shadow: 0 6px 0 rgba(16,20,34,.12);
  font-family: 'Kanit', 'Lato', sans-serif; font-size: 24px !important; line-height: 1;
}
.fsl-hcard a.fsl-hcard__est.fsl-hcard__est--primary.fsl-estimate-btn.fsl-estimate-btn.fsl-estimate-btn:hover,
.fsl-hcard a.fsl-hcard__est.fsl-hcard__est--primary.fsl-estimate-btn.fsl-estimate-btn.fsl-estimate-btn:focus,
.fsl-hcard a.fsl-hcard__est.fsl-hcard__est--primary.fsl-estimate-btn.fsl-estimate-btn.fsl-estimate-btn:active { background: var(--hc-yellow-hover) !important; border: 0 !important; }
.fsl-hcard .fsl-hcard__est--primary .fsl-est-in { gap: 10px; }
.fsl-hcard .fsl-hcard__est--primary .fsl-est-arrow { width: 22px; height: 22px; }
/* ...and the call becomes the light-blue secondary: "Prefer to call? (number)". */
.fsl-hcard a.fsl-hcard__tel.fsl-hcard__tel--alt {
  height: 52px; gap: 9px; background: var(--hc-blue-tint); border: 1.5px solid var(--hc-blue);
  box-shadow: none; font-family: 'Lato', system-ui, sans-serif; font-size: 16px; font-weight: 700;
}
.fsl-hcard a.fsl-hcard__tel.fsl-hcard__tel--alt:hover,
.fsl-hcard a.fsl-hcard__tel.fsl-hcard__tel--alt:focus,
.fsl-hcard a.fsl-hcard__tel.fsl-hcard__tel--alt:active { background: var(--hc-blue-tint-hover); }
.fsl-hcard .fsl-hcard__tel--alt .fsl-hcard__ico--phone { width: 18px; height: 18px; }
.fsl-hcard .fsl-hcard__tel--alt .gb-button-text { font-family: 'Kanit', 'Lato', sans-serif; font-size: 19px; font-weight: 700; }
.fsl-hcard .fsl-hcard__when {
  margin: -8px 0 0; padding: 0; text-align: center;
  font-size: 13px; line-height: 1.3; color: #4a5060;
}

/* -- In-band variant (homepage mobile: card inside the light-blue band) ----- */
@media (max-width: 1100px) {
  .fsl-hcard.fsl-hcard--band {
    gap: 14px; padding: 22px 20px; border: 1px solid #d6e6f5;
    box-shadow: 0 14px 34px rgba(16,40,80,.12);
  }
  .fsl-hcard.fsl-hcard--band .fsl-hcard__face { gap: 14px; }
  .fsl-hcard .fsl-hcard__head--closed { gap: 8px; }
  .fsl-hcard a.fsl-hcard__est.fsl-hcard__est--primary.fsl-estimate-btn.fsl-estimate-btn.fsl-estimate-btn { height: 72px; font-size: 22px !important; box-shadow: 0 5px 0 rgba(16,20,34,.12); }
  .fsl-hcard .fsl-hcard__est--primary .fsl-est-arrow { width: 20px; height: 20px; }
  .fsl-hcard a.fsl-hcard__tel.fsl-hcard__tel--alt { height: 50px; }
  .fsl-hcard .fsl-hcard__tel--alt .gb-button-text { font-size: 18px; }
}

/* Narrow cards: the three office trust items need ~301px at 12px; below
   that (card content box under ~310px, i.e. under ~380px of page width, or a
   375px desktop window with a scrollbar) they would wrap. Measured on the
   card's OWN width (container query), so scrollbars and gutters count:
   drop the two grey icons (the star stays) and tighten the gaps.
   Fallback for browsers without container queries (iOS < 16): viewport
   media query below 380px. */
.fsl-hcard { container: fsl-hcard / inline-size; }
@container fsl-hcard (max-width: 310px) {
  .fsl-hcard--n3 ul.fsl-hcard__trust { column-gap: 5px !important; letter-spacing: 0; }
  .fsl-hcard--n3 .fsl-hcard__ti > .fsl-hcard__ico:not(.fsl-hcard__ico--star) { display: none; }
}
@container fsl-hcard (max-width: 270px) {
  .fsl-hcard .fsl-hcard__q { font-size: 20px; } /* one line at 320 */
}
@supports not (container-type: inline-size) {
  @media (max-width: 379px) {
    .fsl-hcard.fsl-hcard--n3 ul.fsl-hcard__trust { column-gap: 5px; letter-spacing: 0; }
    .fsl-hcard.fsl-hcard--n3 .fsl-hcard__ti > .fsl-hcard__ico:not(.fsl-hcard__ico--star) { display: none; }
  }
  @media (max-width: 359px) {
    .fsl-hcard .fsl-hcard__q { font-size: 20px; }
  }
}
/* Very narrow phones: slightly less card padding. */
@media (max-width: 359px) {
  .fsl-hcard,
  .fsl-hcard.fsl-hcard--band { padding: 22px 14px; }
}
/* Off-hours body on very narrow cards (320px phones): "Prefer to call? (number)"
   and the two-line promise must fit the button / two lines. */
@container fsl-hcard (max-width: 270px) {
  .fsl-hcard a.fsl-hcard__tel.fsl-hcard__tel--alt { gap: 6px; padding: 0 10px; font-size: 14px; }
  .fsl-hcard .fsl-hcard__tel--alt .gb-button-text { font-size: 16px; }
  .fsl-hcard .fsl-hcard__tel--alt .fsl-hcard__ico--phone { width: 16px; height: 16px; }
  .fsl-hcard .fsl-hcard__head--closed .fsl-hcard__line { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .fsl-hcard a.fsl-hcard__tel,
  .fsl-hcard a.fsl-hcard__est.fsl-estimate-btn.fsl-estimate-btn.fsl-estimate-btn { transition: none; }
}
