/* ── GLOBAL MARKET TICKER ─────────────────────────────── */
#market-ticker {
    position: sticky;
    top: 0;
    z-index: 999;
    width: 100%;
    background: #111;
    border-bottom: 1px solid #2a2a2a;
    display: flex;
    align-items: stretch;
    height: 36px;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 12px;
    overflow: hidden;
    user-select: none;
}

/* Static left panel: USD rate */
#ticker-static {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    background: #1a1a1a;
    border-right: 1px solid #333;
    white-space: nowrap;
    color: #aaa;
    font-size: 11px;
    letter-spacing: 0.3px;
}

#ticker-static .ticker-flag {
    font-size: 14px;
    line-height: 1;
}

#ticker-static .ticker-rate {
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.2px;
}

#ticker-static .ticker-label {
    color: #666;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Scrolling track */
#ticker-scroll-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
    cursor: default;
}

#ticker-scroll-wrap::before,
#ticker-scroll-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 32px;
    z-index: 2;
    pointer-events: none;
}
#ticker-scroll-wrap::before {
    left: 0;
    background: linear-gradient(to right, #111, transparent);
}
#ticker-scroll-wrap::after {
    right: 0;
    background: linear-gradient(to left, #111, transparent);
}

#ticker-track {
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    will-change: transform;
    animation: ticker-scroll 60s linear infinite;
}

#ticker-track.paused {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Individual ticker items */
.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 16px;
    height: 100%;
    border-right: 1px solid #222;
    color: #ccc;
    transition: background 0.15s;
}

.ticker-item:hover {
    background: #1a1a1a;
}

.ticker-item .t-icon {
    font-size: 13px;
    line-height: 1;
    opacity: 0.85;
}

.ticker-item .t-name {
    color: #888;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.ticker-item .t-price {
    color: #e8e8e8;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.1px;
}

.ticker-item .t-change {
    font-size: 11px;
    font-weight: 500;
    padding: 1px 5px;
    border-radius: 3px;
}

.ticker-item .t-change.up {
    color: #10b981;
    background: rgba(16,185,129,0.1);
}

.ticker-item .t-change.down {
    color: #ef4444;
    background: rgba(239,68,68,0.1);
}

.ticker-item .t-change.flat {
    color: #888;
    background: rgba(128,128,128,0.1);
}

/* Separator dots between sections */
.ticker-sep {
    display: inline-flex;
    align-items: center;
    padding: 0 6px;
    color: #333;
    font-size: 16px;
    line-height: 1;
}

/* Loading shimmer */
.ticker-loading {
    display: inline-flex;
    align-items: center;
    padding: 0 20px;
    color: #555;
    font-size: 11px;
    gap: 6px;
}

.ticker-dot-pulse {
    display: inline-flex;
    gap: 3px;
}
.ticker-dot-pulse span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #444;
    animation: dot-pulse 1.2s ease-in-out infinite;
}
.ticker-dot-pulse span:nth-child(2) { animation-delay: 0.2s; }
.ticker-dot-pulse span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-pulse {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50%       { opacity: 1;   transform: scale(1); }
}

/* Refresh button (right side) */
#ticker-refresh {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 10px;
    background: #1a1a1a;
    border-left: 1px solid #2a2a2a;
    cursor: pointer;
    color: #555;
    font-size: 13px;
    transition: color 0.2s, background 0.2s;
}
#ticker-refresh:hover {
    color: #e05c1a;
    background: #222;
}

#ticker-refresh.spinning {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}