/* ============================================================
   TLC Glass Card  .  shared/cards/v1/tlc-card.css  .  v1.002
   ------------------------------------------------------------
   v1.002 — promoted the estimate "selection extension" (chips /
   pick-one tiers / live totals / detail button) into this shared
   file so the live Estimates tiles AND the style-guide example
   render from one source (was duplicated in admin-estimate-groups).
   ------------------------------------------------------------
   Light "soft frosted" glass card for LIGHT backgrounds.
   The single-source primitive behind:
     - the Estimates "Choose Your Services" group tiles
       (Content/Snippets/admin-estimate-groups.html)
     - the Portal style guide "Glass cards" example
       (shared/style-guide/v1/template.txt  #cards)

   Edit THIS file, never re-inline it; bump ?v=N in
   Content/Snippets/sst-glass-card.html after every edit
   (sst-cache-bust rule).

   Structure:
     .tlc-card                  frosted wrapper (rounded, soft shadow)
       .tlc-card-banner         full-bleed illustration band (top)
         > img                  raster/illustration (cover)
         .is-contain            transparent PNG / SVG (contain + pad)
         .tlc-card-banner-ph    placeholder band (ghosted FA icon)
       .tlc-card-head           title + sub/description
         .tlc-card-title        restrained weight (NOT all-bold)
         .tlc-card-sub
       .tlc-card-body           free content (chips, lists, etc.)
       .tlc-card-foot           footer (totals, actions) — pinned bottom

   Typography is deliberately restrained: titles sit at 600, body
   copy at 400. Brand color (--color1raw) carries emphasis instead
   of heavy weights.
   ============================================================ */

.tlc-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  /* 20px, was 16 — one card radius, and it matches the modals. Craig 2026-08-24. */
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.70);
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(10px) saturate(118%);
  backdrop-filter: blur(10px) saturate(118%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 10px 30px rgba(20, 30, 50, 0.10),
    0 2px 6px rgba(20, 30, 50, 0.06);
  overflow: hidden; /* clip the full-bleed banner to the rounded top */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
/* RAISED, WITHOUT MOVING. Craig, 2026-08-23: "let's try the raised animation
   hover also on these glass cards." It already raised - and it did it with
   `transform: translateY(-3px)`, which is the lift he ruled out estate-wide on
   the same day the .odc-card was built: "Make sure these cards do not 'lift' on
   hover, that animation makes me motion sick and i want to avoid it ... treat it
   as binding on every card, tile and panel on this estate."

   So the raise stays and the MOVEMENT goes. Elevation is carried entirely by the
   shadow, which is what actually reads as "raised" anyway; the card's geometry is
   identical at rest and on hover, so nothing under the cursor shifts. Shadow
   spread is pushed a little past the old values to keep the same lift at a
   distance now that the 3px of travel is not helping sell it.

   To put the movement back, re-add `transform: translateY(-3px)` here - but check
   with Craig first, because the no-lift rule is an accessibility requirement. */
.tlc-card:hover,
.tlc-card:focus-within {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 22px 48px rgba(20, 30, 50, 0.18),
    0 6px 14px rgba(20, 30, 50, 0.10);
}

/* ---- Full-bleed illustration banner ---- */
.tlc-card-banner {
  display: block;
  width: 100%;
  height: clamp(140px, 17vw, 178px);
  overflow: hidden;
  background: linear-gradient(140deg, rgba(var(--color1raw), 0.10), rgba(var(--color2raw), 0.05));
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
}
.tlc-card-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  /* Canonical hero motion, shared with .odc-media::before and .tlp-org-logo img.
     Was 1.04 / 0.35s ease - close enough to look like a mistake beside the others,
     far enough to read as a different component. */
  transform: scale(1);
  transition: transform .45s cubic-bezier(.22, .61, .36, 1);
  will-change: transform;
}
.tlc-card:hover .tlc-card-banner img,
.tlc-card:focus-within .tlc-card-banner img { transform: scale(1.07); }

/* Transparent illustration / SVG: contain + breathing room, no crop */
.tlc-card-banner.is-contain {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
}
.tlc-card-banner.is-contain img {
  width: auto;
  height: auto;
  max-width: 90%;
  max-height: 82%;
  object-fit: contain;
}
.tlc-card:hover .tlc-card-banner.is-contain img,
.tlc-card:focus-within .tlc-card-banner.is-contain img { transform: scale(1.07); }
@media (prefers-reduced-motion: reduce) {
  .tlc-card, .tlc-card-banner img { transition: none; }
}

/* Placeholder band (group has no illustration yet) */
.tlc-card-banner-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, rgba(var(--color1raw), 0.12), rgba(var(--color2raw), 0.06));
}
.tlc-card-banner-ph i,
.tlc-card-banner-ph svg.svg-inline--fa {
  font-size: clamp(40px, 5vw, 56px);
  color: rgba(var(--color1raw), 0.32);
}

/* ---- Insets below the banner ---- */
.tlc-card-head,
.tlc-card-body,
.tlc-card-foot {
  padding-left: clamp(1rem, 2vw, 1.35rem);
  padding-right: clamp(1rem, 2vw, 1.35rem);
}
.tlc-card-head {
  padding-top: 1.05rem;
  padding-bottom: 0.35rem;
}
.tlc-card-title {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 600;          /* restrained — NOT 800 */
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: rgb(var(--color1raw));
}
.tlc-card-sub {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--gray6);
  overflow-wrap: break-word;
}
.tlc-card-body {
  padding-top: 0.5rem;
  padding-bottom: 0.85rem;
  flex: 1 1 auto;
}
.tlc-card-foot {
  margin-top: auto;          /* pin footer to the card bottom */
  padding-top: 0.9rem;
  padding-bottom: 1.05rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.35);
}

