/* Default theme variables (News Red) */
:root {
    --bg-color: #e2e8f0;
    --news-blue: rgba(0, 32, 70, 0.9);
    --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);
}

/* Widget Flotante */
.widget-card {
    position: fixed;
    bottom: 120px; /* Posicionado más alto */
    left: 40px;   /* Posicionado a la izquierda */
    width: 1200px; /* Un poco más ancho para el escalonado */
    height: 650px; /* Más alto para albergar los datos debajo del título */
    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; /* Encima de todo */
    display: flex;
    flex-direction: column; /* Cambiamos a columna para poner datos bajo el título */
}

.diagonal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--news-blue);
    clip-path: polygon(0 0, 40% 0, 75% 100%, 0% 100%); /* Diagonal invertida (más ancha abajo) */
    z-index: 1;
}

.widget-header-news {
    position: relative;
    z-index: 2;
    padding-top: 60px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    padding-left: 50px;
}

.market-title {
    color: white;
    font-weight: 900;
    font-size: 38px;
    line-height: 1.1;
    text-transform: uppercase;
    border-left: 12px solid var(--news-red);
    padding-left: 25px;
    background: var(--news-red);
    padding: 15px 25px;
}

.widget-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    padding-left: 60px; /* Alineado con el título */
    transition: opacity 0.5s ease-in-out;
}

.asset-item {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
}

/* Escalado siguiendo la nueva diagonal invertida */
.asset-item:nth-child(1) { margin-left: 20px; }
.asset-item:nth-child(2) { margin-left: 80px; }
.asset-item:nth-child(3) { margin-left: 140px; }
.asset-item:nth-child(4) { margin-left: 200px; }

.asset-symbol {
    font-size: 20px;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
}

.asset-data {
    display: flex;
    align-items: center;
    gap: 20px;
}

.asset-price {
    background: white;
    color: #000;
    padding: 8px 20px;
    font-size: 26px;
    font-weight: 900;
    min-width: 160px;
    text-align: center;
    box-shadow: 5px 5px 0px var(--news-red);
}

.asset-change {
    font-size: 24px;
    font-weight: 900;
    text-shadow: 2px 2px 2px rgba(0,0,0,0.8);
}

/* Ticker Footer */
.ticker-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--news-red);
    color: white;
    height: 40px;
    display: flex;
    align-items: center;
    overflow: hidden;
    z-index: 99998;
}

.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;
}

.val-up { color: #00ff88; }
.val-down { color: #ff9999; }

/* ==========================================================================
   RESPONSIVE DESIGN (Escalado para PC 1080p y Tablets)
   ========================================================================== */

/* Ajustes para PC Estándar (Full HD - 1080p) */
@media (max-width: 1920px) {
    .widget-card {
        width: 850px;
        height: 520px; /* Aumentado para evitar cortes */
        bottom: 80px;
        left: 30px;
    }

    .market-title {
        font-size: 28px;
        border-left-width: 8px;
        padding: 10px 20px;
    }

    .widget-header-news {
        padding-top: 40px;
        margin-bottom: 30px;
    }

    .asset-symbol {
        font-size: 16px;
    }

    .asset-price {
        font-size: 20px;
        min-width: 130px;
        padding: 6px 15px;
    }

    .asset-change {
        font-size: 18px;
    }

    /* Ajuste de escalonado para 1080p */
    .asset-item:nth-child(1) { margin-left: 15px; }
    .asset-item:nth-child(2) { margin-left: 60px; }
    .asset-item:nth-child(3) { margin-left: 105px; }
    .asset-item:nth-child(4) { margin-left: 150px; }
}

/* Ajustes para Tablets y Pantallas Pequeñas */
@media (max-width: 1024px) {
    .widget-card {
        width: 600px;
        height: 420px; /* Aumentado para evitar cortes */
        bottom: 60px;
        left: 20px;
    }

    .market-title {
        font-size: 20px;
        border-left-width: 6px;
    }

    .asset-price {
        font-size: 16px;
        min-width: 110px;
    }

    /* Ajuste de escalonado para Tablets */
    .asset-item:nth-child(1) { margin-left: 10px; }
    .asset-item:nth-child(2) { margin-left: 40px; }
    .asset-item:nth-child(3) { margin-left: 70px; }
    .asset-item:nth-child(4) { margin-left: 100px; }
}

@keyframes scroll-ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}
