/* ============================================================
   Dólar Argentina Ticker — Estilos base (sin tema aplicado)
   El diseño final se aplica sobre estas clases.
   ============================================================ */

/* ── Barra contenedora ── */
#dat-ticker-bar {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #1a1a2e;
    color: #f0f0f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    line-height: 1;
    height: 36px;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    user-select: none;
}

/* ── Etiqueta fija izquierda ── */
.dat-ticker-label {
    flex-shrink: 0;
    padding: 0 14px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    border-right: 1px solid rgba(255,255,255,0.15);
    height: 100%;
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.2);
}

/* ── Zona de scroll ── */
.dat-ticker-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

/* ── Track que se desplaza ── */
.dat-ticker-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    animation: dat-scroll linear infinite;
    /* La duración se calcula y setea desde JS según el ancho real */
    animation-duration: 30s;
}

.dat-ticker-track:hover {
    animation-play-state: paused;
}

@keyframes dat-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ── Ítem individual ── */
.dat-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 20px;
    border-right: 1px solid rgba(255,255,255,0.08);
    height: 100%;
    transition: background 0.2s;
}

.dat-item:hover {
    background: rgba(255,255,255,0.07);
    cursor: default;
}

/* ── Ícono ── */
.dat-icono {
    font-size: 14px;
    flex-shrink: 0;
}

/* ── Nombre del tipo de dólar ── */
.dat-nombre {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-right: 4px;
}

/* ── Precios ── */
.dat-compra,
.dat-venta {
    font-size: 12px;
    white-space: nowrap;
}

.dat-compra em,
.dat-venta em {
    font-style: normal;
    font-size: 10px;
    opacity: 0.65;
    margin-right: 2px;
    text-transform: uppercase;
}

.dat-compra {
    color: #6ee7b7;  /* verde suave */
}

.dat-venta {
    color: #fca5a5;  /* rojo suave */
    margin-left: 6px;
}

/* ── Colores específicos por tipo ── */
.dat-casa-blue    .dat-nombre { color: #60a5fa; }
.dat-casa-cripto  .dat-nombre { color: #f59e0b; }
.dat-casa-tarjeta .dat-nombre { color: #a78bfa; }
.dat-casa-oficial .dat-nombre { color: #34d399; }
.dat-casa-bolsa   .dat-nombre { color: #38bdf8; }
.dat-casa-contadoconliqui .dat-nombre { color: #fb923c; }
.dat-casa-mayorista .dat-nombre { color: #e2e8f0; }

/* ── Hora de actualización ── */
.dat-ticker-updated {
    flex-shrink: 0;
    padding: 0 12px;
    font-size: 10px;
    opacity: 0.5;
    white-space: nowrap;
    border-left: 1px solid rgba(255,255,255,0.10);
    height: 100%;
    display: flex;
    align-items: center;
}

/* ── Separador entre compra y venta ── */
.dat-compra + .dat-venta::before {
    content: '·';
    margin: 0 4px;
    opacity: 0.4;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .dat-ticker-label {
        padding: 0 8px;
        font-size: 10px;
    }
    .dat-item {
        padding: 0 12px;
    }
    .dat-ticker-updated {
        display: none;
    }
}
