/* ExoticExpansion browse pages (home, trending, subscriptions, podcasts, categories).
 * Scoped to body.ee2-browse so it wins over app.css / ee2-brand.css card defaults
 * without editing the shared files. Tokens come from ee2-brand.css. Rules: design.md.
 */

body.ee2-browse .main-content { padding-top: 20px; }

/* ── Page head (app workbench: title, one line, rule) ── */
body.ee2-browse .page-header {
    margin: 0 0 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}
body.ee2-browse .page-title {
    display: flex; align-items: center; gap: 12px;
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    line-height: 1.15;
}
body.ee2-browse .page-title > i {
    flex: 0 0 auto;
    font-size: .9em;
    color: var(--accent);
}
body.ee2-browse .page-subtitle { color: var(--text-secondary); font-size: .95rem; margin-top: 6px; max-width: 68ch; }

/* ── Section heads ── */
body.ee2-browse .section-header {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 8px 16px; flex-wrap: wrap;
    margin: 0 0 16px;
}
body.ee2-browse .section-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.15rem; line-height: 1.2; min-width: 0;
}
body.ee2-browse .section-title > i { font-size: .85em; color: var(--accent); }
body.ee2-browse .section-link { font-size: .85rem; font-weight: 600; color: var(--accent); white-space: nowrap; }
body.ee2-browse .section-link:hover { text-decoration: underline; text-underline-offset: 3px; }
body.ee2-browse .section-count {
    font-family: var(--mono); font-size: .78rem; color: var(--text-muted); white-space: nowrap;
}

/* ── Category chips ── */
body.ee2-browse .category-chips { gap: 8px; margin-bottom: 24px; padding: 2px 0 6px; }
body.ee2-browse .category-chip {
    flex: 0 0 auto; padding: 7px 16px; font-size: .84rem; font-weight: 600;
    box-shadow: none; background-image: none;
}

/* ── Video grid: thumbnails on the page, no card box ── */
body.ee2-browse .video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 264px), 1fr));
    gap: 30px 18px;
}
body.ee2-browse .video-card {
    gap: 12px; min-width: 0;
    background: none; border: 0; border-radius: 0; padding: 0;
    animation: none; transform: none;
}
body.ee2-browse .video-card:hover { transform: none; border-color: transparent; }
body.ee2-browse .thumb-wrap {
    display: block;
    border-radius: 12px;
    background: var(--bg-card);
    box-shadow: inset 0 0 0 1px var(--border);
    transition: box-shadow .2s var(--ease-out, ease);
}
body.ee2-browse .thumb-wrap::after { content: none; }
body.ee2-browse .video-card:hover .thumb-wrap { transform: none; box-shadow: 0 0 0 1px var(--border-light); }
body.ee2-browse .thumb-img { display: block; transition: none; }
body.ee2-browse .video-card:hover .thumb-img { transform: none; }
body.ee2-browse .thumb-duration {
    bottom: 8px; right: 8px; padding: 2px 6px;
    background: rgba(6, 11, 24, .86); color: var(--text-primary);
    font-weight: 500; font-size: 11px; letter-spacing: .02em;
}
body.ee2-browse .thumb-paid {
    top: 8px; left: 8px; padding: 3px 8px; border-radius: 6px;
    background: var(--amber); color: var(--cta-ink);
    font-size: .7rem; font-weight: 700; box-shadow: none;
}
/* 18+ tag: home uses .thumb-mature; the shared grid partial still sets it inline. Both sit top-right. */
body.ee2-browse .thumb-paid.thumb-mature { left: auto; right: 8px; background: var(--red); color: var(--cta-ink); }
body.ee2-browse .thumb-paid[style*="left"] { left: auto !important; right: 8px; background: var(--red) !important; color: var(--cta-ink); }
body.ee2-browse .thumb-wrap .play-overlay { background: rgba(6, 11, 24, .28); }
body.ee2-browse .play-overlay-btn {
    width: 48px; height: 48px;
    background: rgba(6, 11, 24, .78);
    border: 1px solid rgba(230, 235, 247, .22);
    box-shadow: none; color: var(--text-primary); font-size: 1rem;
    transform: scale(.92); transition: transform .2s var(--ease-out, ease);
}
body.ee2-browse .play-overlay-btn i { margin-left: 3px; }
body.ee2-browse .play-overlay-logo { width: 26px; height: 26px; object-fit: contain; }

