/* RG Pulse Hub Widget — v3 (uniform cards) */

/* ── Force uniform trending card sizes ───────────────────── */
.rg-hub-panel .rg-trending-card {
    flex: 0 0 130px;
    max-width: 130px;
    min-width: 130px;
}

.rg-hub-panel .rg-trending-card-inner {
    width: 100%;
}

.rg-hub-panel .rg-trending-card img {
    width: 100%;
    height: 195px;
    object-fit: cover;
}

.rg-hub-panel .rg-trending-card-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
}

.rg-hub-panel .rg-trending-card-info {
    overflow: hidden;
    max-width: 100%;
}

.rg-hub-panel .rg-trending-card-meta {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rg-hub-panel .rg-trending-card-news {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Tabbed Widget Container ─────────────────────────────── */
.rg-hub-widget {
    margin: 0 0 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
}

/* ── Tab Bar ─────────────────────────────────────────────── */
.rg-hub-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0;
    background: rgba(0, 0, 0, 0.15);
}

.rg-hub-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 13px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    position: relative;
}

.rg-hub-tab:hover {
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.02);
}

.rg-hub-tab.active {
    color: #e2e8f0;
    border-bottom-color: #7c3aed;
    background: rgba(124, 58, 237, 0.04);
}

.rg-hub-tab svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.rg-hub-tab.active svg {
    opacity: 1;
    color: #a78bfa;
}

/* ── Live Dot ────────────────────────────────────────────── */
.rg-hub-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    animation: rg-hub-dot-pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes rg-hub-dot-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* ── Panels ──────────────────────────────────────────────── */
.rg-hub-panel {
    display: none;
    padding: 16px;
}

.rg-hub-panel.active {
    display: block;
}

.rg-hub-empty {
    text-align: center;
    padding: 32px 16px;
    color: #64748b;
    font-size: 13px;
}

/* ── Trending Games (inside panel) ───────────────────────── */
.rg-hub-panel .rg-trending-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}

.rg-hub-panel .rg-trending-strip::-webkit-scrollbar {
    display: none;
}

/* ── News Grid ───────────────────────────────────────────── */
.rg-hub-news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.rg-hub-news-card {
    display: block;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.rg-hub-news-card:hover {
    border-color: rgba(167, 139, 250, 0.25);
    background: rgba(167, 139, 250, 0.04);
}

.rg-hub-news-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.rg-hub-news-game {
    font-size: 11px;
    font-weight: 700;
    color: #a78bfa;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70%;
}

.rg-hub-news-time {
    font-size: 10px;
    color: #4b5563;
    flex-shrink: 0;
}

.rg-hub-news-title {
    font-size: 13px;
    font-weight: 500;
    color: #cbd5e1;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rg-hub-news-card:hover .rg-hub-news-title {
    color: #e2e8f0;
}

/* ── Activity Feed inside panel ──────────────────────────── */
#rg-hub-activity .rg-activity-feed {
    max-height: 440px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}

#rg-hub-activity .rg-activity-feed::-webkit-scrollbar {
    width: 4px;
}

#rg-hub-activity .rg-activity-feed::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
}

/* ── Hide old standalone wrappers (now in tabbed widget) ── */
.rg-activity { display: none; }

/* ── Hide moderation panel (use XF Admin CP instead) ────── */
.rg-pulse-mod-panel { display: none; }

/* ── Responsive — Tablet (900px) ─────────────────────────── */
@media (max-width: 900px) {
    .rg-hub-news-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .rg-hub-tab {
        padding: 11px 10px;
        font-size: 12px;
        gap: 5px;
    }

    .rg-hub-tab svg {
        width: 14px;
        height: 14px;
    }

    .rg-hub-panel .rg-trending-strip {
        gap: 8px;
    }

    .rg-hub-panel .rg-trending-card {
        flex: 0 0 110px;
        max-width: 110px;
        min-width: 110px;
    }

    .rg-hub-panel .rg-trending-card img {
        width: 100%;
        height: 165px;
    }
}

/* ── Responsive — Small tablet / large phone (680px) ───── */
@media (max-width: 680px) {
    .rg-hub-widget {
        border-radius: 10px;
    }

    .rg-hub-news-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .rg-hub-news-card {
        padding: 12px 14px;
    }

    .rg-hub-news-title {
        font-size: 12px;
    }

    .rg-hub-news-game {
        font-size: 10px;
    }
}

/* ── Responsive — Phone (480px) ──────────────────────────── */
@media (max-width: 480px) {
    .rg-hub-widget {
        border-radius: 8px;
        margin: 0 0 14px;
    }

    .rg-hub-tab {
        padding: 10px 6px;
        font-size: 11px;
        gap: 4px;
        letter-spacing: 0;
    }

    .rg-hub-tab svg {
        width: 13px;
        height: 13px;
    }

    .rg-hub-panel {
        padding: 10px;
    }

    /* Trending cards — compact on phone */
    .rg-hub-panel .rg-trending-strip {
        gap: 8px;
    }

    .rg-hub-panel .rg-trending-card {
        flex: 0 0 88px;
        max-width: 88px;
        min-width: 88px;
    }

    .rg-hub-panel .rg-trending-card img {
        width: 100%;
        height: 132px;
    }

    .rg-hub-panel .rg-trending-card-inner {
        border-radius: 8px;
    }

    .rg-hub-panel .rg-trending-card-info {
        padding: 6px 7px;
    }

    .rg-hub-panel .rg-trending-card-title {
        font-size: 10px;
    }

    .rg-hub-panel .rg-trending-card-meta {
        font-size: 9px;
    }

    .rg-hub-panel .rg-trending-card-news {
        font-size: 9px;
    }

    .rg-hub-news-grid {
        grid-template-columns: 1fr;
    }

    .rg-hub-news-card {
        padding: 12px 14px;
    }

    #rg-hub-activity .rg-activity-feed {
        max-height: 320px;
    }

    .hero-title {
        font-size: 22px;
    }

    .hero-subtitle {
        font-size: 13px;
    }

    .rg-seo-links-grid {
        grid-template-columns: 1fr;
    }

    .rg-pulse-composer-prompt {
        padding: 12px 14px;
        gap: 10px;
    }

    .rg-pulse-composer-text {
        font-size: 13px;
    }

    .rg-pulse-composer-prompt-btn {
        display: none;
    }
}

/* ── Responsive — Very small phone (360px) ───────────────── */
@media (max-width: 360px) {
    .rg-hub-tab {
        padding: 9px 4px;
        font-size: 10px;
        gap: 3px;
    }

    .rg-hub-tab svg {
        width: 12px;
        height: 12px;
    }

    .rg-hub-panel {
        padding: 8px;
    }

    .rg-hub-panel .rg-trending-card {
        flex: 0 0 78px;
        max-width: 78px;
        min-width: 78px;
    }

    .rg-hub-panel .rg-trending-card img {
        width: 100%;
        height: 117px;
    }

    .rg-hub-panel .rg-trending-card-info {
        padding: 5px 6px;
    }

    .rg-hub-panel .rg-trending-card-title {
        font-size: 9px;
    }
}
