/* Landing-page "report preview" slider -- shows 5 slides of the PAID report's real sections
 * (score ring, category grid, Core Web Vitals, findings, history) with demo data, right above
 * the "Riport kérése" CTA. Roland-approved mockup (via marveen msg 15368, 2026-08-10): the goal
 * is letting a visitor SEE what the paid report contains before buying -> higher conversion.
 *
 * Reuses the real report page's classes (.seo-score-ring/.seo-cat-tile/.seo-cwv-card/
 * .seo-finding-row/.seo-history-row, all defined in seoDiagnozis.css) so this preview never
 * visually drifts from the real report -- only this file's OWN new .seo-preview-* classes
 * (slider chrome: track/arrows/dots/copy layout) are new. Loaded ONLY on the landing view (see
 * seoDiagnozis.php's addCSS call inside the 'landing' case) -- the checkout/report/status/legal
 * views never pay for this file's bytes.
 *
 * No carousel library: matches this codebase's established hand-rolled convention for visual
 * widgets (see the score-ring and trend-chart comments in public.js) -- plain transform-based
 * track + vanilla touch-swipe, no new dependency.
 */

.seo-preview-title { text-align: center; font-size: 1.9rem; font-weight: 800; color: var(--seo-ink); margin: 0 0 .6rem; }
.seo-preview-sub { text-align: center; color: var(--seo-muted); font-size: 1rem; margin: 0 0 2.2rem; }

