/* StreamNest — mobile & PWA refinements
 * --------------------------------------------------------------------------
 * Loaded on top of v2.css (and marketing.css for /pricing) via
 * {% block extrahead %} in each template. Adds safe-area insets, large hit
 * targets, landscape-aware kid PIN grid, dark/light parent, and the
 * reduced-motion guard.
 * --------------------------------------------------------------------------
 */

/* Safe-area-aware chrome */
.v2-bar {
  padding-top:    calc(14px + env(safe-area-inset-top, 0px));
  padding-left:   calc(20px + env(safe-area-inset-left, 0px));
  padding-right:  calc(20px + env(safe-area-inset-right, 0px));
}
.v2-foot {
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  padding-left:   calc(20px + env(safe-area-inset-left, 0px));
  padding-right:  calc(20px + env(safe-area-inset-right, 0px));
}
.v2-main {
  padding-left:  calc(16px + env(safe-area-inset-left, 0px));
  padding-right: calc(16px + env(safe-area-inset-right, 0px));
}

/* Compact mobile scale */
@media (max-width: 540px) {
  body { font-size: 17px; }
  .v2-home-card h1 { font-size: 36px; }
  .v2-pricing-hero h1 { font-size: 36px; line-height: 1.1; }
  .v2-price-amount { font-size: 44px; }
  .v2-pricing-card { padding: 28px 24px; border-radius: 16px; }
  .v2-bar { padding-left:  16px; padding-right: 16px; }
  .v2-main { margin-top: 24px; }
  .v2-card { padding: 24px; }
  .v2-home-card { padding: 36px 22px; }
  .v2-locked-screen { padding: 48px 24px; }
  .v2-locked-screen h1 { font-size: 36px; }
}

/* Landscape orientation — kid PIN form becomes a 2-col grid */
@media (orientation: landscape) {
  .v2-home-card form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 14px;
    align-items: end;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }
  .v2-home-card form > .v2-label:nth-of-type(1),
  .v2-home-card form > #v2-name { grid-column: 1; }
  .v2-home-card form > .v2-label:nth-of-type(2),
  .v2-home-card form > #v2-pin  { grid-column: 2; }
  .v2-home-card form > .v2-error-live,
  .v2-home-card form > button[type=submit] { grid-column: 1 / -1; }
  .v2-home-card form > .v2-help { grid-column: 1 / -1; }
}

/* Live form error pill */
.v2-error-live:empty { display: none; }
.v2-error-live:not(:empty) {
  margin: 14px 0 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: #FEE2E2;
  color: #991B1B;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid #FCA5A5;
}

/* Big tablet breakpoint — let the queue tickets breathe */
@media (min-width: 720px) {
  .v2-queue-item { padding: 22px 26px; }
  .v2-queue-item .v2-qtitle { font-size: 18px; }
}

/* Reduced motion — flatten the tactile press */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.001ms !important;
    animation-duration:  0.001ms !important;
  }
  .v2-btn-primary:active,
  .v2-queue-item:active,
  .v2-btn-ghost:active { transform: none; box-shadow: inherit; }
}
