/* ============================================
   LIVE PAGE — Specific styles
   Uses global.css design tokens
   ============================================ */

/* Live Pulse Indicator */
.live-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    margin-right: 0.4rem;
    box-shadow: 0 0 8px var(--green-glow);
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--green-glow); }
    50% { opacity: 0.4; box-shadow: 0 0 16px var(--green-glow); }
}

/* Live Meta (under hero subtitle) */
.live-meta {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
}

.live-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text2);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
}

.live-meta-icon {
    font-size: 1.1rem;
}

/* ============================================
   CHARTS GRID — Bento layout
   ============================================ */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Chart card extends glass-card (added via HTML class) */
.chart-card {
    overflow: hidden;
    padding: 0;
}

.chart-card--large {
    grid-column: 1 / -1;
}

.chart-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.chart-card-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

/* Iframe wrapper with loading skeleton */
.chart-iframe-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 50%;
    background: var(--bg-elevated);
    overflow: hidden;
}

.chart-iframe-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(99, 102, 241, 0.05) 40%,
        rgba(99, 102, 241, 0.08) 50%,
        rgba(99, 102, 241, 0.05) 60%,
        transparent 100%
    );
    animation: skeletonShimmer 1.8s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes skeletonShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.chart-card--large .chart-iframe-wrap {
    padding-bottom: 35%;
}

.chart-iframe-wrap--tall {
    padding-bottom: 60%;
}

.chart-iframe-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    filter: invert(0.88) hue-rotate(180deg);
}

/* ============================================
   FULL STATEMENT
   ============================================ */
.statement-wrapper {
    overflow: hidden;
    padding: 0;
}

.statement-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border);
}

.statement-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 6px var(--green-glow);
    animation: livePulse 2s ease-in-out infinite;
}

.statement-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--indigo-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}

.statement-link:hover {
    color: var(--indigo);
}

.statement-iframe-wrap {
    position: relative;
    width: 100%;
    height: 700px;
    overflow: hidden;
}

.statement-iframe-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(99, 102, 241, 0.05) 40%,
        rgba(99, 102, 241, 0.08) 50%,
        rgba(99, 102, 241, 0.05) 60%,
        transparent 100%
    );
    animation: skeletonShimmer 1.8s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

.statement-iframe-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
    filter: invert(0.88) hue-rotate(180deg);
}

/* ============================================
   DISCLAIMER
   ============================================ */
.disclaimer {
    text-align: center;
    padding: 1.5rem 2rem;
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: var(--radius-md);
    max-width: 800px;
    margin: 0 auto;
}

.disclaimer p {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.6;
}

.disclaimer strong {
    color: var(--orange);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chart-card--large {
        grid-column: 1 / -1;
    }

    .statement-iframe-wrap {
        height: 550px;
    }
}

@media (max-width: 900px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .live-meta {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .chart-iframe-wrap {
        padding-bottom: 60%;
    }

    .chart-card--large .chart-iframe-wrap {
        padding-bottom: 50%;
    }

    .chart-iframe-wrap--tall {
        padding-bottom: 80%;
    }

    .statement-toolbar {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .statement-iframe-wrap {
        height: 450px;
    }
}

@media (max-width: 480px) {
    .statement-iframe-wrap {
        height: 350px;
    }
}
