/*
 * pages/slots.css — slots page styling (M14b).
 * Refactored: provider categories + search header now match the
 * site-wide glass-card + accent-fill style used in the wallet popup
 * and Sign-in CTA. Old yellow .btnSlots and grey provider cards removed.
 */

/* ============================================================
 * Search + "Providers" header bar
 * ============================================================ */
.headSlots {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 8px;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}
.headSlots::after,
.searchSlots::after { content: none !important; }

.searchSlots {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 !important;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: border-color 0.15s, box-shadow 0.15s;
    overflow: hidden;
}
.searchSlots:focus-within {
    border-color: var(--color-accent, #B83A3A) !important;
    box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb, 184, 58, 58), 0.18);
}
.searchSlots input {
    flex: 1 1 auto;
    height: 100%;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    letter-spacing: 0.3px;
    padding: 0 18px;
}
.searchSlots input::placeholder { color: rgba(255,255,255,0.35); font-weight: 400; font-size: 15px; }

/* "Providers" toggle button — same multi-layer glass + accent fill as the
   wallet/withdraw modal CTAs (and the jackpot Sign-in CTA). All three
   accent layers use --color-accent-rgb so each tenant gets its own colour. */
.btnSlots {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    height: 44px !important;
    padding: 0 22px !important;
    border-radius: 10px !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 55%),
        linear-gradient(135deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.16) 50%, rgba(255,255,255,0) 70%) 0% 0% / 220% 100%,
        linear-gradient(180deg, rgba(var(--color-accent-rgb, 184, 58, 58), 0.85) 0%, rgba(var(--color-accent-rgb, 184, 58, 58), 0.65) 100%) !important;
    background-repeat: no-repeat !important;
    border: 0 !important;
    color: #fff !important;
    font-weight: 800 !important;
    font-size: 13px !important;
    letter-spacing: 1.4px !important;
    text-transform: uppercase !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.25) !important;
    box-shadow:
        0 4px 14px rgba(var(--color-accent-rgb, 184, 58, 58), 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.30),
        inset 0 -8px 20px rgba(var(--color-accent-rgb, 184, 58, 58), 0.10) !important;
    transition: background-position 0.6s cubic-bezier(0.25, 1, 0.5, 1),
                box-shadow 0.18s, transform 0.12s !important;
    -webkit-backdrop-filter: blur(6px) saturate(140%);
    backdrop-filter: blur(6px) saturate(140%);
    cursor: pointer;
    flex: 0 0 auto;
}
@media (hover: hover) and (pointer: fine) {
    .btnSlots:hover {
        background-position: 100% 0%, 100% 0%, 0% 0% !important;
        box-shadow:
            0 6px 24px rgba(var(--color-accent-rgb, 184, 58, 58), 0.50),
            inset 0 1px 0 rgba(255, 255, 255, 0.40),
            inset 0 -8px 20px rgba(var(--color-accent-rgb, 184, 58, 58), 0.18) !important;
        transform: translateY(-1px);
    }
}
.btnSlots:active { transform: translateY(0); }
.btnSlots svg { width: 18px; height: 18px; transition: transform 0.18s; }
.btnSlots[aria-expanded="true"] svg,
.providersSlots[style*="block"] ~ * .btnSlots svg { transform: rotate(180deg); }

/* ============================================================
 * Providers dropdown panel — grid of category cards
 * ============================================================ */
.providersSlots {
    margin: 0 0 14px 0 !important;
    padding: 14px !important;
    border-radius: 14px !important;
    background: linear-gradient(180deg, rgba(20, 18, 32, 0.85), rgba(12, 10, 22, 0.90)) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.40),
        0 0 0 1px rgba(var(--color-accent-rgb, 184, 58, 58), 0.10) inset;
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 8px !important;
    position: relative;
    z-index: 1;
}
/* When the providers panel is OPEN (toggleProviders() removes inline display:none),
   show it as a grid. Otherwise the inline `style="display:none"` from the blade
   keeps it hidden until the user clicks the Providers toggle. */
.providersSlots:not([style*="none"]) {
    display: grid !important;
}
.providersSlots::after { content: none !important; }

