/* tg-tap-demo.css - A1 interactive tap demo (spec:
   documentation/interactive-tap-demo-spec-2026-11-15.md). Shared by the
   homepage "How a tap works" seat and the /how-it-works seat.
   Fixed frame dimensions: the component reserves its full box up front,
   so it adds zero layout shift. */

.tg-tap-demo {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}

.tg-demo-label {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 1.5rem;
}

.tg-demo-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  min-height: 520px;
}

.tg-demo-disc {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  border-radius: 9999px;
}

.tg-demo-disc img {
  width: 190px;
  height: 190px;
  display: block;
}

.tg-demo-disc:focus-visible {
  outline: 3px solid #d97706;
  outline-offset: 6px;
}

.tg-demo-disc:disabled {
  cursor: default;
  opacity: 0.85;
}

.tg-demo-disc-cta {
  background: #14304d;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.7rem 1.6rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.tg-demo-phone {
  width: 272px;
  flex: 0 0 auto;
  background: #111827;
  border-radius: 40px;
  padding: 12px;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.25);
}

.tg-demo-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 546 / 980;
  background: #f3f4f6;
  border-radius: 30px;
  overflow: hidden;
}

.tg-demo-screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.tg-demo-empty {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #e5e7eb, #f9fafb);
}

.tg-demo-field-text {
  position: absolute;
  inset: 0;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.9rem;
  padding: 1.4rem;
  text-align: left;
}

.tg-demo-field-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
  margin: 0;
}

.tg-demo-field-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.tg-demo-field-row {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  font-size: 0.92rem;
  color: #374151;
  overflow-wrap: break-word;
  margin: 0;
  transition: border-color 0.3s, background 0.3s;
}

.tg-demo-field-row.tg-demo-field-on {
  border-color: #14304d;
  background: #eef4fa;
  font-weight: 700;
  color: #111827;
}

.tg-demo-explainer {
  font-size: 1.05rem;
  color: #374151;
  max-width: 640px;
  margin: 1.6rem auto 0;
}

.tg-demo-caption {
  font-size: 1.15rem;
  font-weight: 600;
  color: #111827;
  max-width: 680px;
  margin: 1rem auto 0;
  min-height: 3.4em;
}

.tg-demo-reset {
  margin-top: 0.8rem;
  background: #fff;
  color: #14304d;
  border: 2px solid #14304d;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.6rem 1.5rem;
  border-radius: 9999px;
  cursor: pointer;
}

.tg-demo-reset:focus-visible {
  outline: 3px solid #d97706;
  outline-offset: 4px;
}

.tg-demo-fineprint {
  font-size: 0.9rem;
  color: #6b7280;
  max-width: 640px;
  margin: 1.2rem auto 0;
}

.tg-demo-fallback {
  font-size: 1rem;
  color: #374151;
  max-width: 640px;
  margin: 1rem auto 0;
}

/* Static panels: the prefers-reduced-motion rendering (JS adds
   tg-demo-static) with the same words and the same captures. */
.tg-demo-panels {
  display: none;
}

.tg-demo-static .tg-demo-stage,
.tg-demo-static .tg-demo-caption,
.tg-demo-static .tg-demo-reset {
  display: none;
}

.tg-demo-static .tg-demo-panels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

.tg-demo-panel {
  margin: 0;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.tg-demo-panel img.tg-demo-panel-disc {
  width: 130px;
  height: 130px;
}

.tg-demo-panel img.tg-demo-panel-shot {
  width: 170px;
  aspect-ratio: 546 / 980;
  object-fit: cover;
  object-position: top center;
  border-radius: 18px;
  border: 6px solid #111827;
}

.tg-demo-panel figcaption {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.tg-demo-panel figcaption .tg-demo-panel-change {
  display: block;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

@media (max-width: 720px) {
  .tg-demo-stage {
    flex-direction: column;
    gap: 1.8rem;
    min-height: 0;
  }

  .tg-demo-static .tg-demo-panels {
    grid-template-columns: 1fr;
  }
}

/* The state machine drives the frame by toggling the hidden attribute;
   the component display rules (flex on the field panel, block on frame
   images) would otherwise override the UA [hidden] default and show
   every layer at once. This guard is pinned by
   tools/order-page-check/test_tap_demo.mjs. */
.tg-tap-demo [hidden] {
  display: none !important;
}
