/* Fleep UI components — Sidebar, Header, buttons, cards */

/* --- App visibility --- */
body.fleep-ui #casinoApp {
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 100vh;
    display: block !important;
    overflow: visible !important;
    height: auto !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Shell layout: see fleep-layout.css (.fleep-main-column) */

body.fleep-ui .casino-sidebar.fleep-sidebar {
    position: fixed !important;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--fleep-sidebar-w) !important;
    min-width: var(--fleep-sidebar-w) !important;
    max-width: var(--fleep-sidebar-w) !important;
    height: 100vh !important;
    padding: 12px 16px 16px !important;
    background: var(--fleep-surface) !important;
    border-right: 1px solid var(--fleep-border) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    z-index: 40;
    box-shadow: none !important;
}

body.fleep-ui.fleep-sidebar-collapsed .casino-sidebar.fleep-sidebar,
body.fleep-ui.sidebar-collapsed .casino-sidebar.fleep-sidebar,
body.fleep-ui .casino-sidebar.fleep-sidebar.collapsed {
    width: var(--fleep-sidebar-collapsed) !important;
    min-width: var(--fleep-sidebar-collapsed) !important;
    max-width: var(--fleep-sidebar-collapsed) !important;
    padding: 12px 8px !important;
}

body.fleep-ui .casino-layout {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    min-height: auto !important;
}

body.fleep-ui .casino-main {
    flex: none !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 var(--fleep-content-pad) 48px !important;
    background: var(--fleep-bg) !important;
    box-sizing: border-box;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    max-height: none !important;
    height: auto !important;
}

/* --- Sidebar top: Games/Sport + search --- */
.fleep-sidebar-top {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.fleep-sidebar-switcher {
    display: flex;
    background: var(--fleep-elevated);
    border-radius: var(--fleep-radius);
    padding: 4px;
    gap: 4px;
}

.fleep-sidebar-switcher__btn {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--fleep-text-muted);
    font-family: var(--fleep-font);
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.fleep-sidebar-switcher__btn.is-active {
    background: var(--fleep-red);
    color: #fff;
    box-shadow: var(--fleep-shadow-btn);
}

.fleep-sidebar-search {
    position: relative;
}

.fleep-sidebar-search__input {
    width: 100%;
    box-sizing: border-box;
    height: 40px;
    padding: 0 12px 0 40px;
    border: 1px solid var(--fleep-border);
    border-radius: var(--fleep-radius);
    background: var(--fleep-elevated);
    color: var(--fleep-text);
    font-family: var(--fleep-font);
    font-size: 0.875rem;
}

.fleep-sidebar-search__input::placeholder {
    color: var(--fleep-text-muted);
}

.fleep-sidebar-search__icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--fleep-text-muted);
    pointer-events: none;
}

/* --- Sidebar nav Figma style --- */
body.fleep-ui .sidebar-nav-item {
    border-radius: var(--fleep-radius) !important;
    padding: 10px 12px !important;
    color: var(--fleep-text-muted) !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    gap: 10px !important;
}

body.fleep-ui .sidebar-nav-item:hover {
    background: var(--fleep-elevated) !important;
    color: var(--fleep-text) !important;
}

body.fleep-ui .sidebar-nav-item.active {
    background: rgba(217, 16, 0, 0.12) !important;
    color: var(--fleep-red) !important;
}

body.fleep-ui .sidebar-nav-title {
    font-size: 0.6875rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    color: var(--fleep-text-dim) !important;
    padding: 8px 12px 4px !important;
}

/* Sidebar promo blocks — removed; use fleep-sidebar.css */

/* --- Header type A / B --- */
body.fleep-ui .casino-header.fleep-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: auto !important;
    min-height: var(--fleep-header-guest) !important;
    height: var(--fleep-header-guest) !important;
    padding: 12px var(--fleep-content-pad) !important;
    margin: 0 !important;
    background: var(--fleep-bg) !important;
    border-bottom: 1px solid var(--fleep-border) !important;
    box-shadow: var(--fleep-shadow-header) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    position: fixed !important;
    top: 0 !important;
    left: var(--fleep-sidebar-w) !important;
    right: 0 !important;
    z-index: 50;
    box-sizing: border-box;
}

body.fleep-ui.fleep-sidebar-collapsed .casino-header.fleep-header,
body.fleep-ui.sidebar-collapsed .casino-header.fleep-header {
    left: var(--fleep-sidebar-collapsed, 72px) !important;
}

body.fleep-ui.fleep-is-auth .casino-header.fleep-header {
    min-height: var(--fleep-header-auth) !important;
    height: var(--fleep-header-auth) !important;
}

body.fleep-ui.fleep-page-catalog .casino-header.fleep-header {
    min-height: var(--fleep-header-catalog) !important;
    height: var(--fleep-header-catalog) !important;
}

body.fleep-ui .fleep-header--type-b .header-left {
    display: flex !important;
    align-items: center;
}

body.fleep-ui .fleep-header--type-b .header-center {
    margin-left: auto !important;
}

