/* ============================================================
   MOOD FILTERS — command bar + drawer «Все фильтры»
   Visual language aligned with mood-footer engage cards
   ============================================================ */

/* — Command bar shell (footer engage-card aesthetic) — */
.mood-filter-bar {
    position: relative;
    margin-bottom: var(--space-5);
    isolation: isolate;
    --mood-filter-control-bg: var(--surface-3);
    --mood-filter-control-border: rgba(255, 255, 255, 0.16);
    --mood-filter-control-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 2px 10px rgba(0, 0, 0, 0.22);
    --mood-filter-tray-bg: rgba(0, 0, 0, 0.24);
    --mood-filter-tray-border: rgba(255, 255, 255, 0.08);
}

.mood-filter-bar.games-toolbar-panel,
.mood-filter-bar.games-toolbar-panel--home {
    position: sticky;
    top: var(--mood-header-h);
    z-index: var(--z-raised);
    overflow: hidden;
    margin-bottom: var(--space-5);
    padding: 20px clamp(16px, 3vw, 28px) 18px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background:
        radial-gradient(ellipse 92% 85% at 0% 100%, rgba(68, 235, 213, 0.16) 0%, transparent 56%),
        radial-gradient(ellipse 78% 68% at 100% 0%, rgba(243, 83, 107, 0.12) 0%, transparent 52%),
        linear-gradient(155deg, var(--surface-2) 0%, var(--surface) 100%);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Decorative rings — same vocabulary as mood-footer__engage-deco */
.mood-filter-bar::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    left: -64px;
    bottom: -88px;
    border-radius: 50%;
    border: 2px solid rgba(68, 235, 213, 0.2);
    box-shadow:
        0 0 0 24px rgba(68, 235, 213, 0.05),
        0 0 0 48px rgba(68, 235, 213, 0.025);
    pointer-events: none;
    z-index: 0;
}

.mood-filter-bar::after {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    right: -28px;
    top: -48px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(243, 83, 107, 0.18) 0%, transparent 68%);
    pointer-events: none;
    z-index: 0;
}

.mood-filter-bar__top,
.mood-filter-bar__ribbon-row {
    position: relative;
    z-index: 1;
}

.mood-filter-bar__top {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: 0;
}