body.ee2-browse .video-meta { gap: 12px; padding-right: 4px; }
body.ee2-browse .video-channel-avatar {
    width: 36px; height: 36px;
    border: 1px solid var(--border-light); background: var(--bg-card);
}
body.ee2-browse .video-title { font-size: .95rem; line-height: 1.35; color: var(--text-primary); }
body.ee2-browse .video-card:hover .video-title { color: var(--text-primary); }
body.ee2-browse .video-title:hover { text-decoration: underline; text-underline-offset: 3px; }
body.ee2-browse .video-channel-name { margin-top: 4px; font-size: .84rem; color: var(--text-secondary); }
body.ee2-browse .video-channel-name a:hover { color: var(--accent); }
body.ee2-browse .video-channel-name i { color: var(--accent) !important; }
body.ee2-browse .video-stats { margin-top: 2px; font-size: .8rem; color: var(--text-muted); }

/* ── Pagination ── */
.ee2-pager {
    display: flex; justify-content: center; flex-wrap: wrap; gap: 8px;
    margin-top: 40px;
}
.ee2-pager .btn { min-width: 40px; justify-content: center; font-family: var(--mono); font-weight: 500; }

/* ── Empty states: say what lands here and how to start ── */
body.ee2-browse .empty-state {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 18px; align-items: start;
    max-width: 640px; margin: 8px 0 24px; padding: 24px;
    text-align: left; color: var(--text-secondary);
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
    animation: none;
}
body.ee2-browse .empty-state > i {
    grid-row: span 4;
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; margin: 0;
    font-size: 1.2rem; border-radius: 12px;
    background: var(--bg-hover); color: var(--accent);
    -webkit-text-fill-color: var(--accent); opacity: 1;
}
body.ee2-browse .empty-state h3 { margin: 2px 0 4px; font-size: 1.1rem; color: var(--text-primary); }
body.ee2-browse .empty-state p { margin: 0; max-width: 56ch; line-height: 1.55; }
body.ee2-browse .empty-state .btn { justify-self: start; margin-top: 14px !important; }

/* ── Home intro (signed-out visitors only) ── */
.ee2-home-intro {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 20px 24px;
    margin: 0 0 24px; padding: 22px 24px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
}
.ee2-home-intro__logo { width: 64px; height: 64px; display: block; }
.ee2-home-intro h1 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); line-height: 1.12; margin: 0; }
.ee2-home-intro p { margin: 6px 0 0; color: var(--text-secondary); max-width: 60ch; }
.ee2-home-intro__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ee2-home-intro__actions .btn { white-space: nowrap; }

/* ── Featured creators row ── */
body.ee2-browse .influencer-section { margin-bottom: 40px; }
body.ee2-browse .influencer-row { gap: 6px; padding: 2px 0 8px; scroll-snap-type: x proximity; }
body.ee2-browse .influencer-card {
    min-width: 136px; max-width: 136px; padding: 16px 10px 14px; gap: 6px;
    background: transparent; border: 1px solid transparent; border-radius: 16px;
    animation: none; box-shadow: none; overflow: visible;
}
body.ee2-browse .influencer-card::before,
body.ee2-browse .influencer-card::after { content: none; }
body.ee2-browse .influencer-card:hover {
    transform: none; background: var(--bg-card); border-color: var(--border); box-shadow: none;
}
body.ee2-browse .ic-avatar-wrap { width: 84px; height: 84px; }
body.ee2-browse .ic-avatar-ring { display: none; }
body.ee2-browse .ic-avatar {
    width: 84px; height: 84px; border: 1px solid var(--border-light); transition: none;
}
body.ee2-browse .influencer-card:hover .ic-avatar { transform: none; }
body.ee2-browse .ic-verified {
    width: 22px; height: 22px; bottom: 0; right: 0;
    color: var(--accent); background: var(--bg); border: 2px solid var(--bg); box-shadow: none;
}
body.ee2-browse .ic-name { max-width: 116px; font-size: .9rem; font-weight: 600; margin-top: 4px; }
body.ee2-browse .influencer-card:hover .ic-name { color: var(--text-primary); }
body.ee2-browse .ic-handle { max-width: 116px; font-size: .76rem; }
body.ee2-browse .ic-stats { gap: 10px; font-family: var(--mono); font-size: .72rem; color: var(--text-muted); }
body.ee2-browse .ic-stats i {
    background: none; -webkit-text-fill-color: var(--text-muted); color: var(--text-muted); margin-right: 3px;
}
body.ee2-browse .ic-category {
    font-size: .72rem; font-weight: 600; letter-spacing: 0; text-transform: none;
    color: var(--accent); opacity: 1;
}
body.ee2-browse .influencer-arrow {
    top: 50%; width: 36px; height: 36px;
    background: var(--bg-elevated); border: 1px solid var(--border-light);
    color: var(--text-primary); box-shadow: none;
    transition: opacity .2s ease, border-color .2s ease;
}
body.ee2-browse .influencer-arrow:hover {
    background: var(--bg-hover); border-color: var(--accent); box-shadow: none;
    transform: translateY(calc(-50% + 14px));
}
body.ee2-browse .influencer-arrow--left { left: -8px; }
body.ee2-browse .influencer-arrow--right { right: -8px; }