.seo-preview-slider { position: relative; background: #fff; border-radius: 24px; box-shadow: var(--seo-shadow); overflow: hidden; }
.seo-preview-track { display: flex; transition: transform .45s cubic-bezier(.4,0,.2,1); touch-action: pan-y; }
/* box-sizing:border-box is load-bearing, not cosmetic: default content-box means flex-basis:100%
 * sizes the CONTENT box to 100% of the track, and the 73.6px/side padding is added ON TOP of
 * that -- so the slide's actual (border-box) width came out to 1100px + 147.2px padding =
 * 1247.2px, overflowing the slider by exactly the padding amount (measured live via CDP
 * getBoundingClientRect, plex 2026-08-10 -- getComputedStyle(...).width correctly said "1100px"
 * the whole time, since that reflects the CONTENT box in content-box mode; only the rendered
 * RECT showed the overflow, which is why this is easy to miss just reading computed styles).
 * border-box makes the padding come OUT of the 100%, so the rendered box matches the track
 * exactly and the last score-tile (previously clipped mid-word by the slider's overflow:hidden)
 * renders in full. min-width:0 is additionally kept as a defensive floor, since this element is
 * itself a flex container for .seo-preview-copy/.seo-preview-visual. */
.seo-preview-slide { box-sizing: border-box; flex: 0 0 100%; min-width: 0; padding: 2.6rem 4.6rem 2.2rem; display: flex; gap: 2.4rem; align-items: center; }

/* min-width:0 overrides the flex-item default (auto -> content's min-content size), which
 * otherwise refuses to let these shrink below their widest unbreakable content (the
 * "AI-LÁTHATÓSÁG" score-tile label, in practice) and pushes the whole slide -- and with it the
 * page -- into horizontal overflow. Same failure mode as seoDiagnozis.css's own
 * `minmax(0, 1fr)` grid-track comment; flex's version of that fix is min-width:0 on the item. */
.seo-preview-copy { flex: 1; min-width: 0; }
/* container-type:inline-size -- tars review of 8b5104a2: seoDiagnozis.css's own
 * .seo-main-scores-row stacking rule fires at VIEWPORT<=400px, tuned for the real report page
 * where that row's available width tracks the viewport closely. Inside this slider it doesn't:
 * the row's actual width is (viewport - slide padding), and the padding differs across this
 * file's own breakpoints, so there's a real range (measured ~401-430px viewport -- iPhone
 * XR/11/12-15 Pro Max) where the row is too narrow to fit 3 tiles unstacked but wide enough to
 * dodge the inherited 400px viewport query -- the tiles overflow on the OPENING slide. A
 * container query keyed on this element's own rendered width (not the viewport) is correct
 * regardless of which padding tier is currently active. */
.seo-preview-visual { flex: 1.15; min-width: 0; container-type: inline-size; }
.seo-preview-tag { display: inline-block; background: var(--seo-brand-bg); color: var(--seo-brand); font-weight: 700; font-size: .74rem; padding: .3rem .75rem; border-radius: 999px; margin-bottom: .9rem; text-transform: uppercase; letter-spacing: .03em; }
.seo-preview-copy h3 { font-size: 1.35rem; font-weight: 800; color: var(--seo-ink); margin: 0 0 .5rem; }
.seo-preview-copy p { font-size: .92rem; color: var(--seo-muted); line-height: 1.55; max-width: 320px; margin: 0; }

.seo-preview-visual .seo-score-ring { margin: 0 auto; }
.seo-preview-visual .seo-main-scores-row { margin-top: 1rem; }
.seo-preview-visual .seo-cat-grid,
.seo-preview-visual .seo-cwv-row { margin-bottom: 0; }
.seo-preview-visual .seo-finding-row:last-child,
.seo-preview-visual .seo-history-row:last-child { margin-bottom: 0; }
.seo-preview-visual .seo-history-row { cursor: default; }
.seo-preview-visual .seo-history-row:hover { box-shadow: var(--seo-shadow); }
/* tars review of ef826cf9: at 320px the date+badge+score+delta don't all fit on one line
 * (score+delta overflowed the clip box by 8.9px) -- seoDiagnozis.css's .seo-history-row is
 * flex-wrap:nowrap by design (the real report's rows never carry a delta badge). flex-wrap:wrap
 * here lets the score+delta (margin-left:auto already right-aligns it) drop to its own line only
 * when the row is actually too narrow, rather than guessing a pixel breakpoint -- normal widths
 * still render on one line since wrap only activates when content doesn't fit. */
.seo-preview-visual .seo-history-row { flex-wrap: wrap; row-gap: .3rem; }
.seo-preview-visual .seo-history-score { min-width: 0; }
/* #157a4f, not var(--seo-good) (#1a8f5e) -- tars review: the shared token is 4.09:1 on white at
 * this text's size/weight, under the 4.5:1 AA text threshold (too small/light to qualify as
 * "large text", which would only need 3:1). This darker shade measures 5.3:1. Scoped to this one
 * badge, not a change to --seo-good itself (used elsewhere at sizes/contexts that already pass). */
.seo-preview-delta { color: #157a4f; font-weight: 700; font-size: .85rem; margin-left: .5rem; }

/* 3 tiles at their real min-content (min-width:90px + ~1.4rem horizontal padding each, box-sizing
 * content-box in the shared rule) plus 2 gaps need ~363px; 380px keeps a safety margin without
 * stacking earlier than necessary on the mid-size phones this is specifically for. */
@container (max-width: 380px) {
    .seo-preview-visual .seo-main-scores-row { flex-direction: column; }
}

.seo-preview-arw { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; background: #fff; border: 1px solid var(--seo-line); box-shadow: var(--seo-shadow); display: flex; align-items: center; justify-content: center; color: var(--seo-brand); font-size: 1.3rem; font-weight: 800; cursor: pointer; z-index: 2; padding: 0; }
.seo-preview-arw:hover { opacity: .85; }
.seo-preview-arw-l { left: 14px; }
.seo-preview-arw-r { right: 14px; }

.seo-preview-dots { display: flex; gap: 2px; justify-content: center; padding: 0 0 1.5rem; }
/* 24x24 button (tars review, WCAG 2.5.8 AA target-size min) around a 9px visual dot via ::before
 * -- the dot keeps its original small footprint, only the tappable area grows. */
.seo-preview-dots button { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; position: relative; }
.seo-preview-dots button::before { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 9px; height: 9px; border-radius: 50%; background: var(--seo-line); transition: width .2s ease, background .2s ease; }
.seo-preview-dots button.is-on::before { background: var(--seo-brand); width: 24px; border-radius: 999px; }

@media (max-width: 900px) {
    .seo-preview-slide { padding: 2.2rem 3.4rem 2rem; gap: 1.8rem; }
}
@media (max-width: 640px) {
    .seo-preview-slide { flex-direction: column; align-items: stretch; padding: 2rem 1.3rem 1.7rem; text-align: center; }
    .seo-preview-copy p { max-width: none; margin: 0 auto; }
    /* Arrows overlapping the copy text on narrow slides is exactly the layout bug the approved
     * mockup shipped with (screenshot showed the left arrow sitting on top of the lead
     * paragraph) -- below this width swipe + dots are the primary nav, so the arrows step aside
     * instead of fighting the text for space. */
    .seo-preview-arw { display: none; }
}

/* tars review: the JS already skips the autoplay INTERVAL under prefers-reduced-motion, but
 * these two CSS transitions (track slide + dot resize) still animate on every manual/swipe nav
 * regardless -- reduced-motion should mean no motion, not just no auto-motion. */
@media (prefers-reduced-motion: reduce) {
    .seo-preview-track { transition: none; }
    .seo-preview-dots button::before { transition: none; }
}