.mood-filter-bar__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.mood-filter-bar__actions .games-toolbar {
    flex: 0 0 auto;
    gap: 6px;
    padding: 5px;
    border-radius: 999px;
    background: var(--mood-filter-tray-bg);
    border: 1px solid var(--mood-filter-tray-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.mood-filter-bar__top .provider-filter-tags:not(.hidden) {
    margin-left: 0;
    gap: 8px;
}

/* Provider chips inside bar — trust-chip style */
.mood-filter-bar .provider-filter-tag {
    height: 34px;
    padding: 0 8px 0 10px;
    border-radius: 999px;
    background: rgba(68, 235, 213, 0.1);
    border-color: rgba(68, 235, 213, 0.28);
    box-shadow: 0 4px 14px rgba(68, 235, 213, 0.08);
}

.mood-filter-bar .provider-filter-tag:hover {
    background: rgba(68, 235, 213, 0.16);
    border-color: rgba(68, 235, 213, 0.42);
}

/* — Action pills (footer channel-pill) — */
.mood-filter-bar__all-btn,
body.mood-layout-v2 .mood-filter-bar .games-search-btn,
body.mood-layout-v2 .mood-filter-bar .games-provider-btn,
#pageHome .mood-filter-bar .games-search-btn,
#pageHome .mood-filter-bar .games-provider-btn,
#pageGames .mood-filter-bar .games-search-btn,
#pageGames .mood-filter-bar .games-provider-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--mood-filter-control-border) !important;
    background: var(--mood-filter-control-bg) !important;
    color: var(--text) !important;
    font-family: var(--font-sans);
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: var(--mood-filter-control-shadow) !important;
    transition:
        background var(--transition),
        border-color var(--transition),
        color var(--transition),
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.mood-filter-bar__all-btn:hover,
body.mood-layout-v2 .mood-filter-bar .games-search-btn:hover,
body.mood-layout-v2 .mood-filter-bar .games-provider-btn:hover,
#pageHome .mood-filter-bar .games-search-btn:hover,
#pageHome .mood-filter-bar .games-provider-btn:hover,
#pageGames .mood-filter-bar .games-search-btn:hover,
#pageGames .mood-filter-bar .games-provider-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(68, 235, 213, 0.45) !important;
    background: color-mix(in srgb, var(--surface-3) 72%, rgba(68, 235, 213, 0.22)) !important;
    color: var(--text) !important;
    filter: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 8px 20px rgba(0, 0, 0, 0.2) !important;
}

body.mood-layout-v2 .mood-filter-bar .games-search-btn-icon,
body.mood-layout-v2 .mood-filter-bar .games-provider-icon {
    color: var(--c-mint, #44ebd5);
}

.mood-filter-bar__all-btn-chev {
    display: inline-flex;
    align-items: center;
    color: var(--c-mint, #44ebd5);
}

.mood-filter-bar__all-btn-chev svg { width: 14px; height: 14px; }

.mood-filter-bar__actions .games-provider-btn {
    margin-left: auto;
}

body.mood-layout-v2 .mood-filter-bar .games-toolbar-kbd {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-strong);
    color: var(--text-dim);
}

/* — Ribbon row — */
.mood-filter-bar__ribbon-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.mood-filter-bar__ribbon-viewport {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scroll-padding: 0 6px;
    scrollbar-width: none;
    padding: 4px 6px;
    border-radius: 12px;
    background: var(--mood-filter-tray-bg);
    border: 1px solid var(--mood-filter-tray-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.mood-filter-bar__ribbon-viewport::-webkit-scrollbar { display: none; }

.mood-filter-bar__ribbon,
.mood-filter-bar .home-catalog-tabs,
.mood-filter-bar .catalog-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px !important;
    padding: 0 !important;
}

/* Mood chip tabs — compact horizontal (icon + label in one row) */
body.mood-layout-v2 .mood-filter-bar .catalog-tab--mood-chip,
#pageHome .mood-filter-bar .catalog-tab--mood-chip,
#pageGames .mood-filter-bar .catalog-tab--mood-chip {
    position: relative;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    flex: 0 0 auto;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 36px !important;
    height: 36px !important;
    padding: 0 12px 0 6px !important;
    border-radius: 12px !important;
    border: 1px solid var(--mood-filter-control-border) !important;
    background: var(--mood-filter-control-bg) !important;
    color: var(--text-muted) !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    box-shadow: var(--mood-filter-control-shadow) !important;
    scroll-snap-align: start;
    transition:
        background var(--transition),
        border-color var(--transition),
        color var(--transition),
        box-shadow 0.2s ease;
}

.catalog-tab-chip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: rgba(68, 235, 213, 0.12);
    color: var(--c-mint, #44ebd5);
    flex: 0 0 auto;
}

.catalog-tab-chip-icon svg,
.catalog-tab-chip-icon img {
    width: 15px;
    height: 15px;
}

.catalog-tab-chip-label {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 9.5rem;
}

body.mood-layout-v2 .mood-filter-bar .catalog-tab--mood-chip:hover,
#pageHome .mood-filter-bar .catalog-tab--mood-chip:hover,
#pageGames .mood-filter-bar .catalog-tab--mood-chip:hover {
    background: color-mix(in srgb, var(--surface-3) 80%, rgba(255, 255, 255, 0.12)) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
    color: var(--text) !important;
    transform: none;
}

body.mood-layout-v2 .mood-filter-bar .catalog-tab--mood-chip.active,
#pageHome .mood-filter-bar .catalog-tab--mood-chip.active,
#pageGames .mood-filter-bar .catalog-tab--mood-chip.active {
    color: var(--text) !important;
    background: color-mix(in srgb, var(--surface-3) 55%, rgba(68, 235, 213, 0.28)) !important;
    border-color: rgba(68, 235, 213, 0.55) !important;
    font-weight: 700;
    box-shadow:
        inset 0 0 0 1px rgba(68, 235, 213, 0.22),
        0 4px 14px rgba(68, 235, 213, 0.14) !important;
}

body.mood-layout-v2 .mood-filter-bar .catalog-tab--mood-chip.active .catalog-tab-chip-icon,
#pageHome .mood-filter-bar .catalog-tab--mood-chip.active .catalog-tab-chip-icon,
#pageGames .mood-filter-bar .catalog-tab--mood-chip.active .catalog-tab-chip-icon {
    color: #0f1f28;
    background: linear-gradient(135deg, #44ebd5 0%, #2ec4b0 100%);
    box-shadow: 0 2px 8px rgba(68, 235, 213, 0.24);
}

body.mood-layout-v2 .mood-filter-bar .catalog-tab--mood-chip .catalog-tab-info {
    position: static;
    width: 14px;
    height: 14px;
    margin-left: 2px;
    font-size: 0.58rem;
    flex: 0 0 auto;
}