/* ── Categories page ── */
.ee2-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: 10px;
}
.ee2-cat-card {
    display: flex; align-items: center; gap: 14px;
    min-height: 68px; padding: 12px 14px; min-width: 0;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
    color: var(--text-primary); text-decoration: none;
    transition: border-color .2s ease, background-color .2s ease;
}
.ee2-cat-card:hover { border-color: var(--border-light); background: var(--bg-hover); }
.ee2-cat-icon {
    flex: 0 0 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-hover); color: var(--accent); font-size: 1rem;
}
.ee2-cat-card:hover .ee2-cat-icon { background: var(--bg-card); }
.ee2-cat-text { min-width: 0; display: flex; flex-direction: column; }
.ee2-cat-name { font-weight: 600; font-size: .98rem; overflow-wrap: anywhere; }
.ee2-cat-count { color: var(--text-muted); font-family: var(--mono); font-size: .75rem; margin-top: 3px; }
.ee2-cat-card.is-empty .ee2-cat-count { font-family: var(--font); font-size: .8rem; }

/* ── Podcasts: shows list ── */
.ee2-shows {
    list-style: none; margin: 0 0 40px; padding: 0;
    display: grid; gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.ee2-show {
    display: flex; align-items: center; gap: 12px; min-width: 0;
    padding: 12px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
}
.ee2-show__art { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border-light); }
.ee2-show__art--blank { display: flex; align-items: center; justify-content: center; background: var(--bg-hover); color: var(--accent); }
.ee2-show__text { min-width: 0; flex: 1; }
.ee2-show__name { display: block; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ee2-show__name:hover { color: var(--accent); }
.ee2-show__eps { color: var(--text-muted); font-family: var(--mono); font-size: .75rem; }
.ee2-show .btn { flex-shrink: 0; white-space: nowrap; }

/* ── Phones ── */
@media (max-width: 768px) {
    body.ee2-browse .main-content { padding-top: 14px; }
    body.ee2-browse .video-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 24px 14px; }
    .ee2-home-intro { grid-template-columns: auto minmax(0, 1fr); padding: 18px; }
    .ee2-home-intro__actions { grid-column: 1 / -1; }
    .ee2-home-intro__logo { width: 52px; height: 52px; }
}
@media (max-width: 560px) {
    body.ee2-browse .video-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
    body.ee2-browse .empty-state { grid-template-columns: minmax(0, 1fr); padding: 20px; }
    body.ee2-browse .empty-state > i { grid-row: auto; margin-bottom: 10px; }
    body.ee2-browse .influencer-card { min-width: 120px; max-width: 120px; }
    body.ee2-browse .ic-avatar-wrap, body.ee2-browse .ic-avatar { width: 72px; height: 72px; }
    .ee2-home-intro { gap: 14px 16px; }
    .ee2-home-intro__actions .btn { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    body.ee2-browse .thumb-wrap, body.ee2-browse .play-overlay-btn { transition: none; }
}
