/* Live cams.
   Additions only — the cam grid reuses .video-grid / .video-card / .video-info
   so it inherits the site's card geometry, hover and responsive breakpoints.
   Everything below is either a cam-only badge or a cam-only layout block, and
   all of it is built from the existing Deep Zinc tokens in variables.css. */

/* --- Header / footer pin ------------------------------------------------- */

/* The permanent Live Cams entry in the category bar. It has to survive next
   to ~15 database-driven category links without looking like one of them,
   because it is a different kind of destination. */
.cat-link.cat-link-cams {
    color: #fff;
    font-weight: 800;
    gap: 6px;
    padding: 0 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
    height: 28px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.78rem;
}

.cat-link.cat-link-cams:hover {
    color: #fff;
    text-shadow: none;
    filter: brightness(1.12);
}

/* Shared pulsing dot: header pin, card badge, detail page. One keyframe. */
.cam-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
    animation: cam-pulse 1.6s ease-in-out infinite;
}

@keyframes cam-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.35; transform: scale(0.75); }
}

/* Anyone who has asked not to see motion should not get a blinking dot on
   every card in a 40-card grid. */
@media (prefers-reduced-motion: reduce) {
    .cam-live-dot { animation: none; }
}

/* --- Card badges --------------------------------------------------------- */

.cam-live-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 3px 7px;
    border-radius: 3px;
    z-index: 2;
}

.cam-viewers-badge {
    position: absolute;
    bottom: 6px;
    left: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 2;
}

.cam-new-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 4px;
    border-radius: 3px;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    vertical-align: middle;
}

.cam-name {
    /* One line, not the grid's two — the room topic below carries the detail,
       and a two-line name pushes the topic out of a consistent card height. */
    -webkit-line-clamp: 1;
    margin-bottom: 3px;
}

.cam-topic {
    font-size: 0.78rem;
    color: var(--color-text-secondary);
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2em;
}

/* --- Filter bar --------------------------------------------------------- */

.cam-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
    margin-bottom: 20px;
}

.cam-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-secondary);
    color: var(--color-text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: capitalize;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    /* 44px tap target minimum, same reasoning as .cat-link. */
    min-height: 36px;
}

.cam-filter:hover {
    color: var(--color-text-primary);
    border-color: var(--color-text-muted);
}

.cam-filter.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.cam-filter-count {
    font-size: 0.72rem;
    font-weight: 700;
    opacity: 0.65;
}

.cam-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.cam-filter-divider {
    width: 1px;
    height: 22px;
    background: var(--color-border);
    margin: 0 4px;
}

/* --- Listing header ----------------------------------------------------- */

.cam-intro {
    padding: 0 24px;
    margin-bottom: 18px;
}

.cam-intro h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 16px 0 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cam-count-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.cam-count-pill .cam-live-dot {
    background: var(--color-primary);
}

.cam-intro p {
    color: var(--color-text-secondary);
    font-size: 0.92rem;
    max-width: 70ch;
    line-height: 1.5;
}

/* --- Detail page -------------------------------------------------------- */

.cam-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    padding: 24px;
    max-width: 1600px;
    margin: 0 auto;
}

.cam-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.cam-stage iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Click-to-start poster.
   The stream is NOT auto-embedded. Two reasons, both load-bearing:
   the 18+ gate sits at z-index 1000 while an iframe in normal flow sits
   below it — but a live stream still carries AUDIO, so autoplaying it would
   mean explicit sound before anyone has confirmed their age; and a cam iframe
   is a heavy third-party frame that would compete with the page for
   bandwidth on every single visit, including bounces. */
.cam-poster {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 0;
    padding: 0;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-color: var(--color-bg-secondary);
}

.cam-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    transition: background 0.2s;
}

.cam-poster:hover::after {
    background: rgba(0, 0, 0, 0.3);
}

.cam-poster-btn {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 999px;
    background: var(--color-primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
    transition: transform 0.15s;
}

.cam-poster:hover .cam-poster-btn {
    transform: scale(1.05);
}

.cam-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cam-panel {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 16px;
}

.cam-panel h2 {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.cam-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 18px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    font-size: 0.95rem;
    font-weight: 800;
    text-align: center;
    transition: filter 0.15s, transform 0.15s;
}

.cam-cta:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}

.cam-facts {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 14px;
    font-size: 0.86rem;
}

.cam-facts dt {
    color: var(--color-text-muted);
    white-space: nowrap;
}

.cam-facts dd {
    color: var(--color-text-primary);
    text-align: right;
    font-weight: 600;
}

.cam-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cam-tag {
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--color-bg-tertiary);
    color: var(--color-text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    transition: color 0.15s, background 0.15s;
}

.cam-tag:hover {
    background: var(--color-primary);
    color: #fff;
}

.cam-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.cam-title-row h1 {
    font-size: 1.4rem;
    font-weight: 800;
}

.cam-detail-topic {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 16px;
    max-width: 80ch;
}

.cam-source-note {
    font-size: 0.74rem;
    color: var(--color-text-muted);
    line-height: 1.45;
}

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 1024px) {
    .cam-layout {
        grid-template-columns: 1fr;
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .cam-filters,
    .cam-intro {
        padding: 0 16px;
    }

    .cam-intro h1 {
        font-size: 1.25rem;
    }

    /* The grid drops to 2 columns here (style.css), which leaves the cards
       narrow — trim the badges so they don't cover the frame. */
    .cam-live-badge {
        font-size: 0.6rem;
        padding: 2px 5px;
    }

    .cam-viewers-badge {
        font-size: 0.66rem;
    }

    .cam-topic {
        font-size: 0.72rem;
        -webkit-line-clamp: 1;
        min-height: 0;
    }

    .cam-filter {
        font-size: 0.78rem;
        padding: 6px 11px;
    }
}