/* Legacy ribbon pills fallback */
body.mood-layout-v2 .mood-filter-bar .catalog-tab:not(.catalog-tab--mood-chip),
body.mood-layout-v2 .mood-filter-bar .catalog-tab.catalog-tab--ribbon,
#pageHome .mood-filter-bar .home-catalog-tabs .catalog-tab,
#pageHome .mood-filter-bar .catalog-tabs .catalog-tab,
#pageGames .mood-filter-bar .catalog-tabs .catalog-tab,
#pageGames .mood-filter-bar #catalogTabs .catalog-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    height: auto;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--mood-filter-control-border) !important;
    background: var(--mood-filter-control-bg) !important;
    color: var(--text-muted) !important;
    font-size: 0.84rem;
    font-weight: 600;
    box-shadow: var(--mood-filter-control-shadow) !important;
    filter: none;
    transition:
        background var(--transition),
        border-color var(--transition),
        color var(--transition),
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

body.mood-layout-v2 .mood-filter-bar .catalog-tab:hover,
body.mood-layout-v2 .mood-filter-bar .catalog-tab.catalog-tab--ribbon:hover,
#pageHome .mood-filter-bar .home-catalog-tabs .catalog-tab:hover,
#pageHome .mood-filter-bar .catalog-tabs .catalog-tab:hover,
#pageGames .mood-filter-bar .catalog-tabs .catalog-tab:hover,
#pageGames .mood-filter-bar #catalogTabs .catalog-tab:hover {
    background: color-mix(in srgb, var(--surface-3) 80%, rgba(255, 255, 255, 0.12)) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
    color: var(--text) !important;
    transform: translateY(-1px);
}

body.mood-layout-v2 .mood-filter-bar .catalog-tab.active,
body.mood-layout-v2 .mood-filter-bar .catalog-tab.catalog-tab--ribbon.active,
#pageHome .mood-filter-bar .home-catalog-tabs .catalog-tab.active,
#pageHome .mood-filter-bar .catalog-tabs .catalog-tab.active,
#pageGames .mood-filter-bar .catalog-tabs .catalog-tab.active,
#pageGames .mood-filter-bar #catalogTabs .catalog-tab.active {
    color: #0f1f28 !important;
    background: linear-gradient(135deg, #44ebd5 0%, #2ec4b0 100%) !important;
    border-color: transparent !important;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(68, 235, 213, 0.28) !important;
}

body.mood-layout-v2 .mood-filter-bar .catalog-tab.active::after,
body.mood-layout-v2 .mood-filter-bar .catalog-tab.catalog-tab--ribbon.active::after {
    display: none;
}

body.mood-layout-v2 .mood-filter-bar .catalog-tab.active:hover,
body.mood-layout-v2 .mood-filter-bar .catalog-tab.catalog-tab--ribbon.active:hover {
    filter: brightness(1.04);
    color: #0f1f28;
    background: linear-gradient(135deg, #44ebd5 0%, #2ec4b0 100%);
    transform: translateY(-1px);
}

body.mood-layout-v2 .mood-filter-bar .catalog-tab.active .catalog-tab-icon,
body.mood-layout-v2 .mood-filter-bar .catalog-tab.catalog-tab--ribbon.active .catalog-tab-icon {
    opacity: 1;
    color: #0f1f28;
}

/* Scroll arrows — footer util-btn */
.mood-filter-bar__scroll-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    transition:
        background var(--transition),
        border-color var(--transition),
        color var(--transition),
        transform 0.2s ease,
        opacity var(--transition);
}

.mood-filter-bar__scroll-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    background: rgba(68, 235, 213, 0.1);
    border-color: rgba(68, 235, 213, 0.35);
    color: var(--c-mint, #44ebd5);
}

.mood-filter-bar__scroll-btn:disabled {
    opacity: 0.32;
    cursor: default;
}

.mood-filter-bar__ribbon-row:not(.casino-hscroll-fade--overflow) .mood-filter-bar__scroll-btn {
    opacity: 0.35;
    pointer-events: none;
}

.mood-filter-bar__ribbon-row.casino-hscroll-fade--overflow .mood-filter-bar__scroll-btn {
    display: inline-flex;
    opacity: 1;
    pointer-events: auto;
}

.mood-filter-bar__actions .games-toolbar.mood-filter-search-shell:not(.is-search-active) {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
}

/* — Inline search expand — */
.mood-filter-search-shell {
    position: relative;
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    max-width: none;
    transition: flex 0.28s var(--ease-out), width 0.28s var(--ease-out);
}

