/**
 * whatshot.css - Styles for the What's Hot showcase page (Test).
 *
 * Builds on the .landing-section / .landing-scroll-row / .landing-card
 * pattern from landing.css. Keep this small - the goal is to look the
 * same as the home page rows.
 */

/* Section spacing tightened so 20+ lanes fit without a long scroll */
.ws-section { margin-bottom: 1.5rem; }

.ws-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
    gap: 8px;
    flex-wrap: wrap;
}

.ws-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--mv-text-primary, #212529);
}

.ws-section-title i { color: var(--mv-text-muted, #6c757d); }

/* (i) info button next to each lane title */
.ws-info-btn {
    background: none;
    border: 0;
    padding: 0;
    margin-left: 4px;
    color: var(--mv-text-muted, #6c757d);
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s ease, color 0.15s ease;
}
.ws-info-btn:hover,
.ws-info-btn:focus {
    opacity: 1;
    color: var(--mv-text-primary, #212529);
    outline: none;
}
.ws-info-btn i {
    font-size: 0.85rem;
    color: inherit;
}

/* Popover content tweaks */
.ws-info-popover { font-size: 0.82rem; max-width: 320px; }
.ws-info-popover .popover-body { padding: 0.6rem 0.75rem; }
.ws-info-pop b { color: var(--mv-text-primary, #212529); font-weight: 600; }
[data-bs-theme="dark"] .ws-info-pop b { color: var(--mv-text-primary); }

.ws-category-divider {
    font-size: 1.45rem;
    font-weight: 700;
    margin: 1.4rem 0 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid var(--mv-border-color, #dee2e6);
    color: var(--mv-text-primary, #212529);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ws-category-divider i { color: var(--mv-text-muted, #6c757d); }

/* Horizontal scroll row */
.ws-scroll-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    min-height: 240px;
}

/* Music sections (artists, albums, concerts) use square images, which are
   shorter than 2:3 posters. Tighten the row + loading/empty heights so the
   row doesn't appear oddly stretched. */
.ws-section-square .ws-scroll-row { min-height: 190px; }
.ws-section-square .ws-empty,
.ws-section-square .ws-loading { min-height: 170px; }

.ws-scroll-row::-webkit-scrollbar { height: 6px; }
.ws-scroll-row::-webkit-scrollbar-track { background: var(--mv-bg-surface, #f1f1f1); border-radius: 3px; }
.ws-scroll-row::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
.ws-scroll-row::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* Generic poster card (movies/TV/album/game/book/place/concert/team) */
.ws-card {
    flex: 0 0 auto;
    width: 140px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease;
}
.ws-card:hover { transform: translateY(-3px); text-decoration: none; color: inherit; }

.ws-card-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 150%; /* 2:3 portrait */
    border-radius: 8px;
    overflow: hidden;
    background: var(--mv-bg-surface, #e9ecef);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.ws-card-img-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ws-card-img-wrap.ws-img-square { padding-top: 100%; }      /* albums */
.ws-card-img-wrap.ws-img-landscape { padding-top: 56.25%; } /* concerts/teams */

.ws-card-rank {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    line-height: 1.2;
}

.ws-card-no-image {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mv-text-muted, #adb5bd);
    font-size: 2.5rem;
}

.ws-card-info {
    padding-top: 6px;
    overflow: hidden;
}

.ws-card-title {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 2px;
    color: var(--mv-text-primary, #212529);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ws-card-subtitle {
    font-size: 0.75rem;
    color: var(--mv-text-secondary, #6c757d);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Average-rating chip on a card (uses TitleRating display upstream) */
.ws-card-rating {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
}

/* Empty-lane placeholder (centered, full-row) */
.ws-empty {
    flex: 1 0 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.6rem 1rem;
    color: var(--mv-text-muted, #6c757d);
    text-align: center;
    border: 1px dashed var(--mv-border-color, #dee2e6);
    border-radius: 8px;
    background: var(--mv-bg-surface, #fafafa);
    min-height: 200px;
}

.ws-empty i {
    font-size: 2rem;
    opacity: 0.5;
    margin-bottom: 0.4rem;
}

.ws-empty p {
    margin: 0;
    font-size: 0.9rem;
}

/* Skeleton (per-row spinner during loading) */
.ws-loading {
    flex: 1 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--mv-text-muted, #6c757d);
}

/* Admin diagnostics -- hidden by default; toggled on by header's UIAdmin
   visibility logic. Style mimics small caption text. */
.ws-admin-meta {
    margin-top: 4px;
    font-size: 0.6rem;
    line-height: 1.15;
    color: var(--mv-text-muted, #6c757d);
    display: flex;
    flex-wrap: wrap;
    gap: 3px 5px;
}

.ws-admin-stat {
    background: var(--mv-bg-surface, #f1f3f5);
    padding: 0 4px;
    border-radius: 3px;
    white-space: nowrap;
}

.ws-admin-stat b {
    color: var(--mv-text-secondary, #495057);
    font-weight: 600;
    margin-right: 2px;
}

/* The popularity score chip drops its label; bold it slightly so it
   still reads as a stat and not a stray number. */
.ws-admin-stat-score {
    font-weight: 700;
    color: var(--mv-text-primary, #212529);
}

/* Clickable admin chips get a hand cursor + subtle hover state */
.ws-admin-stat-click {
    cursor: pointer;
    transition: background 0.12s ease;
}

.ws-admin-stat-click:hover {
    background: var(--mv-bg-hover, #e2e6ea);
    color: var(--mv-text-primary, #212529);
}

.ws-admin-stat-click:hover b {
    color: var(--mv-text-primary, #212529);
}

.ws-section-admin-note {
    font-size: 0.7rem;
    color: var(--mv-text-muted, #6c757d);
}

/* Detail modal: subtly highlight the column the admin clicked from */
.ws-detail-table th.ws-detail-col-clicked,
.ws-detail-table td.ws-detail-col-clicked {
    background: rgba(13, 110, 253, 0.08);
}

/* Page-level admin banner */
.ws-admin-banner {
    margin: 0 0 1rem;
    padding: 8px 12px;
    background: var(--mv-bg-surface, #fff3cd);
    border: 1px solid var(--mv-border-color, #ffe69c);
    border-radius: 6px;
    font-size: 0.85rem;
}

/* Page intro */
.ws-intro {
    margin-bottom: 1.25rem;
    color: var(--mv-text-secondary, #6c757d);
    font-size: 0.95rem;
}

/* Admin-only timeframe picker */
.ws-timeframe-picker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.ws-timeframe-label {
    font-size: 0.85rem;
    color: var(--mv-text-secondary, #6c757d);
    font-weight: 500;
}

.UIAdmin.ws-timeframe-picker.admin-visible {
    display: flex !important;
}

/* Dark mode tweaks */
[data-bs-theme="dark"] .ws-card-title { color: var(--mv-text-primary); }
[data-bs-theme="dark"] .ws-card-subtitle { color: var(--mv-text-secondary); }
[data-bs-theme="dark"] .ws-empty,
[data-bs-theme="dark"] .ws-admin-stat,
[data-bs-theme="dark"] .ws-admin-banner {
    background: var(--mv-bg-surface);
    border-color: var(--mv-border-color);
    color: var(--mv-text-secondary);
}

/* Smaller cards on phones so more fit on screen */
@media (max-width: 575px) {
    .ws-card { width: 110px; }
    .ws-section-title { font-size: 1rem; }
    .ws-category-divider { font-size: 1.2rem; }
    .ws-intro { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .ws-intro-tail { display: none; }
}
