/* Favorites: toast, counter badge, heart animation, Favorites view + empty state.
   Navy / gold tokens shared with the lobby skin. */

/* ── Toast (one at a time, top of the content area) ───────── */
.x10-toast-region { position: fixed; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + 72px); z-index: 5000; display: none; justify-content: center; padding: 0 12px; pointer-events: none; }
.x10-toast-region.is-visible { display: flex; }
.x10-toast {
    display: flex; align-items: center; gap: 10px; max-width: min(92vw, 380px); padding: 10px 16px 10px 12px;
    background: #0A1C30; color: #fff; border: 1px solid rgba(233,167,34,.55); border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,.5);
    font-family: 'Proxima Nova', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    animation: x10-toast-in 220ms cubic-bezier(.22,1,.36,1) both;
}
.x10-toast-region.is-out .x10-toast { animation: x10-toast-out 200ms ease-in both; }
.x10-toast-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 10px; background: rgba(233,167,34,.18); color: #E9A722; }
.x10-toast-text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.x10-toast-text strong { font-size: 13px; font-weight: 800; line-height: 1.25; }
.x10-toast-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255,255,255,.66); font-size: 11px; font-weight: 600; }
.x10-toast--add { border-color: rgba(233,167,34,.7); }
.x10-toast--remove { border-color: rgba(255,255,255,.2); }
.x10-toast--remove .x10-toast-icon { background: rgba(255,255,255,.1); color: #fff; }
.x10-toast--error { border-color: rgba(255,107,107,.55); }
.x10-toast--error .x10-toast-icon { background: rgba(255,107,107,.15); color: #FF8A8A; }
@keyframes x10-toast-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes x10-toast-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-8px); } }

/* ── Counter inside the Favorites filter button ───────────── */
.x10-fav-count {
    display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 6px;
    border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; font-size: 11px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums;
    transition: opacity 160ms ease;
}
.x10-fav-count.is-loading { opacity: .5; }
.x10-favorites-filter-btn.is-active .x10-fav-count { background: rgba(0,16,33,.2); color: #001021; }

/* ── Heart: gold fill + a short pop when added ────────────── */
.x10-favorite-control svg { transition: transform 160ms ease; }
.x10-favorite-control.is-pop svg { animation: x10-fav-pop 340ms cubic-bezier(.34,1.56,.64,1); }
@keyframes x10-fav-pop { 0% { transform: scale(.7); } 60% { transform: scale(1.28); } 100% { transform: scale(1); } }

/* ── Favorites view ───────────────────────────────────────── */
.x10-casino-container.x10f-active > :not(.x10-search-wrapper):not(#x10-fav-view) { display: none !important; }
.x10f-view:empty { display: none; }
.x10f-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 4px 0 12px; }
.x10f-title { margin: 0; font-size: clamp(15px, 2vw, 20px); font-weight: 800; }
.x10f-count { margin: 0; color: rgba(255,255,255,.66); font-size: 12px; font-weight: 600; }
.x10f-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.x10f-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 10px; background: #1B324E; color: #fff; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; transition: background-color 160ms ease; }
.x10f-chip small { color: #E9A722; font-size: 11px; font-weight: 800; }
.x10f-chip:hover { background: #234062; }
.x10f-chip.is-on { background: #E9A722; color: #001021; }
.x10f-chip.is-on small { color: #001021; }
.x10f-chip:focus-visible, .x10f-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
body .x10f-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--x10-card-w, 112px), 1fr)); gap: 18px 10px; }
@media (max-width: 479px) { body .x10f-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; } }
body .x10f-grid .x10-game-card { width: 100%; min-width: 0; max-width: none; }
body .x10f-grid .x10-game-image[data-src] { filter: none; transform: none; }
body .x10f-grid .x10-game-thumb.x10-image-failed .x10-game-image { visibility: hidden; }
body .x10f-grid .x10-game-thumb.x10-image-failed::after { display: none; }

.x10f-empty { display: flex; flex-direction: column; align-items: center; padding: 48px 16px; border: 1px dashed rgba(255,255,255,.14); border-radius: 14px; text-align: center; color: rgba(255,255,255,.66); }
.x10f-empty-icon { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: 14px; border-radius: 50%; background: rgba(255,255,255,.06); color: rgba(255,255,255,.4); }
.x10f-empty strong { margin-bottom: 6px; color: #fff; font-size: 16px; font-weight: 800; }
.x10f-empty p { margin: 0 0 18px; font-size: 13px; }
.x10f-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border: 0; border-radius: 10px; background: #E9A722; color: #001021; font: inherit; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background-color 160ms ease; }
.x10f-btn:hover { background: #F2B94A; color: #001021; }

@media (prefers-reduced-motion: reduce) {
    .x10-toast, .x10-toast-region.is-out .x10-toast, .x10-favorite-control.is-pop svg { animation: none; }
    .x10-fav-count, .x10f-chip, .x10f-btn, .x10-favorite-control svg { transition: none; }
}

/* The legacy "Results · N games" line counts lobby cards only; the Favorites view has its own count. */
.x10-casino-container.x10f-active .x10-results-summary { display: none; }
/* Keep the page filled when the list is short (otherwise the page background shows through below it). */
.x10f-view { min-height: calc(100vh - 340px); padding-bottom: 8px; }
.x10f-view:empty { min-height: 0; }