.mood-filter-search-shell.is-search-active {
    flex: 1 1 auto;
    width: auto;
    min-width: min(100%, 520px);
    max-width: 100%;
    padding: 0 !important;
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.mood-filter-search-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: auto;
    flex: 0 0 auto;
    min-width: 0;
    max-width: 100%;
}

.mood-filter-search-wrap.is-open {
    width: 100%;
    flex: 1 1 auto;
}

.mood-filter-search-wrap.is-open .games-search-btn {
    display: none !important;
}

.mood-filter-search-expand {
    display: none;
    align-items: center;
    gap: 10px;
    width: 0;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

.mood-filter-search-wrap.is-open .mood-filter-search-expand {
    display: flex;
    width: 100%;
    min-height: 38px;
    padding: 0 10px 0 12px;
    border: 1px solid var(--mood-filter-control-border);
    background: var(--mood-filter-control-bg);
    box-shadow: var(--mood-filter-control-shadow);
    opacity: 1;
    pointer-events: auto;
    transition:
        opacity 0.2s var(--ease-out),
        border-color 0.2s var(--ease-out),
        box-shadow 0.2s var(--ease-out);
}

.mood-filter-search-wrap.is-open .mood-filter-search-expand:focus-within {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 0 3px rgba(68, 235, 213, 0.12);
}

.mood-filter-search-expand__icon {
    display: inline-flex;
    flex: 0 0 auto;
    color: var(--text-dim);
}

.mood-filter-search-expand__icon svg {
    width: 17px;
    height: 17px;
}

.mood-filter-search-expand__input {
    flex: 1 1 auto;
    min-width: 0;
    height: 38px;
    padding: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--text);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
}

.mood-filter-search-expand__input:focus,
.mood-filter-search-expand__input:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border: 0 !important;
}

.mood-filter-search-expand__input::placeholder {
    color: var(--text-dim);
    opacity: 0.9;
}

.mood-filter-search-expand__clear,
.mood-filter-search-expand__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-dim);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.mood-filter-search-expand__clear:hover,
.mood-filter-search-expand__close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.mood-filter-search-expand__clear.hidden {
    display: none;
}

.mood-filter-bar--search-open .mood-filter-bar__actions .games-provider-btn {
    flex-shrink: 0;
}

.mood-filter-search-drop {
    margin-top: 12px;
    border-radius: 16px;
    border: 1px solid var(--mood-filter-tray-border);
    background: var(--mood-filter-control-bg);
    box-shadow: var(--mood-filter-control-shadow);
    overflow: hidden;
}

.mood-filter-search-drop.hidden {
    display: none;
}

.mood-filter-search-drop__inner {
    max-height: min(52vh, 520px);
    overflow-y: auto;
    padding: 12px;
}

.mood-filter-search-drop .search-popup-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
}

.mood-filter-search-drop .search-popup-results-count {
    margin: 0 0 10px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Empty state — mood smiley */
.mood-search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 16px 28px;
    text-align: center;
}

.mood-search-empty__face {
    width: 76px;
    height: 76px;
    margin-bottom: 4px;
    filter: drop-shadow(0 8px 20px rgba(68, 235, 213, 0.18));
    animation: mood-search-empty-float 2.8s ease-in-out infinite;
}

.mood-search-empty__face svg {
    width: 100%;
    height: 100%;
    display: block;
}

.mood-search-empty__slogan {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text);
    letter-spacing: -0.02em;
}

.mood-search-empty__hint {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--text-dim);
}

@keyframes mood-search-empty-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(2deg); }
}

html[data-theme="light"] .mood-search-empty__face {
    filter: drop-shadow(0 6px 16px rgba(68, 235, 213, 0.22));
}

.mood-filter-bar--search-open .mood-filter-bar__ribbon-row {
    opacity: 0.72;
}

@media (max-width: 767px) {
    body.mood-layout-v2 .mood-filter-bar .catalog-tab--mood-chip,
    #pageHome .mood-filter-bar .catalog-tab--mood-chip,
    #pageGames .mood-filter-bar .catalog-tab--mood-chip {
        min-height: 34px !important;
        height: 34px !important;
        padding: 0 10px 0 5px !important;
        font-size: 0.76rem !important;
    }

    .catalog-tab-chip-label {
        max-width: 7.5rem;
    }

    .mood-filter-search-shell.is-search-active {
        min-width: 100%;
        flex: 1 1 100%;
    }

    .mood-filter-search-wrap.is-open {
        min-width: 100%;
        flex: 1 1 100%;
    }

    .mood-filter-bar--search-open .mood-filter-bar__actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 1023px) {
    .mood-filter-bar__ribbon-viewport {
        overflow-x: auto;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scroll-padding-left: 4px;
    }

    .mood-filter-bar__ribbon .catalog-tab { scroll-snap-align: start; }

    .mood-filter-bar__ribbon-row.casino-hscroll-fade--overflow .mood-filter-bar__ribbon-viewport {
        mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
    }

    .mood-filter-bar__ribbon-row.casino-hscroll-fade--at-start .mood-filter-bar__ribbon-viewport {
        mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 20px), transparent 100%);
        -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 20px), transparent 100%);
    }

    .mood-filter-bar__ribbon-row.casino-hscroll-fade--at-end .mood-filter-bar__ribbon-viewport {
        mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 100%);
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 100%);
    }
}

