/* ==========================================================================
   NBA League Stylesheet — League-specific overrides only
   ==========================================================================
   Shared palette, navbar, sidebar, footer, and utility classes live in:
     vinosports-core → static/vinosports/css/design-system.css
   This file contains only NBA-specific rules.
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. LEAGUE TOKEN (NBA alias for secondary)
   -------------------------------------------------------------------------- */

:root {
    --color-nba: 72 95 132;  /* #485f84 — same as secondary */
}


/* --------------------------------------------------------------------------
   2. HTMX LOADING INDICATOR
   -------------------------------------------------------------------------- */

.htmx-indicator {
    opacity: 0;
    transition: opacity 0.15s ease-in;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    opacity: 1;
}


/* --------------------------------------------------------------------------
   3. SIDEBAR CTA BUTTON
   -------------------------------------------------------------------------- */

.sidebar-link--cta {
    background-color: rgb(var(--color-primary));
    color: #fff !important;
    border-radius: 0.5rem;
    font-weight: 700;
    justify-content: center;
    transition: background-color 0.15s ease;
}

.sidebar-link--cta:hover {
    background-color: rgb(var(--color-primary) / 0.85);
}


/* --------------------------------------------------------------------------
   4. GAME CARDS
   -------------------------------------------------------------------------- */

.live-game-card {
    border-color: rgb(var(--color-accent)) !important;
    border-bottom: 3px solid rgb(var(--color-nba)) !important;
    box-shadow: 0 0 0 1px rgb(var(--color-accent)),
                0 0 12px rgba(var(--color-accent) / 0.15),
                0 4px 8px rgba(var(--color-nba) / 0.08);
    animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% { box-shadow: 0 0 0 1px rgb(var(--color-accent)), 0 0 12px rgba(var(--color-accent) / 0.15), 0 4px 8px rgba(var(--color-nba) / 0.08); }
    50%      { box-shadow: 0 0 0 1px rgb(var(--color-accent)), 0 0 20px rgba(var(--color-accent) / 0.30), 0 4px 12px rgba(var(--color-nba) / 0.15); }
}


/* --------------------------------------------------------------------------
   4. TOAST NOTIFICATIONS
   -------------------------------------------------------------------------- */

.toast-shell {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    background-color: rgb(var(--color-surface));
    border: 1px solid rgb(var(--color-border));
    box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
    max-width: 100%;
}

.toast-message {
    font-size: 0.875rem;
    color: rgb(var(--color-text));
    flex: 1;
    min-width: 0;
}

.toast-dismiss {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border-radius: 0.25rem;
    color: rgb(var(--color-muted));
    cursor: pointer;
    transition: color 0.15s, background-color 0.15s;
}
.toast-dismiss:hover {
    color: rgb(var(--color-text));
    background-color: rgb(var(--color-accent-light));
}


/* --------------------------------------------------------------------------
   5. REWARD TOASTS
   -------------------------------------------------------------------------- */

.reward-toast {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    border: 1px solid rgb(var(--color-gold));
    background: linear-gradient(135deg,
        rgba(var(--color-gold) / 0.08),
        rgba(var(--color-gold) / 0.02));
    backdrop-filter: blur(8px);
}

