/* Roof Color Visualizer — A-Z Roofing
   Palette, type, radius and shadow all reuse real site tokens from css/style.css — no new values.
   Lives on its own page (/roof-color-visualizer/) as a dark widget card inside .page-body.
   Selectors are scoped under .rv-widget (two classes deep) so they reliably beat .page-body's
   generic img/p/ul/li rules, which otherwise leak their light-page styling into this dark card. */
.rv-widget {
  --rv-bg: var(--ink);
  --rv-text: #ffffff;
  --rv-muted: var(--sky);
  --rv-accent: var(--orange);
  --rv-radius: 18px;       /* same radius as the site's one "featured card" — .review */
  --rv-radius-sm: 4px;     /* same radius as the site's pills/dropdown (hero eyebrow, finance-dropdown) */
  --rv-shadow: 0 4px 16px rgba(19,29,46,.25); /* same shadow recipe as .sticky-call */
  background: var(--rv-bg);
  color: var(--rv-text);
  border-radius: var(--rv-radius);
  box-shadow: var(--rv-shadow);
  padding: 40px;
  font-family: 'Barlow', sans-serif;
}
.rv-widget * { box-sizing: border-box; }
.rv-widget .eyebrow { color: var(--rv-accent); margin: 0 0 20px; }

.rv-widget .rv__stage {
  position: relative; width: 100%; aspect-ratio: 1182 / 665;
  border-radius: var(--rv-radius); overflow: hidden; background: #222;
  box-shadow: var(--rv-shadow); user-select: none; touch-action: pan-y;
  cursor: ew-resize;
}
.rv-widget .rv__stage canvas, .rv-widget .rv__stage img {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  object-fit: cover; aspect-ratio: auto; border: 0;
}
.rv-widget .rv__after { clip-path: inset(0 0 0 50%); }
.rv-widget .rv__tag {
  position: absolute; top: 12px; z-index: 3; font-size: 11px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px;
  background: rgba(0,0,0,.65); color: #fff; pointer-events: none;
}
.rv-widget .rv__tag--before { left: 12px; }
.rv-widget .rv__tag--after { right: 12px; background: var(--rv-accent); color: var(--ink); }
.rv-widget .rv__divider { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px; background: #fff; z-index: 2; pointer-events: none; }
.rv-widget .rv__knob {
  position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border-radius: 50%; background: var(--rv-accent); border: 3px solid #fff; z-index: 3; pointer-events: none;
  display: grid; place-items: center; color: var(--ink); font-weight: 900; font-size: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.rv-widget .rv__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; z-index: 4; }
.rv-widget .rv__range:focus-visible ~ .rv__knob { outline: 3px solid #fff; outline-offset: 3px; }

.rv-widget .rv__picked { margin: 22px 0 12px; font-size: 15px; color: var(--rv-muted); }
.rv-widget .rv__picked strong { color: var(--rv-text); }
.rv-widget .rv__swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.rv-widget .rv__swatches li { padding-left: 0; position: static; margin-bottom: 0; }
.rv-widget .rv__swatches li::before { content: none; }
.rv-widget .rv__swatch {
  width: 100%; background: none; border: 0; padding: 0; color: var(--rv-text); cursor: pointer;
  font: inherit; font-size: 12.5px; text-align: center;
}
.rv-widget .rv__chip {
  display: block; height: 52px; border-radius: var(--rv-radius-sm); margin-bottom: 6px;
  border: 3px solid transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.rv-widget .rv__swatch[aria-pressed="true"] .rv__chip { border-color: var(--rv-accent); }
.rv-widget .rv__swatch:focus-visible .rv__chip { outline: 2px solid #fff; outline-offset: 2px; }

.rv-widget .rv__foot { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; margin-top: 26px; }
.rv-widget .rv__note { color: var(--rv-muted); font-size: 13px; margin: 0; max-width: 560px; line-height: 1.45; }

@media (max-width: 560px) {
  .rv-widget { padding: 20px; }
  .rv-widget .rv__swatches { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .rv-widget .rv__chip { height: 40px; }
  .rv-widget .rv__swatch { font-size: 11px; }
  .rv-widget .rv__cta { width: 100%; text-align: center; }
}