@media (max-width: 767px) {
    .mood-filter-bar.games-toolbar-panel,
    .mood-filter-bar.games-toolbar-panel--home {
        padding: 16px 14px 14px;
        border-radius: 18px;
    }

    .mood-filter-bar__all-btn-label { font-size: 0.78rem; }

    .mood-filter-bar__actions .games-provider-btn { margin-left: 0; }

    .mood-filter-bar__actions {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 8px;
    }

    .mood-filter-bar__all-btn { justify-self: stretch; justify-content: center; }

    body.mood-layout-v2 .mood-filter-bar .games-search-btn,
    body.mood-layout-v2 .mood-filter-bar .games-provider-btn,
    .mood-filter-bar__all-btn {
        min-height: 38px;
        padding: 0 12px;
        font-size: 0.8rem;
    }

    .mood-filter-bar__ribbon-row {
        margin-top: 14px;
        padding-top: 14px;
    }
}

/* ============================================================
   DRAWER — engage-card surfaces
   ============================================================ */
.mood-filters-drawer {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-modal) + 2);
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
}

.mood-filters-drawer:not(.hidden) { pointer-events: auto; }
.mood-filters-drawer.hidden { display: none; }

.mood-filters-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 14, 0.68);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.22s var(--ease-out);
}

.mood-filters-drawer:not(.hidden) .mood-filters-drawer__backdrop { opacity: 1; }

.mood-filters-drawer__panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(420px, 100vw);
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    overflow: hidden;
    background:
        radial-gradient(ellipse 90% 70% at 0% 0%, rgba(68, 235, 213, 0.12) 0%, transparent 55%),
        linear-gradient(180deg, var(--surface-2) 0%, var(--bg-elevated) 100%);
    border-left: 1px solid var(--border);
    box-shadow: -12px 0 48px rgba(0, 0, 0, 0.32);
    transform: translateX(100%);
    transition: transform 0.28s var(--ease-out);
}

.mood-filters-drawer:not(.hidden) .mood-filters-drawer__panel {
    transform: translateX(0);
}

.mood-filters-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.mood-filters-drawer__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}

.mood-filters-drawer__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition), transform 0.2s ease;
}

.mood-filters-drawer__close:hover {
    transform: translateY(-1px);
    background: rgba(68, 235, 213, 0.1);
    border-color: rgba(68, 235, 213, 0.35);
    color: var(--text);
}

.mood-filters-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-4) var(--space-5);
    -webkit-overflow-scrolling: touch;
}

.mood-filters-drawer__foot {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.mood-filters-drawer__foot-btn { flex: 1; }

.mood-filters-drawer__foot .btn-primary {
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(68, 235, 213, 0.24);
}

/* Quick tiles */
.mood-filters-quick {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.mood-filters-quick__tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 80px;
    padding: var(--space-3);
    border-radius: 16px;
    border: 1px solid var(--border);
    background:
        radial-gradient(ellipse 80% 70% at 50% 100%, rgba(68, 235, 213, 0.1) 0%, transparent 60%),
        rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), transform 0.2s ease, box-shadow 0.2s ease;
}

.mood-filters-quick__tile:hover {
    transform: translateY(-2px);
    border-color: rgba(68, 235, 213, 0.35);
    background:
        radial-gradient(ellipse 80% 70% at 50% 100%, rgba(68, 235, 213, 0.16) 0%, transparent 60%),
        rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.mood-filters-quick__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--c-mint, #44ebd5);
}

.mood-filters-quick__icon svg { width: 22px; height: 22px; }

/* Accordion */
.mood-filters-acc {
    margin-bottom: var(--space-4);
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.mood-filters-acc__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.mood-filters-acc__summary::-webkit-details-marker { display: none; }

.mood-filters-acc__summary::after {
    content: '▾';
    font-size: 0.7rem;
    color: var(--text-dim);
    transition: transform 0.2s var(--ease-out);
}

.mood-filters-acc[open] .mood-filters-acc__summary::after {
    transform: rotate(180deg);
}

.mood-filters-acc__body {
    padding: 0 16px 16px;
    border-top: 1px solid var(--border);
}

/* Collections radio grid */
.mood-filters-collections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
    padding-top: 12px;
    max-height: 280px;
    overflow-y: auto;
}