body.fleep-ui .fleep-header--type-a .header-left,
body.fleep-ui .fleep-header--type-a .header-brand-logo {
    display: flex !important;
    align-items: center;
}

body.fleep-ui .fleep-header--type-a .header-brand-logo .logo-img {
    display: block !important;
    height: 40px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

body.fleep-ui .header-center {
    flex: 1 !important;
    max-width: none !important;
    width: auto !important;
}

body.fleep-ui .header-center-dock {
    width: 100% !important;
    justify-content: flex-end !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    gap: 12px !important;
}

body.fleep-ui .header-buttons {
    gap: 12px !important;
}

body.fleep-ui #headerGuest:not(.hidden) #btnOpenLogin {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    min-height: 40px !important;
    padding: 0 16px 0 8px !important;
    background: #262628 !important;
    border: none !important;
    border-radius: 8px !important;
    color: #D91000 !important;
    font-family: var(--fleep-font) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.15);
}

body.fleep-ui #btnOpenLogin .fleep-icon-img {
    width: 24px;
    height: 24px;
}

body.fleep-ui #btnOpenRegister,
body.fleep-ui .fleep-header-signup {
    min-height: 40px !important;
    padding: 0 16px !important;
    background: #D91000 !important;
    border: none !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.15);
}

body.fleep-ui .header-balance-trigger {
    background: var(--fleep-elevated) !important;
    border: 1px solid var(--fleep-border) !important;
    border-radius: var(--fleep-radius) !important;
    min-height: 40px !important;
    color: var(--fleep-text) !important;
}

body.fleep-ui .header-btn-deposit {
    background: var(--fleep-red) !important;
    border-radius: var(--fleep-radius) !important;
    min-height: 40px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
}

body.fleep-ui .header-right--desktop-menu {
    display: none !important;
}

/* --- Buttons global --- */
body.fleep-ui .btn-primary {
    background: var(--fleep-red) !important;
    border-color: var(--fleep-red) !important;
    border-radius: var(--fleep-radius) !important;
}

body.fleep-ui .btn-primary:hover {
    background: var(--fleep-red-light) !important;
}

body.fleep-ui .btn-outline {
    border-radius: var(--fleep-radius) !important;
    border-color: var(--fleep-border-strong) !important;
}

/* --- Game cards --- */
body.fleep-ui .game-card,
body.fleep-ui .slot-card {
    border-radius: var(--fleep-radius) !important;
    overflow: hidden;
    background: var(--fleep-surface) !important;
    border: 1px solid var(--fleep-border) !important;
}

body.fleep-ui .game-card:hover,
body.fleep-ui .slot-card:hover {
    border-color: rgba(217, 16, 0, 0.4) !important;
    box-shadow: var(--fleep-shadow-card);
}

/* --- Section titles --- */
body.fleep-ui .section-title,
body.fleep-ui .home-games-block-head .section-title {
    font-family: var(--fleep-font) !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: var(--fleep-text) !important;
}

body.fleep-ui .section-title span {
    color: inherit !important;
}

/* --- Catalog tabs --- */
body.fleep-ui .catalog-tab,
body.fleep-ui .home-catalog-tabs .catalog-tab {
    background: var(--fleep-elevated) !important;
    border: 1px solid var(--fleep-border) !important;
    color: var(--fleep-text-muted) !important;
    border-radius: var(--fleep-radius) !important;
    font-weight: 600 !important;
    font-size: 0.8125rem !important;
}

body.fleep-ui .catalog-tab:hover {
    color: var(--fleep-text) !important;
    border-color: var(--fleep-border-strong) !important;
}

body.fleep-ui .catalog-tab.active {
    background: var(--fleep-red) !important;
    border-color: var(--fleep-red) !important;
    color: #fff !important;
}

body.fleep-ui .games-search-btn,
body.fleep-ui .games-provider-btn {
    background: var(--fleep-elevated) !important;
    border: 1px solid var(--fleep-border) !important;
    border-radius: var(--fleep-radius) !important;
    color: var(--fleep-text-muted) !important;
}

/* --- Mobile home menu overlay --- */
.fleep-home-menu {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--fleep-bg);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    visibility: hidden;
}

.fleep-home-menu.is-open {
    transform: translateX(0);
    visibility: visible;
}

.fleep-home-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--fleep-border);
}

.fleep-home-menu__close {
    width: 40px;
    height: 40px;
    border: 1px solid var(--fleep-border);
    border-radius: var(--fleep-radius);
    background: var(--fleep-elevated);
    color: var(--fleep-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fleep-home-menu__body {
    padding: 16px 20px 32px;
}

.fleep-home-menu__nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fleep-home-menu__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--fleep-radius);
    color: var(--fleep-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
}

.fleep-home-menu__link:hover,
.fleep-home-menu__link.active {
    background: rgba(217, 16, 0, 0.12);
    color: var(--fleep-red);
}

/* Disable Dune polish on fleep */
body.fleep-ui.cosmic-bg-disabled .casino-header,
body.fleep-ui .casino-header {
    background: var(--fleep-bg) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.fleep-ui .site-bg-layer {
    display: none !important;
}
