/* Default theme variables (News Red) */
:root {
    --bg-color: #e2e8f0;
    --news-blue: rgba(0, 32, 70, 0.9); /* Azul marino profundo */
    --news-red: #c80000;
    --news-gold: #f2ae00;
    --accent: #00ff88;
    --danger: #ff3e3e;
}

/* Tema Corporativo Plata/Azul */
.theme-corp-silver {
    --news-blue: rgba(30, 58, 95, 0.9);
    --news-red: #d1d5db; /* Plata */
    --news-gold: #3b82f6; /* Azul brillante */
    --bg-color: #f1f5f9;
}

/* Tema Dark Gold */
.theme-dark-gold {
    --news-blue: rgba(0, 0, 0, 0.9);
    --news-red: #d4af37; /* Oro */
    --news-gold: #ffffff;
    --bg-color: #1a1a1a;
}

:root {
    --text-main: #1e293b;
    --card-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* Estilos base ajustados para el plugin */
.bankoi-ticker-wrapper {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
}

/* Adaptación para pantalla completa (Demo Mode) */
.full-screen-demo .widget-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    bottom: auto;
    border-bottom: none;
    border-right: 15px solid var(--news-red);
}

/* Widget Flotante */
.widget-card {
    position: fixed;
    bottom: 120px; 
    left: 40px;   
    width: 1200px; 
    height: 650px; 
    background-image: url('FondoWallStreetPlaceholder.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 0;
    box-shadow: var(--card-shadow);
    border-bottom: 8px solid var(--news-red);
    overflow: hidden;
    z-index: 99999; 
    display: flex;
    flex-direction: column; 
}

.diagonal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--news-blue);
    clip-path: polygon(0 0, 45% 0, 65% 100%, 0% 100%); 
    z-index: 1;
}

.widget-header-news {
    position: relative;
    z-index: 2;
    padding-top: 8vh;
    margin-bottom: 5vh;
    display: flex;
    align-items: center;
    padding-left: 5vw;
}

.market-title {
    color: white;
    font-weight: 900;
    font-size: 6.5vw; 
    line-height: 1.1;
    text-transform: uppercase;
    border-left: 1.5vw solid var(--news-red);
    padding-left: 2vw;
    background: var(--news-red);
    padding: 15px 25px;
}

.widget-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    padding-left: 8vw; 
    transition: opacity 0.5s ease-in-out;
}

.widget-content.fade-out {
    opacity: 0;
}

.asset-item {
    margin-bottom: 7vh; 
    display: flex;
    flex-direction: column;
    align-items: flex-start; 
}

.asset-data {
    display: inline-flex;
    align-items: center;
    background: white;
    padding: 10px 30px;
    gap: 1.5vw;
    min-width: 28vw; 
    box-shadow: 8px 8px 0px var(--news-red);
    transition: all 0.3s ease;
}

.asset-item:nth-child(1) { margin-left: 5vw; }
.asset-item:nth-child(2) { margin-left: 10vw; }
.asset-item:nth-child(3) { margin-left: 15vw; }
.asset-item:nth-child(4) { margin-left: 20vw; }

.asset-symbol {
    font-size: 2.5vw; 
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
}

.asset-price {
    color: #1a1a1a;
    font-size: 4.2vw; 
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.asset-change {
    font-size: 3.5vw; 
    font-weight: 900;
    text-shadow: none; 
    font-variant-numeric: tabular-nums;
}

/* Ticker Footer (Barra inferior dinámica para la TV) */
.ticker-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    /* CORRECCIÓN: Ahora usa el color azul de fondo del tema para que el porcentaje rojo resalte perfectamente */
    background: var(--news-blue); 
    border-top: 3px solid var(--news-red); /* Línea decorativa roja en contraste */
    color: white;
    height: 40px;
    display: flex;
    align-items: center;
    overflow: hidden;
    z-index: 100000; 
}

.ticker-wrapper {
    display: inline-flex;
    white-space: nowrap;
    animation: scroll-ticker 30s linear infinite;
}

.ticker-element {
    padding: 0 30px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
}

/* Clases de colores de variación */
.val-up { color: #00ff88; }
.val-down { color: #ff0f0f; }
/* CORRECCIÓN: El 0.00% neutro se lee en el mismo verde limpio sin generar conflictos con el dorado */
.val-neutral { color: #00ff88; } 

/* Responsive HD */
@media (max-width: 1920px) {
    .widget-card {
        width: 850px;
        height: 620px; 
        bottom: 80px;
        left: 30px;
    }
    .market-title {
        font-size: 38px;
        border-left-width: 8px;
        padding: 10px 20px;
    }
    .widget-header-news {
        padding-top: 30px;
        padding-left: 40px;
        margin-bottom: 30px;
    }
    .asset-symbol { font-size: 22px; }
    .asset-data { padding: 8px 20px; min-width: 320px; box-shadow: 6px 6px 0px var(--news-red); }
    .asset-price { font-size: 28px; min-width: 130px; padding: 6px 15px; }
    .asset-change { font-size: 24px; }
    .asset-item:nth-child(1) { margin-left: 20px; }
    .asset-item:nth-child(2) { margin-left: 75px; }
    .asset-item:nth-child(3) { margin-left: 130px; }
    .asset-item:nth-child(4) { margin-left: 185px; }
}

@keyframes scroll-ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}