/* ═══════════════════════════════════════════════
   SportBase v2 — "STEEL" Design System
   Regular CSS — animations, utilities, custom classes
   (Theme tokens are defined inline in HTML for Tailwind Browser CDN)
   ═══════════════════════════════════════════════ */

/* ── Animations ────────────────────────────────── */
@keyframes reveal-up {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes reveal-left {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes counter-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}
@keyframes live-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
@keyframes stripe-move {
    from { background-position: 0 0; }
    to { background-position: 40px 0; }
}

.anim-up { animation: reveal-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }
.anim-left { animation: reveal-left 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
.live-dot { animation: live-dot 1.4s ease-in-out infinite; }

/* Stagger */
.d1 { animation-delay: 80ms; }
.d2 { animation-delay: 160ms; }
.d3 { animation-delay: 240ms; }
.d4 { animation-delay: 320ms; }
.d5 { animation-delay: 400ms; }
.d6 { animation-delay: 480ms; }

/* ── Accent stripe ─────────────────────────────── */
.accent-stripe {
    height: 3px;
    background: linear-gradient(90deg, #E11D39 0%, #E11D39 40%, #FFD700 100%);
}

/* ── Diagonal texture ──────────────────────────── */
.texture-diagonal {
    background-image: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.02) 10px,
        rgba(255,255,255,0.02) 11px
    );
}

/* ── Noise grain overlay ───────────────────────── */
.grain::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

/* ── Select arrow ──────────────────────────────── */
.select-dark {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%239C9CA6' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-size: 18px;
    background-position: right 8px center;
    background-repeat: no-repeat;
    padding-right: 2rem;
}
.select-light {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2371717A' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-size: 18px;
    background-position: right 8px center;
    background-repeat: no-repeat;
    padding-right: 2rem;
}

/* ── Flag box ──────────────────────────────────── */
.flag-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 16px;
    border-radius: 2px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* ── Left-accent card ──────────────────────────── */
.card-accent {
    border-left: 3px solid var(--accent-color, #E11D39);
}

/* ── Focus a11y ────────────────────────────────── */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
tr[tabindex]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-dark), 0 0 0 4px var(--color-accent);
    border-radius: 4px;
}

/* ── Scrollbar ─────────────────────────────────── */
.scroll-hide::-webkit-scrollbar { display: none; }
.scroll-hide { -ms-overflow-style: none; scrollbar-width: none; }

.scroll-thin::-webkit-scrollbar { height: 3px; }
.scroll-thin::-webkit-scrollbar-track { background: transparent; }
.scroll-thin::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 99px; }

/* ── Sport overlay on cards ────────────────────── */
.sport-overlay {
    background: linear-gradient(to top, rgba(9,9,11,0.85) 0%, rgba(9,9,11,0.3) 50%, rgba(9,9,11,0.05) 100%);
}

/* ── Ad placeholders ───────────────────────────── */
.ad-block {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E8E8EC;
    border: 1px dashed #C4C4CA;
    position: relative;
    overflow: hidden;
}
.ad-block::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 8px,
        rgba(0,0,0,0.02) 8px,
        rgba(0,0,0,0.02) 9px
    );
}
.ad-block-dark {
    background: #1C1C21;
    border-color: #2A2A30;
}
.ad-block-dark::before {
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 8px,
        rgba(255,255,255,0.02) 8px,
        rgba(255,255,255,0.02) 9px
    );
}

/* Override global focus ring for search inputs */
.search-input:focus-visible,
.search-input:focus {
    box-shadow: none !important;
    outline: none !important;
}