/* THE FOOTER IS THE ACTION, FULL WIDTH. Craig, 2026-09-11: "drop the price from
   these cards leaving only the 'SELECT' button running full width".
   Direct child on purpose: the estimate extension puts its own .eg-foot-flex row
   inside .tlc-card-foot, and its .eg-detail-btn must keep flex:0 0 auto beside a
   total. That row is a child of .eg-foot-flex, not of the footer, so it is not
   matched here. */
.tlc-card-foot > .btn { display: block; width: 100%; }

/* ---- Shared small label (sections, totals) ---- */
.tlc-card-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray5);
}

@media (max-width: 575px) {
  .tlc-card-banner { height: clamp(150px, 40vw, 190px); }
}

/* ============================================================
   ESTIMATE SELECTION EXTENSION  (chips / tiers / totals)
   ------------------------------------------------------------
   Builds on the .tlc-card shell above. Used by the Estimates
   "Choose Your Services" tiles and documented in the style guide
   Glass-cards example. Default chip states:
     .is-required               included (brand check)
     .is-optional.is-off        add-on, not selected (dimmed)
     .is-optional.is-on         add-on, selected
     .is-alt + .eg-chip-radio   "pick one" tier (radio box)
   Gray vars carry hardcoded fallbacks so the rules hold even on
   pages/brands where --grayN isn't defined.
   ============================================================ */
.tlc-card-title[data-eg-open] { cursor: pointer; }
.tlc-card-title[data-eg-open]:hover { text-decoration: underline; text-underline-offset: 2px; }

.eg-section-label { margin: 12px 0 6px; }
.eg-empty-note { margin: 8px 0 0; font-size: .85rem; font-weight: 400; line-height: 1.4; color: var(--gray6, #6b6b6b); }

.eg-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 11px;
  margin-bottom: 7px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  font-size: .86rem;
  line-height: 1.2;
  transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}
.eg-chip.is-required { background: rgba(var(--color1raw), 0.06); border-color: rgba(var(--color1raw), 0.18); }
.eg-chip.is-optional { cursor: pointer; }
.eg-chip.is-optional.is-on { background: rgba(var(--color1raw), 0.05); border-color: rgba(var(--color1raw), 0.20); }
.eg-chip.is-optional.is-off { opacity: .6; }
.eg-chip-box {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 5px;
  font-size: .72rem;
}
.eg-chip.is-required .eg-chip-box { color: rgb(var(--color1raw)); }
.eg-chip.is-optional .eg-chip-box { border: 2px solid var(--gray4, #c9c9c9); color: #fff; }
.eg-chip.is-optional.is-on .eg-chip-box { background: rgb(var(--color1raw)); border-color: rgb(var(--color1raw)); }
.eg-chip.is-alt .eg-chip-box.eg-chip-radio { border-radius: 50%; }
.eg-alt-set { display: flex; flex-direction: column; }
.eg-opt-tag {
  display: inline-block;
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgb(var(--color1raw));
  background: rgba(var(--color1raw), 0.10);
  border-radius: 5px;
  padding: 1px 6px;
  margin-right: 6px;
  vertical-align: middle;
}
.eg-chip-main { flex: 1 1 auto; min-width: 0; }
.eg-chip-label { font-weight: 500; display: block; overflow-wrap: break-word; color: var(--gray7, #404040); }
.eg-chip-price { font-weight: 600; white-space: nowrap; color: var(--gray7, #404040); }
.eg-chip-price .eg-cad { font-weight: 400; font-size: .78em; color: var(--gray5, #9a9a9a); }
.eg-chip-view {
  flex: 0 0 auto;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-decoration: none;
  color: rgb(var(--color1raw));
  white-space: nowrap;
}
.eg-chip-view:hover { text-decoration: underline; }

/* Foot layout (chrome — border/bg/padding — comes from .tlc-card-foot) */
.eg-foot-flex { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
/* Footer caption — refined "HOSTING RATE" look: gray, uppercase, semibold,
   letter-spaced. Explicit values + specificity so it never inherits the
   brand link color from the page. */
.eg-foot-flex .tlc-card-label {
  display: block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gray5, #9a9a9a);
  margin-bottom: 2px;
}
.eg-total-onetime { font-size: 1.45rem; font-weight: 400; line-height: 1.05; color: rgb(var(--color1raw)); }
.eg-total-monthly { font-size: 1.45rem; font-weight: 400; line-height: 1.05; color: rgb(var(--color1raw)); }
.eg-total-monthly .eg-cad { font-weight: 400; font-size: .82em; color: rgb(var(--color1raw)); }
.eg-detail-btn {
  flex: 0 0 auto;
  border: 1px solid rgb(var(--color1raw));
  background: rgba(255, 255, 255, 0.6);
  color: rgb(var(--color1raw));
  border-radius: 9px;
  padding: 8px 13px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.eg-detail-btn:hover { background: rgb(var(--color1raw)); color: #fff; }