@media (max-width: 1200px) { .providersSlots { grid-template-columns: repeat(4, 1fr) !important; } }
@media (max-width: 768px)  { .providersSlots { grid-template-columns: repeat(3, 1fr) !important; } }
@media (max-width: 480px)  { .providersSlots { grid-template-columns: repeat(2, 1fr) !important; } }

/* Category card */
.providersSlots .provider {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: background 0.16s, border-color 0.16s, transform 0.12s;
    position: relative;
    overflow: hidden;
}
@media (hover: hover) and (pointer: fine) {
    .providersSlots .provider:hover {
        background: rgba(var(--color-accent-rgb, 184, 58, 58), 0.10);
        border-color: rgba(var(--color-accent-rgb, 184, 58, 58), 0.35);
        border-left-color: var(--color-accent, #B83A3A);
    }
    .providersSlots .provider:hover h4 { color: #fff; }
    .providersSlots .provider:hover img { filter: grayscale(0); opacity: 1; }
}
.providersSlots .provider.active {
    background: rgba(var(--color-accent-rgb, 184, 58, 58), 0.18) !important;
    border-color: var(--color-accent, #B83A3A) !important;
    border-left-color: var(--color-accent, #B83A3A) !important;
    box-shadow: 0 0 12px rgba(var(--color-accent-rgb, 184, 58, 58), 0.20);
}
.providersSlots .provider h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #e8e8f0;
    letter-spacing: 0.3px;
    text-align: center;
    cursor: pointer;
    line-height: 1.2;
}
.providersSlots .provider.active h4 { color: #fff; }

.providersSlots .provider img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.55;
    transition: filter 0.18s, opacity 0.18s;
}
.providersSlots .provider.active img {
    filter: grayscale(0);
    opacity: 1;
}

/* ============================================================
 * Slots grid + content
 * ============================================================ */
.slots__container {
    background: rgba(20, 18, 32, 0.40);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 4px;
}

.slotsLeftBox {
    display: flex;
    margin: 10px;
    align-items: center;
}
.slotsLeftBox img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
}
.slotsLeftBox span {
    font-size: 1.25rem;
    font-weight: 700;
    margin-left: 10px;
}

.slotsLoad {
    grid-column: 1 / -1;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.slots--notFound {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    font-weight: 600;
    font-size: 18px;
    color: #b6b6cc;
}

/* ============================================================
 * Slot card refresh — translucent dark base, accent rim & glow
 * on hover, modern Demo / Play buttons matching the rest of
 * the design system.
 * ============================================================ */
.slot_games_content .slot_game {
    border-radius: 14px !important;
    overflow: hidden !important;
    transition:
        transform 0.25s cubic-bezier(0.25, 1, 0.5, 1),
        box-shadow 0.25s,
        border-color 0.25s !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    padding: 0 !important;
    background-size: cover !important;
    background-position: center !important;
}
/* :hover lift — gated to (hover: hover) so iOS-sticky-hover doesn't apply
   the lifted state to whichever card the finger lands on while scrolling.
   Touch tap feedback is via :active below. */
@media (hover: hover) and (pointer: fine) {
    .slot_game:hover,
    .slot_games_content .slot_game:hover {
        transform: translateY(-6px) !important;
        border-color: rgba(var(--color-accent-rgb, 184, 58, 58), 0.55) !important;
        box-shadow:
            0 12px 30px rgba(0, 0, 0, 0.50),
            0 0 24px rgba(var(--color-accent-rgb, 184, 58, 58), 0.30) !important;
    }
}
/* Touch devices — short-tap feedback via :active (auto-clears on touchend). */
.slot_game:active,
.slot_games_content .slot_game:active {
    transform: scale(0.97) !important;
    transition: transform 0.08s ease !important;
}

/* Hover overlay — translucent gradient fade with accent vignette */
.slot_games_content .slot_game .info_slot_game {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background:
        radial-gradient(ellipse at center,
            rgba(var(--color-accent-rgb, 184, 58, 58), 0.18) 0%,
            transparent 70%),
        linear-gradient(180deg,
            rgba(0, 0, 0, 0.30) 0%,
            rgba(0, 0, 0, 0.78) 100%) !important;
    backdrop-filter: blur(2px) saturate(140%);
    -webkit-backdrop-filter: blur(2px) saturate(140%);
    padding: 14px 12px !important;
    grid-template-rows: auto 1fr auto !important;
    transition: opacity 0.25s !important;
}

/* Slot title in hover overlay */
.slot_games_content .slot_game .name_slot_game {
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    letter-spacing: 1px !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6) !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}

/* Play button (real money) — multi-layer accent fill, circular */
.slot_games_content .slot_game .play_slot_game {
    width: 64px !important;
    height: 64px !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0) 55%),
        linear-gradient(135deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.22) 50%, rgba(255,255,255,0) 70%) 0% 0% / 220% 100%,
        linear-gradient(180deg,
            rgba(var(--color-accent-rgb, 184, 58, 58), 0.95) 0%,
            rgba(var(--color-accent-rgb, 184, 58, 58), 0.75) 100%) !important;
    background-repeat: no-repeat !important;
    border: 0 !important;
    box-shadow:
        0 6px 18px rgba(var(--color-accent-rgb, 184, 58, 58), 0.50),
        inset 0 1px 0 rgba(255, 255, 255, 0.40),
        inset 0 -8px 16px rgba(var(--color-accent-rgb, 184, 58, 58), 0.20) !important;
    transition: background-position 0.5s, transform 0.18s, box-shadow 0.18s !important;
    cursor: pointer !important;
}
@media (hover: hover) and (pointer: fine) {
    .slot_games_content .slot_game .play_slot_game:hover {
        background-position: 100% 0%, 100% 0%, 0% 0% !important;
        transform: scale(1.10) !important;
        box-shadow:
            0 8px 26px rgba(var(--color-accent-rgb, 184, 58, 58), 0.65),
            inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
        opacity: 1 !important;
    }
}
.slot_games_content .slot_game .play_slot_game:active { transform: scale(0.98) !important; }
.slot_games_content .slot_game .play_slot_game svg {
    width: 24px !important;
    height: 24px !important;
    fill: #fff !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

/* Demo button — glass rounded, accent text, subtle border */
.slot_games_content .slot_game .demo_slot_game {
    width: auto !important;
    min-width: 92px !important;
    height: 32px !important;
    padding: 0 16px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    letter-spacing: 1.6px !important;
    text-transform: uppercase !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    transition: background 0.18s, border-color 0.18s, color 0.18s !important;
    cursor: pointer !important;
    align-self: center !important;
    justify-self: center !important;
}
@media (hover: hover) and (pointer: fine) {
    .slot_games_content .slot_game .demo_slot_game:hover {
        background: rgba(var(--color-accent-rgb, 184, 58, 58), 0.18) !important;
        border-color: rgba(var(--color-accent-rgb, 184, 58, 58), 0.55) !important;
        color: #fff !important;
        opacity: 1 !important;
    }
}

footer { display: none; }

@media (max-width: 725px) {
    .btn-up { right: 20px; }
}

@media (max-width: 600px) {
    .headSlots { padding: 4px; gap: 4px; margin-bottom: 10px; }
    .searchSlots { height: 40px; padding: 0 12px; }
    .searchSlots input { font-size: 13px; }
    .btnSlots {
        height: 40px !important;
        padding: 0 12px !important;
        font-size: 12px !important;
        letter-spacing: 0.8px !important;
    }
    .providersSlots { padding: 10px !important; gap: 6px !important; }
    .providersSlots .provider { height: 48px; padding: 6px 8px; }
    .providersSlots .provider h4 { font-size: 12px; }
}

/* ============================================================
 * Touch-device hover overrides — legacy core.css and index.v13.css have
 * unwrapped `.slot_game:hover { transform: scale(1.1) }` and friends. On
 * iOS those stick after a tap and produce the "left/right slot looks
 * highlighted after navigating from the bottom nav" symptom. We force-
 * reset them on touch devices here. slots.css loads AFTER core.css so the
 * cascade lets us override.
 * ============================================================ */
/* Touch UX: just `touch-action: manipulation` to kill the 300ms tap delay.
   The :hover lift is intentionally left ungated so iOS sticky-hover gives
   the same animation feedback users see on home page tf-card-box tiles. */
@media (hover: none) {
    .slot_game,
    .slot_games_content .slot_game,
    .providersSlots .provider,
    .btnSlots,
    .navMenuMob a,
    .navMenuMob li {
        touch-action: manipulation;
    }
}
