/**
 * MACKSC Live Now Widget Styles
 * Dark theme with gold accents, matching MackSC brand.
 * Responsive multi-column grid: 2 cols mobile, 3 tablet, 4+ desktop.
 * Managed by Ansible. Do not edit on server.
 */

.macksc-live-now {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ========== Grid layout ==========
 * Always multi-column. Never single-column — that distorts article flow
 * and wastes vertical space. The 2-column mobile minimum keeps the widget
 * compact enough to not overwhelm the reading experience.
 */
.macksc-live-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
@media (min-width: 600px) {
    .macksc-live-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}
@media (min-width: 900px) {
    .macksc-live-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
}
/* Full-width contexts (directory pages) — 5x4 grid for 20 models */
@media (min-width: 1200px) {
    .macksc-live-grid--wide {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }
    .macksc-live-grid--wide .macksc-live-card {
        border-width: 0;
        border-radius: 4px;
    }
}

/* Sidebar widget: 2 columns instead of 1 — compact and usable */
.widget .macksc-live-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

/* ========== Card ==========
 * Compact design: thumbnail with overlaid info. Platform badge and viewer
 * count sit ON the thumbnail (bottom gradient), not in a separate info
 * block. This cuts card height by ~40% vs the old layout.
 */
.macksc-live-card {
    display: block;
    position: relative;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    color: #e0e0e0;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.macksc-live-card:hover {
    border-color: #c9a96e;
    transform: translateY(-1px);
}

/* Thumbnail */
.macksc-live-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0f0f0f;
}
.macksc-live-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gradient overlay on bottom of thumbnail for text readability */
.macksc-live-thumb-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    pointer-events: none;
}

/* Live pulse indicator */
.macksc-live-pulse {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: #e53e3e;
    border-radius: 50%;
    animation: macksc-pulse 1.5s ease-in-out infinite;
    z-index: 2;
}
@keyframes macksc-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

/* "Watch Free" CTA overlay — visible on hover (desktop), always on mobile */
.macksc-live-cta {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(201, 169, 110, 0.9);
    color: #000;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    border-radius: 4px;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}
.macksc-live-card:hover .macksc-live-cta {
    opacity: 1;
}
@media (hover: none) {
    .macksc-live-cta { opacity: 0.85; }
}

/* Info overlay — sits on top of the gradient at bottom of thumbnail */
.macksc-live-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 8px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.macksc-live-name {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.macksc-live-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
}
.macksc-live-viewers {
    color: rgba(255,255,255,0.7);
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* Platform badges — overlaid on thumbnail */
.macksc-live-badge {
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.macksc-badge-chaturbate { background: #f47b20; color: #fff; }
.macksc-badge-stripchat  { background: #e91e63; color: #fff; }
.macksc-badge-streamate  { background: #2196f3; color: #fff; }
.macksc-badge-livejasmin { background: #d32f2f; color: #fff; }

/* Tag badges — HD, New, Interactive Toy */
.macksc-tag-badge {
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: 3px;
}
.macksc-tag-hd  { background: #4caf50; color: #fff; }
.macksc-tag-new { background: #ff9800; color: #fff; }
.macksc-tag-toy { background: #9c27b0; color: #fff; font-size: 9px; padding: 0 3px; }

/* Featured model cards */
.macksc-featured-card {
    border-color: #c9a96e;
    box-shadow: 0 0 0 1px #c9a96e;
}
.macksc-featured-card:hover {
    border-color: #dbb978;
    box-shadow: 0 0 0 1px #dbb978, 0 2px 8px rgba(201, 169, 110, 0.2);
}
.macksc-featured-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 1px 6px;
    background: #c9a96e;
    color: #0f0f0f;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    z-index: 3;
}

/* Empty state */
.macksc-live-empty {
    color: #888;
    font-size: 13px;
    font-style: italic;
    padding: 12px 0;
    margin: 0;
}

/* ========== Social proof badge (conversion.js) ========== */
.macksc-social-proof {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    margin-bottom: 8px;
    font-size: 12px;
    color: #aaa;
}
.macksc-sp-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #e53e3e;
    border-radius: 50%;
    animation: macksc-pulse 1.5s ease-in-out infinite;
}
