/* ===== AVISO GLOBAL NO TOPO DA TELA — DIREÇÃO DE ARTE HUD BOMBARDIA ===== */
.global-ticker {
    position: fixed;
    top: max(10px, env(safe-area-inset-top));
    left: 50%;
    z-index: 950;
    width: min(760px, calc(100vw - 260px));
    min-width: 280px;
    pointer-events: none;
    transform: translate(-50%, -155%);
    opacity: 0;
    transition:
        transform 0.48s cubic-bezier(0.22, 1.16, 0.36, 1),
        opacity 0.32s ease;
    will-change: transform, opacity;
}

.global-ticker.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
}

.global-ticker.is-leaving {
    transform: translate(-50%, -155%);
    opacity: 0;
    transition:
        transform 0.42s cubic-bezier(0.55, 0.06, 0.68, 0.19),
        opacity 0.28s ease;
}

.global-ticker-plate {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 6px 14px 7px 10px;
    border: 3px solid var(--hud-ink, #321a0d);
    border-radius: 9px 15px 9px 15px;
    box-shadow:
        inset 0 2px 0 rgba(255, 248, 214, 0.65),
        inset 0 -3px 0 rgba(50, 26, 13, 0.25),
        0 4px 0 #5b2e16,
        0 10px 22px rgba(20, 10, 6, 0.42);
    color: #fff8de;
    font-family: var(--ui-display, "Trebuchet MS", sans-serif);
    overflow: hidden;
}

/* Temas fiéis à paleta do HUD do Bombardia */
.global-ticker[data-theme="beta"] .global-ticker-plate {
    background: linear-gradient(180deg, #52c6f6 0 22%, #2395d4 23% 78%, #156da3 79%);
}

.global-ticker[data-theme="event"] .global-ticker-plate {
    background: linear-gradient(180deg, #ffeb94 0 22%, #ffc33e 23% 78%, #e2861c 79%);
    color: #321a0d;
}

.global-ticker[data-theme="alert"] .global-ticker-plate {
    background: linear-gradient(180deg, #ffa05e 0 22%, #ea5828 23% 78%, #b32d14 79%);
}

.global-ticker-icon {
    flex: none;
    width: 26px;
    height: 26px;
    object-fit: contain;
    filter: drop-shadow(0 2px 0 rgba(50, 26, 13, 0.55));
}

.global-ticker-badge {
    flex: none;
    padding: 3px 9px 4px;
    border: 2px solid var(--hud-ink, #321a0d);
    border-radius: 6px 9px 6px 9px;
    background: linear-gradient(180deg, #fff1a8 0 35%, #ffc33e 36% 100%);
    color: #321a0d;
    font: 900 11px/1 var(--hud-lettering, "Arial Black", sans-serif);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 #fffbe0, 0 2px 0 rgba(50, 26, 13, 0.45);
}

.global-ticker[data-theme="event"] .global-ticker-badge {
    background: linear-gradient(180deg, #59cdfa 0 35%, #1d8ec9 36% 100%);
    color: #fff6d4;
    text-shadow: 0 1px 0 #321a0d;
}

.global-ticker[data-theme="alert"] .global-ticker-badge {
    background: linear-gradient(180deg, #fff6d9 0 35%, #f5d38e 36% 100%);
    color: #7d1d0d;
}

.global-ticker-viewport {
    position: relative;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
}

.global-ticker-track {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    gap: 56px;
    padding-left: 100%;
    font-size: 14.5px;
    font-weight: 900;
    letter-spacing: 0.01em;
    text-shadow:
        -1.5px -1.5px 0 #321a0d,
        1.5px -1.5px 0 #321a0d,
        -1.5px 1.5px 0 #321a0d,
        1.5px 1.5px 0 #321a0d,
        0 2.5px 0 #321a0d;
    animation: bombardia-ticker-scroll var(--ticker-speed, 16s) linear infinite;
}

.global-ticker[data-theme="event"] .global-ticker-track {
    color: #fff9e0;
}

@keyframes bombardia-ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

@media (max-width: 900px) {
    .global-ticker {
        width: calc(100vw - 24px);
        top: max(6px, env(safe-area-inset-top));
    }
    .global-ticker-plate {
        min-height: 38px;
        padding: 4px 10px 5px 8px;
        gap: 7px;
    }
    .global-ticker-icon {
        width: 22px;
        height: 22px;
    }
    .global-ticker-track {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .global-ticker-track {
        animation: none;
        padding-left: 0;
        white-space: normal;
    }
}