.mood-filters-collection-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 6px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.mood-filters-collection-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.mood-filters-collection-item.active {
    color: var(--text);
    background: rgba(68, 235, 213, 0.08);
}

.mood-filters-collection-item__ring {
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 1px;
    border-radius: 50%;
    border: 2px solid var(--border-strong);
    background: var(--bg-card);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.mood-filters-collection-item.active .mood-filters-collection-item__ring {
    border-color: var(--c-mint, #44ebd5);
    box-shadow: inset 0 0 0 3px var(--bg-card), inset 0 0 0 5px var(--c-mint, #44ebd5);
}

.mood-filters-collection-item__label {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

/* Provider grid in drawer */
.mood-filters-provider-search-wrap { padding-top: 12px; }

.mood-filters-provider-search {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.mood-filters-provider-search:focus {
    outline: none;
    border-color: rgba(68, 235, 213, 0.45);
    box-shadow: 0 0 0 3px rgba(68, 235, 213, 0.12);
}

.mood-filters-provider-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding-top: 12px;
    max-height: 320px;
    overflow-y: auto;
}

.mood-filters-provider-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 68px;
    padding: 8px 6px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition), color var(--transition), transform 0.2s ease;
}

.mood-filters-provider-tile:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.mood-filters-provider-tile.active {
    border-color: rgba(68, 235, 213, 0.45);
    background: rgba(68, 235, 213, 0.12);
    color: var(--text);
    box-shadow: 0 6px 16px rgba(68, 235, 213, 0.12);
}

.mood-filters-provider-tile__logo {
    width: 36px;
    height: 24px;
    object-fit: contain;
    opacity: 0.85;
    filter: grayscale(0.2);
}

.mood-filters-provider-tile.active .mood-filters-provider-tile__logo {
    opacity: 1;
    filter: none;
}

.mood-filters-provider-tile__ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 24px;
    border-radius: 6px;
    background: var(--surface-2);
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-dim);
}

.mood-filters-provider-tile__name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
}

.mood-filters-provider-empty {
    grid-column: 1 / -1;
    padding: 16px 8px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.82rem;
}

/* Bottom sheet on mobile */
@media (max-width: 767px) {
    .mood-filters-drawer {
        align-items: flex-end;
        justify-content: center;
    }

    .mood-filters-drawer__panel {
        width: 100%;
        max-height: min(88vh, 88dvh);
        border-left: 0;
        border-top: 1px solid var(--border);
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
    }

    .mood-filters-drawer:not(.hidden) .mood-filters-drawer__panel {
        transform: translateY(0);
    }

    .mood-filters-collections {
        grid-template-columns: 1fr;
        max-height: 220px;
    }
}

/* Light theme */
html[data-theme="light"] .mood-filter-bar {
    --mood-filter-control-bg: #ffffff;
    --mood-filter-control-border: rgba(16, 24, 40, 0.14);
    --mood-filter-control-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 2px 8px rgba(16, 24, 40, 0.08);
    --mood-filter-tray-bg: rgba(16, 24, 40, 0.04);
    --mood-filter-tray-border: rgba(16, 24, 40, 0.08);
}

html[data-theme="light"] .mood-filters-drawer__backdrop {
    background: rgba(15, 18, 24, 0.4);
}
html[data-theme="light"] .mood-filter-bar::before {
    border-color: rgba(68, 235, 213, 0.28);
    box-shadow:
        0 0 0 24px rgba(68, 235, 213, 0.1),
        0 0 0 48px rgba(68, 235, 213, 0.05);
}

