/* ── Slot lobby v2 (reference-style layout) ── */
.slot-lobby-v2 {
    --slot-accent: transparent;
    --slot-accent-visible: #2195f3;
    --slot-accent-soft: #e3f2fd;
    --slot-bg: #f5f7fa;
    --slot-surface: #ffffff;
    --slot-text: #1e293b;
    --slot-muted: #94a3b8;
    background: var(--slot-bg);
    min-height: calc(100vh - 112px);
}

/* Top category pills */
.slot-top-cats {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: var(--slot-surface);
    border-bottom: 1px solid #eef2f7;
}

.slot-top-cats::-webkit-scrollbar {
    display: none;
}

.slot-top-cat {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    padding: 8px 10px;
    border-radius: 12px;
    border: none;
    background: #f1f5f9;
    color: var(--slot-muted);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.slot-top-cat i {
    font-size: 18px;
    margin-bottom: 4px;
}

.slot-top-cat.active {
    background: var(--slot-accent-visible);
    color: #fff;
    box-shadow: 0 4px 12px rgba(33, 149, 243, 0.35);
}

/* Body: sidebar + main */
.slot-lobby-v2__body {
    display: flex;
    align-items: stretch;
    min-height: calc(100vh - 180px);
}

/* Provider sidebar */
.slot-sidebar {
    flex: 0 0 72px;
    width: 72px;
    background: var(--slot-surface);
    border-right: 1px solid #eef2f7;
    display: flex;
    flex-direction: column;
}

.slot-sidebar__search {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border-bottom: 1px solid #eef2f7;
    color: var(--slot-muted);
    cursor: pointer;
}

.slot-sidebar__search i {
    font-size: 16px;
}

.slot-sidebar__search-input {
    display: none;
    padding: 6px 8px;
    border-bottom: 1px solid #eef2f7;
}

.slot-sidebar__search-input.open {
    display: block;
}

.slot-sidebar__search-input input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 11px;
    outline: none;
}

.slot-sidebar__list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 0 12px;
    list-style: none;
    margin: 0;
}

.slot-sidebar__list::-webkit-scrollbar {
    width: 0;
}

.slot-provider {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 68px;
    padding: 6px 2px;
    margin: 3px 4px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

.slot-provider.active {
    background: #f1f5f900;
    color: var(--slot-text);
    box-shadow: inset 0 0 0 1px #e2e8f000;
}

.slot-provider.active::after {
    display: none;
}

.slot-provider__logo {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    object-fit: contain;
    object-position: center center;
    border-radius: 8px;
    background: #fff;
    padding: 2px;
    display: block;
}

.slot-provider__name {
    margin-top: 3px;
    width: 100%;
    min-height: 22px;
    font-size: 8px;
    font-weight: 600;
    text-align: center;
    line-height: 1.15;
    color: var(--slot-text);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    padding: 0 1px;
}

.slot-provider.active .slot-provider__logo {
    background: #fff;
}

.slot-provider.active .slot-provider__name {
    color: var(--slot-text);
    font-weight: 700;
}

.slot-provider__badge {
    position: absolute;
    top: 2px;
    right: 2px;
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 7px;
    font-weight: 700;
    color: #fff;
    background: #ef4444;
    line-height: 1.3;
}

/* Main content */
.slot-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--slot-surface);
}

.slot-main__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px 8px;
    border-bottom: 1px solid #eef2f7;
    background: var(--slot-surface);
}

.slot-tabs {
    display: flex;
    gap: 16px;
    align-items: center;
}

.slot-tab {
    position: relative;
    padding: 0;
    border: none;
    background: none;
    font-size: 13px;
    font-weight: 700;
    color: var(--slot-muted);
    cursor: pointer;
    letter-spacing: 0.3px;
}

.slot-tab.active {
    color: var(--slot-accent-visible);
}

.slot-tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    background: var(--slot-accent-visible);
    border-radius: 2px;
}

.slot-tab__dot {
    position: absolute;
    top: -2px;
    right: -8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
}

.slot-tools {
    display: flex;
    gap: 12px;
    align-items: center;
    color: var(--slot-muted);
}

.slot-tools i {
    font-size: 15px;
    cursor: pointer;
}

/* Game grid */
.slot-grid-wrap {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 6px 80px;
    box-sizing: border-box;
}

.slot-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 6px;
    width: 100%;
    box-sizing: border-box;
}

.slot-game {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.slot-game__thumb {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
    flex-shrink: 0;
}

.slot-game__thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.slot-game__name {
    flex: 1;
    min-height: 28px;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 500;
    color: var(--slot-text);
    text-align: center;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    padding: 0 1px;
}

.slot-grid-loading,
.slot-grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 16px;
    color: var(--slot-muted);
    font-size: 13px;
}

.slot-grid-loading i {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--slot-accent-visible);
}

/* Provider cards on INDEX view */
.slot-provider-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    cursor: pointer;
    text-align: center;
}

.slot-provider-card__img {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.slot-provider-card__img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain;
    object-position: center center;
    padding: 8px;
    box-sizing: border-box;
}

.slot-provider-card__label {
    min-height: 28px;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--slot-text);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    word-break: break-word;
}

/* Hide legacy slot lobby chrome when v2 active */
.slot-lobby-v2 .search[_ngcontent-serverapp-c172],
.slot-lobby-v2 .game-lobby-content.flex {
    display: none !important;
}

.slot-lobby-v2 app-game-lobby .wrapper > .list,
.slot-lobby-v2 .wrapper[_ngcontent-serverApp-c168] .swiper.list {
    display: none !important;
}

.slot-lobby-v2 .wrapper[_ngcontent-serverApp-c168] {
    padding-top: 0 !important;
}

/* Reset legacy game-item styles inside v2 grid */
.slot-lobby-v2 .section-game-content.slot-grid {
    display: grid !important;
}

.slot-lobby-v2 .section-game-content .slot-game,
.slot-lobby-v2 .section-game-content .slot-provider-card {
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    display: flex !important;
    vertical-align: unset !important;
}

.slot-lobby-v2 .section-game-content img {
    border-radius: 0;
}

.slot-lobby-v2 .slot-main__toolbar {
    padding: 8px 8px 6px;
    gap: 6px;
    flex-wrap: nowrap;
    overflow: hidden;
}

.slot-lobby-v2 .slot-tabs {
    gap: 12px;
    flex-shrink: 0;
}

.slot-lobby-v2 .slot-tools {
    gap: 8px;
    flex-shrink: 0;
}

/* Sidebar active: no blue fill (override global lobby styles) */
.slot-lobby-v2 .slot-sidebar .slot-provider.active {
    background: #f1f5f900 !important;
    color: var(--slot-text) !important;
    box-shadow: inset 0 0 0 1px #e2e8f000 !important;
    border-color: transparent !important;
}

.slot-lobby-v2 .slot-sidebar .slot-provider.active::after {
    display: none !important;
}

.slot-lobby-v2 .slot-sidebar .slot-provider.active .slot-provider__name {
    color: var(--slot-text) !important;
}