.reward-toast-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.reward-toast-confetti span {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 1px;
    opacity: 0;
    animation: confetti-fall 1.8s ease-out forwards;
}
.reward-toast-confetti span:nth-child(1)  { left: 10%; background: #b3262f; animation-delay: 0.0s; }
.reward-toast-confetti span:nth-child(2)  { left: 20%; background: #485f84; animation-delay: 0.1s; }
.reward-toast-confetti span:nth-child(3)  { left: 30%; background: #765a05; animation-delay: 0.15s; }
.reward-toast-confetti span:nth-child(4)  { left: 45%; background: #b3262f; animation-delay: 0.05s; }
.reward-toast-confetti span:nth-child(5)  { left: 55%; background: #16A34A; animation-delay: 0.2s; }
.reward-toast-confetti span:nth-child(6)  { left: 65%; background: #485f84; animation-delay: 0.08s; }
.reward-toast-confetti span:nth-child(7)  { left: 75%; background: #765a05; animation-delay: 0.12s; }
.reward-toast-confetti span:nth-child(8)  { left: 82%; background: #b3262f; animation-delay: 0.18s; }
.reward-toast-confetti span:nth-child(9)  { left: 88%; background: #485f84; animation-delay: 0.25s; }
.reward-toast-confetti span:nth-child(10) { left: 95%; background: #765a05; animation-delay: 0.1s; }

@keyframes confetti-fall {
    0%   { top: -10%; opacity: 1; transform: rotate(0deg) scale(1); }
    100% { top: 110%; opacity: 0; transform: rotate(720deg) scale(0.5); }
}

.reward-toast-inner {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    z-index: 1;
}

.reward-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background-color: rgba(var(--color-gold) / 0.15);
    color: rgb(var(--color-gold));
    flex-shrink: 0;
}

.reward-toast-title {
    font-family: 'Epilogue', sans-serif;
    font-weight: 600;
    font-size: 0.9375rem;
    color: rgb(var(--color-text));
}

.reward-toast-amount {
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 1.125rem;
    color: rgb(var(--color-gold));
}

.reward-toast-desc {
    font-size: 0.75rem;
    color: rgb(var(--color-muted));
    margin-top: 0.125rem;
}


/* --------------------------------------------------------------------------
   6. ACTIVITY TOASTS (bottom-left feed)
   -------------------------------------------------------------------------- */

.activity-toast {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.5rem;
    background-color: rgb(var(--color-surface));
    border: 1px solid rgb(var(--color-border));
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    font-size: 0.8125rem;
    text-decoration: none;
    color: rgb(var(--color-text));
    transition: border-color 0.15s, box-shadow 0.15s;
}
a.activity-toast:hover {
    border-color: rgb(var(--color-accent));
    box-shadow: 0 2px 8px rgba(var(--color-accent) / 0.1);
}

.activity-toast--nudge {
    background: linear-gradient(135deg,
        rgba(var(--color-accent) / 0.06),
        rgba(var(--color-accent) / 0.02));
    border-color: rgba(var(--color-accent) / 0.3);
}

.activity-toast-icon {
    font-size: 1rem;
    color: rgb(var(--color-accent));
    flex-shrink: 0;
}

.activity-toast-message {
    font-size: 0.8125rem;
    color: rgb(var(--color-text));
    line-height: 1.4;
}


/* --------------------------------------------------------------------------
   7. SLIDE ANIMATIONS
   -------------------------------------------------------------------------- */

@keyframes slide-in-right {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
@keyframes slide-out-right {
    from { transform: translateX(0);    opacity: 1; }
    to   { transform: translateX(100%); opacity: 0; }
}
@keyframes slide-in-left {
    from { transform: translateX(-100%); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}
@keyframes slide-out-left {
    from { transform: translateX(0);     opacity: 1; }
    to   { transform: translateX(-100%); opacity: 0; }
}

.animate-slide-in {
    animation: slide-in-right 0.3s ease-out forwards;
}
.animate-slide-out {
    animation: slide-out-right 0.25s ease-in forwards;
}
.animate-slide-in-left {
    animation: slide-in-left 0.3s ease-out forwards;
}
.animate-slide-out-left {
    animation: slide-out-left 0.25s ease-in forwards;
}


/* --------------------------------------------------------------------------
   9. LEAGUE SIDEBAR (sticky positioning — link styles in design-system.css)
   -------------------------------------------------------------------------- */



/* --------------------------------------------------------------------------
   10. ODDS DISPLAY HELPERS
   -------------------------------------------------------------------------- */

.odds-positive {
    color: rgb(var(--color-nba));
}

.odds-negative {
    color: rgb(var(--color-text));
}

.odds-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Roboto Mono', monospace;
    font-weight: 600;
    font-size: 0.8125rem;
}

.odds-badge-positive {
    background-color: rgba(var(--color-nba) / 0.1);
    color: rgb(var(--color-nba));
}

.odds-badge-negative {
    background-color: rgba(var(--color-muted) / 0.1);
    color: rgb(var(--color-text));
}


/* --------------------------------------------------------------------------
   11. GAME DETAIL — LIVE UPDATES
   -------------------------------------------------------------------------- */

/* Score flash: brief highlight when OOB swap lands */
@keyframes score-flash {
    0%   { color: rgb(var(--color-accent)); }
    100% { color: inherit; }
}
#score-display.htmx-settling .font-mono {
    animation: score-flash 1s ease-out;
}

/* WebSocket connection indicator (game detail variant) */
.ws-status-dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background-color: rgb(var(--color-muted));
    transition: background-color 0.3s ease;
}
.ws-status-dot.connected {
    background-color: #16A34A;
}
.ws-status-dot.connecting {
    background-color: #D97706;
    animation: live-pulse 1.5s ease-in-out infinite;
}


/* --------------------------------------------------------------------------
   12. FUTURES
   -------------------------------------------------------------------------- */

/* Outlined BET button — hover fills with primary */
.futures-bet-btn {
    display: inline-block;
    border: 2px solid rgb(var(--color-accent));
    color: rgb(var(--color-accent));
    font-family: 'Epilogue', sans-serif;
    font-weight: 700;
    font-style: italic;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.15s, color 0.15s, transform 0.1s;
    cursor: pointer;
}
.futures-bet-btn:hover {
    background-color: rgb(var(--color-accent));
    color: #fff;
}
.futures-bet-btn:active {
    transform: scale(0.95);
}
.futures-bet-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Active row — inline bet form highlight */
.futures-row--active {
    background-color: rgba(var(--color-accent) / 0.03);
    border-bottom: 2px solid rgb(var(--color-accent));
}

/* Confirmed row — green success tint */
.futures-row--confirmed {
    background-color: rgba(22, 163, 74, 0.04);
}

/* Champion card decorative watermark */
.futures-card--champion {
    position: relative;
    overflow: hidden;
}
.futures-card--champion::after {
    content: "🏆";
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    font-size: 5rem;
    opacity: 0.06;
    pointer-events: none;
    user-select: none;
}