html[data-theme="light"] .mood-filters-drawer__panel {
    background:
        radial-gradient(ellipse 90% 70% at 0% 0%, rgba(68, 235, 213, 0.14) 0%, transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-color: rgba(16, 24, 40, 0.08);
}

html[data-theme="light"] .mood-filter-bar.games-toolbar-panel,
html[data-theme="light"] .mood-filter-bar.games-toolbar-panel--home {
    background:
        radial-gradient(ellipse 92% 85% at 0% 100%, rgba(68, 235, 213, 0.14) 0%, transparent 56%),
        radial-gradient(ellipse 78% 68% at 100% 0%, rgba(243, 83, 107, 0.1) 0%, transparent 52%),
        linear-gradient(155deg, #ffffff 0%, #f8fafc 100%);
    border-color: rgba(16, 24, 40, 0.08);
    box-shadow: 0 12px 32px rgba(16, 24, 40, 0.08);
}

html[data-theme="light"] .mood-filter-bar::after {
    background: radial-gradient(circle, rgba(243, 83, 107, 0.12) 0%, transparent 68%);
}

html[data-theme="light"] .mood-filter-bar__ribbon-row {
    border-top-color: rgba(16, 24, 40, 0.08);
}

html[data-theme="light"] .mood-filter-bar__ribbon-viewport {
    background: rgba(16, 24, 40, 0.03);
    border-color: rgba(16, 24, 40, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

html[data-theme="light"] .mood-filter-bar__actions .games-toolbar {
    background: rgba(16, 24, 40, 0.04);
    border-color: rgba(16, 24, 40, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] .mood-filter-bar .provider-filter-tag {
    background: rgba(68, 235, 213, 0.1);
    border-color: rgba(15, 118, 110, 0.22);
    color: #0f766e;
    box-shadow: 0 2px 8px rgba(68, 235, 213, 0.08);
}

html[data-theme="light"] .mood-filter-bar .provider-filter-tag:hover {
    background: rgba(68, 235, 213, 0.16);
    border-color: rgba(15, 118, 110, 0.32);
}

html[data-theme="light"] .mood-filter-bar__all-btn,
html[data-theme="light"] body.mood-layout-v2 .mood-filter-bar .games-search-btn,
html[data-theme="light"] body.mood-layout-v2 .mood-filter-bar .games-provider-btn,
html[data-theme="light"] #pageHome .mood-filter-bar .games-search-btn,
html[data-theme="light"] #pageHome .mood-filter-bar .games-provider-btn,
html[data-theme="light"] #pageGames .mood-filter-bar .games-search-btn,
html[data-theme="light"] #pageGames .mood-filter-bar .games-provider-btn {
    background: #ffffff !important;
    border-color: rgba(16, 24, 40, 0.1) !important;
    color: #344054 !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 2px 8px rgba(16, 24, 40, 0.06) !important;
}

html[data-theme="light"] .mood-filter-bar__all-btn:hover,
html[data-theme="light"] body.mood-layout-v2 .mood-filter-bar .games-search-btn:hover,
html[data-theme="light"] body.mood-layout-v2 .mood-filter-bar .games-provider-btn:hover,
html[data-theme="light"] #pageHome .mood-filter-bar .games-search-btn:hover,
html[data-theme="light"] #pageHome .mood-filter-bar .games-provider-btn:hover,
html[data-theme="light"] #pageGames .mood-filter-bar .games-search-btn:hover,
html[data-theme="light"] #pageGames .mood-filter-bar .games-provider-btn:hover {
    background: rgba(68, 235, 213, 0.1) !important;
    border-color: rgba(68, 235, 213, 0.35) !important;
    color: #101828 !important;
}

html[data-theme="light"] body.mood-layout-v2 .mood-filter-bar .games-search-btn-icon,
html[data-theme="light"] body.mood-layout-v2 .mood-filter-bar .games-provider-icon,
html[data-theme="light"] #pageHome .mood-filter-bar .games-search-btn-icon,
html[data-theme="light"] #pageHome .mood-filter-bar .games-provider-icon,
html[data-theme="light"] #pageGames .mood-filter-bar .games-search-btn-icon,
html[data-theme="light"] #pageGames .mood-filter-bar .games-provider-icon,
html[data-theme="light"] .mood-filter-bar__all-btn-chev {
    color: #0f766e;
}

html[data-theme="light"] body.mood-layout-v2 .mood-filter-bar .games-toolbar-kbd,
html[data-theme="light"] #pageHome .mood-filter-bar .games-toolbar-kbd,
html[data-theme="light"] #pageGames .mood-filter-bar .games-toolbar-kbd {
    background: rgba(16, 24, 40, 0.05);
    border-color: rgba(16, 24, 40, 0.1);
    color: #667085;
}

html[data-theme="light"] .mood-filter-bar__scroll-btn {
    background: #ffffff;
    border-color: rgba(16, 24, 40, 0.1);
    color: #667085;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
}

html[data-theme="light"] .mood-filter-bar__scroll-btn:hover:not(:disabled) {
    background: rgba(68, 235, 213, 0.1);
    border-color: rgba(68, 235, 213, 0.35);
    color: #0f766e;
}

html[data-theme="light"] body.mood-layout-v2 .mood-filter-bar .catalog-tab,
html[data-theme="light"] body.mood-layout-v2 .mood-filter-bar .catalog-tab.catalog-tab--ribbon,
html[data-theme="light"] #pageHome .mood-filter-bar .catalog-tab,
html[data-theme="light"] #pageHome .mood-filter-bar .catalog-tab--mood-chip,
html[data-theme="light"] #pageGames .mood-filter-bar .catalog-tab,
html[data-theme="light"] #pageGames .mood-filter-bar #catalogTabs .catalog-tab,
html[data-theme="light"] #pageGames .mood-filter-bar .catalog-tab--mood-chip {
    background: #ffffff !important;
    border-color: rgba(16, 24, 40, 0.08) !important;
    color: #667085 !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 1px 3px rgba(16, 24, 40, 0.05) !important;
}

html[data-theme="light"] body.mood-layout-v2 .mood-filter-bar .catalog-tab:hover,
html[data-theme="light"] body.mood-layout-v2 .mood-filter-bar .catalog-tab.catalog-tab--ribbon:hover,
html[data-theme="light"] #pageHome .mood-filter-bar .catalog-tab:hover,
html[data-theme="light"] #pageHome .mood-filter-bar .catalog-tab--mood-chip:hover,
html[data-theme="light"] #pageGames .mood-filter-bar .catalog-tab:hover,
html[data-theme="light"] #pageGames .mood-filter-bar #catalogTabs .catalog-tab:hover,
html[data-theme="light"] #pageGames .mood-filter-bar .catalog-tab--mood-chip:hover {
    background: #f8fafc !important;
    border-color: rgba(16, 24, 40, 0.12) !important;
    color: #344054 !important;
}

