/* ============================================================
   Sampa News Widgets v2.0.0 — CSS
   Paleta: #0d0d1a (fundo) | #e8001c (vermelho) | #ffffff (texto)
   ============================================================ */

/* ---- WIDGET BASE ---- */
.snw-widget {
    background: #0d0d1a;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.4);
    border: 1px solid rgba(232,0,28,0.15);
    font-family: 'Georgia', 'Times New Roman', serif;
}

/* ---- CABEÇALHO ---- */
.snw-widget-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #1a0a0d;
    border-bottom: 3px solid #e8001c;
    position: relative;
}
.snw-widget-header::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: #e8001c;
}
.snw-icon  { font-size: 15px; line-height: 1; }
.snw-title {
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ---- CORPO ---- */
.snw-widget-body   { padding: 8px; background: #0d0d1a; }
.snw-body-tempo    { padding: 0; }
.snw-body-tempo .weatherwidget-io { display: block; width: 100%; }

/* ---- COTAÇÕES ---- */
.snw-cotacao-bloco { margin-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.snw-cotacao-bloco:last-child { border-bottom: none; margin-bottom: 0; }
.snw-cotacao-label {
    font-size: 10px;
    font-weight: bold;
    color: #e8001c;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 6px 8px 2px;
}
.snw-tv-mini { min-height: 160px; }

/* ---- RODAPÉ ---- */
.snw-widget-footer { padding: 6px 14px; background: #080810; text-align: right; font-size: 10px; color: #555; }
.snw-widget-footer a { color: #666; text-decoration: none; }
.snw-widget-footer a:hover { color: #e8001c; }

/* ---- TICKER SIDEBAR ---- */
.snw-ticker-wrapper { width: 100%; overflow: hidden; }
.snw-ticker-wrapper .tradingview-widget-container { width: 100%; }


/* ============================================================
   TOP BAR TICKER — Estilos para o ticker injetado no topo
   ============================================================ */

#snw-topbar-ticker {
    flex: 1 1 auto;          /* ocupa o espaço disponível entre data e social */
    min-width: 0;
    max-width: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin: 0 12px;
    height: 100%;
}

#snw-topbar-ticker .tradingview-widget-container {
    width: 100%;
    height: 44px;             /* altura padrão — ajustável via painel */
    overflow: hidden;
    display: flex;
    align-items: center;
}

#snw-topbar-ticker .tradingview-widget-container__widget {
    width: 100%;
    height: 100%;
}

/* Garante que o iframe do TradingView não vaze */
#snw-topbar-ticker iframe {
    width: 100% !important;
    height: 44px !important;
    border: none !important;
    background: transparent !important;
}

/* Ajuste para barras superiores com display flex */
.top-bar,
.topbar,
.header-top,
.top-header,
.site-top-bar,
.above-header,
.header-bar,
.pre-header,
#top-bar,
#header-top,
.jeg_topbar,
.jeg_top_bar {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
}

/* Responsivo: oculta ticker em telas muito pequenas */
@media (max-width: 480px) {
    #snw-topbar-ticker {
        display: none;
    }
}

@media (max-width: 768px) {
    #snw-topbar-ticker {
        max-width: 200px;
    }
}
