/* ============================================================
   Banxico Financial Ticker — ticker.css  v6
   Conserva ajustes del usuario:
     - background: #062B75
     - height: 31px
     - justify-content: space-around
     - margin-left: -92px
     - Fecha: color blanco sólido, opacity 1
   Agrega de v6:
     - max-width: 1140px encajonado (Elementor)
     - Responsive móvil grid 2×2 + fecha abajo
   ============================================================ */

.banxico-ticker {
    width:           100%;
    box-sizing:      border-box;
    background:      #062B75;
    border-radius:   0;
    font-family:     -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow:        hidden;
}

/* ── Fila principal ─────────────────────────────────────────── */
.banxico-ticker__main {
    display:         flex;
    align-items:     center;
    height:          31px;
    width:           100%;
    box-sizing:      border-box;
}

/* ── Zona de indicadores: encajonada en 1140px ──────────────── */
.banxico-ticker__items {
    display:         flex;
    align-items:     center;
    justify-content: space-around;
    flex:            1;
    min-width:       0;
    box-sizing:      border-box;
    /* Encajonado igual que el contenido de Elementor */
    max-width:       1140px;
    width:           100%;
    margin-left:     auto;
    margin-right:    auto;
    padding:         0 12px;
}

/* ── Cada indicador: una sola línea ─────────────────────────── */
.banxico-ticker__item {
    display:         flex;
    align-items:     center;
    justify-content: center;
    gap:             5px;
    padding:         0 20px;
    white-space:     nowrap;
}

/* Label: blanco, negrita */
.banxico-ticker__label {
    font-size:       13px;
    font-weight:     700;
    color:           #ffffff;
    white-space:     nowrap;
    line-height:     1;
}

/* Separador ":" entre label y valor */
.banxico-ticker__label::after {
    content:         ':';
}

/* Valor: blanco, medium, monoespaciado */
.banxico-ticker__valor {
    font-family:     'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size:       13px;
    font-weight:     500;
    color:           #ffffff;
    letter-spacing:  -0.2px;
    white-space:     nowrap;
    line-height:     1;
}

/* ── Divisor vertical entre indicadores ─────────────────────── */
.banxico-ticker__div {
    width:           1px;
    height:          18px;
    background:      rgba(255, 255, 255, 0.3);
    flex-shrink:     0;
}

/* ── Fecha — derecha, sin centrar ───────────────────────────── */
.banxico-ticker__fecha {
    display:         flex;
    align-items:     center;
    gap:             5px;
    flex-shrink:     0;
    padding:         0 16px;
    min-height:      31px;
    border-left:     1px solid rgba(255, 255, 255, 0.15);
    color:           rgba(255, 255, 255, 1);
    font-size:       10.5px;
    white-space:     nowrap;
    box-sizing:      border-box;
}

.banxico-ticker__fecha svg {
    flex-shrink:     0;
    opacity:         1;
}

/* Franja inferior móvil: oculta en desktop/tablet */
.banxico-ticker__fecha-movil {
    display:         none;
}

/* ── Estado vacío ───────────────────────────────────────────── */
.banxico-ticker--vacio {
    display:         flex;
    align-items:     center;
    justify-content: center;
    width:           100%;
    min-height:      31px;
    background:      #062B75;
    color:           rgba(255, 255, 255, 0.7);
    font-size:       13px;
    padding:         10px 20px;
    box-sizing:      border-box;
    text-align:      center;
}

/* ── Responsive móvil (< 600px) ─────────────────────────────── */
@media (max-width: 600px) {

    /* Ocultar fecha derecha */
    .banxico-ticker__fecha { display: none; }

    /* Fila principal en columna */
    .banxico-ticker__main  { flex-direction: column; height: auto; }

    /* Grid 2 columnas exactas */
    .banxico-ticker__items {
        display:               grid;
        grid-template-columns: 1fr 1fr;
        max-width:             100%;
        width:                 100%;
        margin:                0;
        padding:               8px 0;
    }

    /* Cada celda centrada */
    .banxico-ticker__item {
        justify-content: center;
        padding:         10px 8px;
        border-bottom:   1px solid rgba(255, 255, 255, 0.08);
    }

    /* Celda izquierda con borde derecho */
    .banxico-ticker__item:nth-child(odd)       { border-right: 1px solid rgba(255, 255, 255, 0.12); }

    /* Última fila sin borde inferior */
    .banxico-ticker__item:nth-last-child(-n+2) { border-bottom: none; }

    /* Ocultar divisores (los reemplaza el grid) */
    .banxico-ticker__div   { display: none; }

    .banxico-ticker__label { font-size: 11px; }
    .banxico-ticker__valor { font-size: 12px; }

    /* Franja de fecha inferior */
    .banxico-ticker__fecha-movil {
        display:          flex;
        align-items:      center;
        justify-content:  center;
        gap:              5px;
        width:            100%;
        padding:          5px 12px;
        box-sizing:       border-box;
        border-top:       1px solid rgba(255, 255, 255, 0.12);
        color:            rgba(255, 255, 255, 1);
        font-size:        10px;
        white-space:      nowrap;
    }

    .banxico-ticker__fecha-movil svg { opacity: 1; flex-shrink: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .banxico-ticker * { animation: none !important; transition: none !important; }
}
