/* View-only showcase — RPM Car Club demo (2026-11-07).
 * Styles for the sign-in card explore entry, the in-app view-only banner,
 * the "Make it yours" panel, and the friendly-refusal toast. Scoped to
 * .showcase-* classes so nothing else in the app is affected. */

/* --- Sign-in card entry ------------------------------------------------ */
.auth-card .showcase-entry { margin-top: 18px; text-align: center; }
.showcase-divider {
  display: flex; align-items: center; gap: 10px;
  color: #8a97a5; font-size: 12px; margin: 4px 0 12px;
}
.showcase-divider::before, .showcase-divider::after {
  content: ""; flex: 1; height: 1px; background: #dde3ea;
}
.showcase-explore-btn {
  width: 100%; padding: 11px 14px; cursor: pointer;
  background: #ffffff; color: #b70f19;
  border: 1.5px dashed #b70f19; border-radius: 10px;
  font-size: 15px; font-weight: 600;
}
.showcase-explore-btn:hover:not(:disabled) { background: #fdf1f1; }
.showcase-explore-btn:disabled { opacity: 0.6; cursor: wait; }
.showcase-sub { color: #5a6a7a; font-size: 13px; margin: 8px 0 2px; }
.showcase-hint { color: #8a97a5; font-size: 12px; margin: 0; }
.auth-card .showcase-error { color: #b70f19; font-size: 13px; margin: 8px 0 0; }

/* --- In-app banner ------------------------------------------------------ */
.showcase-banner {
  position: sticky; top: 0; z-index: 2147482000;
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  background: #141c26; color: #f2f4f7;
  padding: 7px 12px; font-size: 13px; line-height: 1.35;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.35);
}
.showcase-banner-text strong { color: #ffb3b8; }
.showcase-yours-btn {
  background: #b70f19; color: #ffffff; border: 0; border-radius: 999px;
  padding: 4px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.showcase-yours-btn:hover { background: #960c14; }
.showcase-view-wrap { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.showcase-view-select {
  background: #ffffff; color: #1c2733; color-scheme: light;
  border: 1px solid #c8d1db; border-radius: 999px;
  padding: 3px 10px; font-size: 13px; font-weight: 600; cursor: pointer;
}

/* --- Make it yours panel -------------------------------------------------- */
.showcase-panel {
  position: fixed; top: 44px; right: 12px; z-index: 2147482500;
  width: min(360px, calc(100vw - 24px)); max-height: calc(100vh - 60px); overflow: auto;
  background: #ffffff; color: #1c2733; color-scheme: light;
  border: 1px solid #dde3ea; border-radius: 14px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28);
  padding: 16px 18px; box-sizing: border-box; font-size: 14px;
}
.showcase-panel-head { display: flex; justify-content: space-between; align-items: center; font-size: 16px; }
.showcase-panel-close { background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: #5a6a7a; }
.showcase-panel-note { color: #5a6a7a; font-size: 13px; margin: 6px 0 12px; }
.showcase-field { display: grid; gap: 5px; margin: 10px 0; }
.showcase-field span { font-weight: 600; font-size: 13px; }
.showcase-field input[type="text"], .showcase-field input[type="url"] {
  padding: 9px 10px; border: 1px solid #c8d1db; border-radius: 8px; font-size: 14px; width: 100%; box-sizing: border-box;
}
.showcase-field input[type="file"] { font-size: 13px; }
.showcase-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.showcase-apply-btn {
  background: #b70f19; color: #fff; border: 0; border-radius: 8px;
  padding: 8px 14px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.showcase-apply-btn:hover { background: #960c14; }
.showcase-reset-btn, .showcase-lookup-btn {
  background: #eef1f5; color: #1c2733; border: 1px solid #c8d1db; border-radius: 8px;
  padding: 8px 14px; font-size: 14px; cursor: pointer;
}
.showcase-panel .showcase-divider { margin: 14px 0 4px; }
.showcase-found { border: 1px solid #dde3ea; border-radius: 10px; padding: 10px 12px; margin: 10px 0; text-align: center; }
.showcase-found-text { margin: 0 0 8px; font-weight: 600; }
.showcase-found-logo { max-width: 180px; max-height: 90px; object-fit: contain; display: block; margin: 0 auto 8px; }
.showcase-found-title { color: #5a6a7a; margin: 0 0 10px; word-break: break-word; }
.showcase-panel-msg { color: #33691e; font-size: 13px; margin: 10px 0 0; }

/* "Your colors" — the palette the website lookup found, shown as swatches
 * with hex values before the visitor applies it (2026-11-07). */
.showcase-colors { border-top: 1px solid #eef1f5; margin: 4px 0 10px; padding-top: 8px; }
.showcase-colors-label { font-weight: 600; font-size: 13px; margin: 0 0 6px; }
.showcase-swatch-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.showcase-swatch-chip { display: inline-flex; align-items: center; gap: 6px; }
.showcase-swatch {
  width: 20px; height: 20px; border-radius: 6px; display: inline-block;
  border: 1px solid rgba(15, 23, 42, 0.25); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
}
.showcase-swatch-hex { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: #1c2733; }
.showcase-colors-source { color: #8a97a5; font-size: 12px; margin: 6px 0 0; }
.showcase-found-nocolor { color: #5a6a7a; font-size: 13px; margin: 0 0 10px; }

/* A visitor's own logo stays inside the header slot's existing sizing. */
.club-logo-scene img.club-logo.showcase-yours-logo { object-fit: contain; }

/* --- Header-fit + banner clearance (fix 2026-11-07, Lee's live test) -----
 * Two defects from one test drive:
 * 1) The showcase banner and the app's sticky club header are BOTH sticky
 *    at top:0, and the app scrolls its document during navigation — so the
 *    stuck header slides UNDER the opaque banner and loses its top ~40px
 *    (the logo first) behind it: "top of the screen is cut off." The
 *    banner's JS now publishes its height as --scbh and adds
 *    body.showcase-on; the header's sticky top offsets by exactly that
 *    height, so the header sticks BELOW the banner, fully visible.
 * 2) A personalization logo only inherited the stock logo's sizing when
 *    the .rpm-public-logo cap happened to land on the same node. These
 *    rules size .showcase-yours-logo EXPLICITLY in every header state —
 *    a fixed-height box with the image contained inside it — so a logo
 *    of any aspect (wide, square, tall) renders fully visible, never
 *    clipped, and the box (not the image's intrinsic size) holds the
 *    header layout exactly where the stock logo holds it. */
body.showcase-on .club-header {
  top: var(--scbh, 40px);
}
.showcase-panel {
  top: calc(var(--scbh, 40px) + 8px);
}

/* Tall photo header (the full banner state): same 190px box as stock. */
@media (min-width: 1800px) and (min-height: 1100px) {
  .club-header .club-logo-scene img.club-logo.showcase-yours-logo {
    height: 190px;
    max-height: 190px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
    margin: 0 auto;
  }
}

/* Slim integrated bar: same 80px box as stock; width capped so a very
 * wide logo letterboxes inside the bar instead of crushing the nav. */
@media (max-width: 1799px), (max-height: 1099px) {
  .club-header .club-logo-scene img.club-logo.showcase-yours-logo {
    height: 80px;
    max-height: 80px;
    width: auto;
    max-width: 300px;
    object-fit: contain;
    object-position: center;
  }
}

/* Phones: same 40px box as stock, width capped likewise. */
@media (max-width: 699px) {
  .club-header .club-logo-scene img.club-logo.showcase-yours-logo {
    height: 40px;
    max-height: 40px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    object-position: center;
  }
}

/* --- Friendly-refusal toast ---------------------------------------------- */
.showcase-toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(16px);
  z-index: 2147482900; max-width: min(520px, calc(100vw - 32px));
  background: #141c26; color: #f2f4f7; border-radius: 10px;
  padding: 11px 16px; font-size: 14px; text-align: center;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.4);
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease;
}
.showcase-toast.showcase-toast-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* --- Landing clearance for the banner shift (fix 2026-11-08, Lee) -----
 * The 2026-11-07 clearance above holds the sticky club header BELOW the
 * banner with top: var(--scbh) — but a sticky element whose natural top
 * (the top of the scroll flow) sits above that threshold is pushed DOWN
 * by the full offset at every scroll position, including the resting
 * landing at scroll 0. The banner lives on <body>, outside the scroll
 * root, so no flow space was ever reserved for it: the header's flow
 * slot started at the root's very top, the offset shifted its painted
 * box --scbh px over the first --scbh px of <main>, and any view whose
 * first line sits closer than that to the top of .content lost the
 * difference behind the header. Measured worst case: the Admin
 * Console's OFFICER COMMAND CENTER eyebrow — .content padding-top
 * (26px) + .admin-hero padding-top (30px) = 56px of clearance against
 * the 62px banner — clipped by exactly 6px, in both the slim and the
 * tall header states (the overlap is the offset itself, not the
 * header's height). Reserving the banner's live-measured height at
 * the top of the app shell restores the flow: the header's slot now
 * starts under the banner's overlay, the sticky offset holds it
 * exactly there, and every view's first line clears the stack.
 * --scbh is republished live, so a wrapped (taller) banner on narrow
 * screens reserves proportionally more. Applies only while the banner
 * is live (body.showcase-on); real accounts are untouched. */
body.showcase-on .app-shell {
  padding-top: var(--scbh, 40px);
}
