/* ================================================================
   RESPONSIVE - all media queries
   Edit this file to adjust breakpoints or per-viewport overrides.
   Breakpoints: 960px (tablet), 700px (mobile stack), 480px (small phone)
   ================================================================ */

/* ── Tablet / narrow desktop ──────────────────────────────────── */
@media (max-width: 960px) {
  .left      { width: 40%; }
  .tint-name { font-size: 40px; }
}

/* ── Mobile - stacked layout ──────────────────────────────────── */
@media (max-width: 700px) {
  /* Allow the page to scroll naturally on mobile */
  html, body { height: auto; min-height: 100%; overflow: auto; }
  body { display: block; }

  /* Stack preview above grid */
  .split { flex-direction: column; overflow: visible; }

  .left {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(128,238,192,.1);
  }

  /* Fixed-height viewport on mobile */
  .viewport {
    height: 55vw;
    min-height: 180px;
    max-height: 300px;
    flex: none;
  }

  /* Meta: tint name left, buttons right */
  .meta {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0 12px;
    padding: 12px 16px 14px;
    align-items: start;
  }

  .tint-name { font-size: 28px; grid-column: 1; grid-row: 1; line-height: 1; }
  .tint-cat  { grid-column: 1; grid-row: 2; margin-top: 4px; margin-bottom: 0; }
  .actions   { grid-column: 2; grid-row: 1 / 3; align-self: center; flex-direction: column; gap: 6px; }
  .copied    { display: none; }

  .right { overflow-y: visible; padding: 14px 10px 28px; }

  .tgrid {
    grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
    gap: 5px 4px;
  }
}

/* ── Small phone ──────────────────────────────────────────────── */
@media (max-width: 480px) {
  /* Wrap the strip controls onto two lines */
  .strip        { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 8px; }
  .strip-divider { display: none; }
  .wordmark     { font-size: 14px; }
  .url-field    { order: 3; }
  .go           { order: 4; }
  #errMsg       { order: 5; width: 100%; max-width: none; }

  .tgrid        { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 4px; }
  .tcell-label  { font-size: 7px; }
  .tint-name    { font-size: 26px; }
}

/* ── Reduced motion ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .tcell-inner { transition: border-color .1s; }
  .tcell:hover .tcell-inner { transform: none; }
}