html[data-theme="light"] body.mood-layout-v2 .mood-filter-bar .catalog-tab.active,
html[data-theme="light"] body.mood-layout-v2 .mood-filter-bar .catalog-tab.catalog-tab--ribbon.active,
html[data-theme="light"] #pageHome .mood-filter-bar .catalog-tab.active,
html[data-theme="light"] #pageHome .mood-filter-bar .catalog-tab--mood-chip.active,
html[data-theme="light"] #pageGames .mood-filter-bar .catalog-tab.active,
html[data-theme="light"] #pageGames .mood-filter-bar #catalogTabs .catalog-tab.active,
html[data-theme="light"] #pageGames .mood-filter-bar .catalog-tab--mood-chip.active {
    color: #0f1f28 !important;
    background: linear-gradient(135deg, #44ebd5 0%, #2ec4b0 100%) !important;
    border-color: transparent !important;
    box-shadow: 0 6px 16px rgba(68, 235, 213, 0.28) !important;
}

html[data-theme="light"] body.mood-layout-v2 .mood-filter-bar .catalog-tab--mood-chip.active,
html[data-theme="light"] #pageHome .mood-filter-bar .catalog-tab--mood-chip.active,
html[data-theme="light"] #pageGames .mood-filter-bar .catalog-tab--mood-chip.active {
    background: color-mix(in srgb, #ffffff 72%, rgba(68, 235, 213, 0.38)) !important;
    border-color: rgba(68, 235, 213, 0.45) !important;
    color: #101828 !important;
    box-shadow:
        inset 0 0 0 1px rgba(68, 235, 213, 0.18),
        0 4px 12px rgba(68, 235, 213, 0.14) !important;
}

html[data-theme="light"] body.mood-layout-v2 .mood-filter-bar .catalog-tab--mood-chip.active .catalog-tab-chip-icon,
html[data-theme="light"] #pageHome .mood-filter-bar .catalog-tab--mood-chip.active .catalog-tab-chip-icon,
html[data-theme="light"] #pageGames .mood-filter-bar .catalog-tab--mood-chip.active .catalog-tab-chip-icon {
    color: #0f1f28;
    background: linear-gradient(135deg, #44ebd5 0%, #2ec4b0 100%);
    box-shadow: 0 2px 8px rgba(68, 235, 213, 0.22);
}

html[data-theme="light"] body.mood-layout-v2 .mood-filter-bar .catalog-tab.active .catalog-tab-icon,
html[data-theme="light"] #pageGames .mood-filter-bar #catalogTabs .catalog-tab.active .catalog-tab-icon {
    color: #0f1f28;
    opacity: 1;
}

html[data-theme="light"] .catalog-tab-chip-icon {
    background: rgba(68, 235, 213, 0.14);
    color: #0f766e;
}

html[data-theme="light"] .mood-filter-search-expand,
html[data-theme="light"] .mood-filter-search-drop {
    background: #ffffff;
    border-color: rgba(16, 24, 40, 0.1);
}
