/* MarketPup batch 8: styles for the new free tools (readability, photo shrinker, search ad preview, email tools,
   app store listing checker, where to launch, pet awareness days). Loaded only on those pages.
   Only the site's colour tokens are used, so light and dark mode both follow styles.css. */

/* Photo shrinker preview */
.t8-canvas-wrap { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-soft); padding: 8px; margin: 12px 0; max-width: 100%; overflow: hidden; }
.t8-canvas { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.tool-form input[type="range"] { width: 100%; accent-color: var(--focus); }
.tool-form input[type="file"] { max-width: 100%; }

/* Search ad preview: let long headline sets wrap instead of running off the box */
.serp.t8-ad { max-width: 100%; margin-bottom: 12px; }
.serp.t8-ad h3.serp-h { white-space: normal; text-wrap: wrap; overflow-wrap: anywhere; }
.serp.t8-ad .serp-crumb { white-space: normal; overflow-wrap: anywhere; }

/* Tables: listing lengths, directories and awareness days */
.t8-dirs { margin: 0 0 1rem; border: 1px solid var(--line); border-radius: 12px; max-width: 100%; }
.t8-dirs .t7-table { table-layout: auto; }
.t8-what { display: block; font-size: .86rem; color: var(--ink-2); margin-top: 2px; }
.t8-what q { quotes: "\201C" "\201D"; }
.t8-len tr.is-over td { color: var(--coral-ink); font-weight: 600; }
.t7-table td b { font-weight: 600; }

/* On phones each table row becomes a card with its labels, so nothing scrolls sideways at 360px */
@media (max-width: 640px) {
  .t8-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .t8-stack, .t8-stack tbody, .t8-stack tr, .t8-stack td { display: block; width: 100%; }
  .t8-stack tr { border-bottom: 1px solid var(--line); padding: .4rem 0; }
  .t8-stack tr:last-child { border-bottom: 0; }
  .t8-stack td { border-bottom: 0; padding: .25rem .8rem; }
  .t8-stack td::before { content: attr(data-label); display: block; font-weight: 600; font-size: .8rem; color: var(--ink-2); }
  .t8-len td { padding: .45rem .5rem; }
}
.t8-stack tr[hidden] { display: none; }
