/* Premium mobile header — hamburger, drawer, language isolation */
@media (max-width: 1199px) {
    .mobile-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 9998;
    }

    .top-mob-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 0 12px !important;
        min-height: 56px !important;
        position: relative;
        z-index: 10001;
    }

    .top-mob-header .toggle-btn {
        order: 1;
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        border: 0;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.06);
        cursor: pointer;
        padding: 0;
        z-index: 10002;
    }

    .top-mob-header .toggle-btn .tog-bor {
        display: block;
        width: 22px;
        height: 2px;
        border-radius: 2px;
        background: #f8fafc;
        transition: transform 0.24s ease, opacity 0.2s ease, width 0.2s ease;
    }

    .top-mob-header .toggle-btn.is-open .tog-bor:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .top-mob-header .toggle-btn.is-open .tog-bor:nth-child(2) {
        opacity: 0;
        width: 0;
    }

    .top-mob-header .toggle-btn.is-open .tog-bor:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .top-mob-header .mob-logo {
        order: 2;
        flex: 1 1 auto;
        display: flex;
        justify-content: center;
        min-width: 0;
        padding: 0 6px;
    }

    .top-mob-header .mob-logo img {
        max-height: 34px;
        width: auto;
        max-width: min(46vw, 180px);
        object-fit: contain;
    }

    .top-mob-header .sl-mob-lang-slot {
        order: 3;
        flex: 0 0 auto;
        max-width: 44vw;
    }

    .top-mob-header .sl-mob-lang-slot .sl-lang-switcher {
        margin: 0;
        z-index: 10002;
    }

    .top-mob-header .sl-mob-lang-slot .sl-lang-switcher-trigger {
        min-height: 40px;
        padding: 6px 10px;
        gap: 6px;
        border-radius: 10px;
        font-size: 12px;
    }

    .top-mob-header .sl-mob-lang-slot .sl-lang-switcher-label {
        display: none;
    }

    .top-mob-header .sl-mob-lang-slot .sl-lang-switcher-flag-current {
        width: 28px;
        height: 28px;
    }

    .toggle-mob-menu {
        position: fixed !important;
        top: 56px !important;
        left: -100% !important;
        bottom: 0 !important;
        width: min(88vw, 380px) !important;
        max-width: 380px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        z-index: 10000 !important;
        transition: left 0.28s cubic-bezier(0.22, 1, 0.36, 1) !important;
        display: block !important;
        pointer-events: auto;
        box-shadow: 16px 0 40px rgba(0, 0, 0, 0.42) !important;
        padding-bottom: calc(20px + env(safe-area-inset-bottom)) !important;
    }

    .toggle-mob-menu.slide {
        left: 0 !important;
    }

    .toggle-mob-menu .sl-lang-switcher--legacy {
        display: none !important;
    }

    .toggle-mob-menu .login-btn {
        margin: 12px 14px 8px;
    }

    .toggle-mob-menu .login-btn a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        border-radius: 12px;
        font-weight: 800;
    }

    .toggle-mob-menu .mob-menu-dest a {
        display: flex;
        align-items: center;
        min-height: 46px;
        padding: 10px 16px !important;
        font-size: 15px !important;
        border-radius: 0;
    }

    .toggle-mob-menu .sl-lang-switcher-drawer {
        padding: 8px 14px 14px;
    }

    .toggle-mob-menu .sl-lang-switcher-drawer .sl-front-drawer-title,
    .toggle-mob-menu .sl-lang-switcher-drawer .sl-front-drawer-title {
        font-size: 11px;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.45);
        margin: 8px 0 10px;
    }

    #mob-sidebar-overlay {
        backdrop-filter: blur(2px);
    }

    body.sl-mobile-menu-open {
        overflow: hidden;
    }
}

@media (max-width: 1199px) and (min-width: 1200px) {
    .top-mob-header .sl-mob-lang-slot {
        display: none;
    }
}

/* StreamLumi front shell — mobile (Stripchat-inspired) */
@media (max-width: 1120px) {
    body.sl-front-shell-active .sl-front-shell {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    body.sl-front-shell-active .sl-front-actions .sl-lang-switcher {
        display: inline-flex !important;
        flex-shrink: 0;
    }

    body.sl-front-shell-active .sl-front-actions .sl-lang-switcher--compact {
        margin: 0;
    }

    body.sl-front-shell-active .sl-front-mobile-toolbar {
        display: block;
        padding: 8px 12px 10px;
        background: linear-gradient(180deg, rgba(8, 10, 15, 0.98) 0%, rgba(8, 10, 15, 0.92) 100%);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    body.sl-front-shell-active .sl-front-mobile-search {
        display: flex !important;
        width: 100%;
        max-width: none;
        min-height: 44px;
        margin: 0;
        border-radius: 999px;
        border: 1px solid rgba(250, 204, 21, 0.35);
        background: rgba(0, 0, 0, 0.45);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    }

    body.sl-front-shell-active .sl-front-mobile-search i {
        margin-left: 14px;
        color: #fbbf24;
        flex-shrink: 0;
    }

    body.sl-front-shell-active .sl-front-mobile-search input {
        flex: 1;
        min-width: 0;
        border: 0;
        background: transparent;
        color: #fff;
        font-size: 15px;
        padding: 10px 12px;
    }

    body.sl-front-shell-active .sl-front-mobile-search button {
        flex-shrink: 0;
        border: 0;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        background: linear-gradient(135deg, #facc15, #f59e0b);
        color: #111827;
        font-weight: 800;
        font-size: 12px;
        padding: 0 16px;
        border-radius: 0 999px 999px 0;
        min-height: 44px;
    }

    body.sl-front-shell-active .sl-front-mobile-sponsored {
        display: none !important;
    }

    body.sl-front-shell-active.sl-front-has-mobile-toolbar {
        --sl-mobile-header-main: 64px;
        --sl-mobile-header-toolbar: 62px;
        --sl-mobile-header-chips: 0px;
        --sl-mobile-header-ad: 0px;
        --sl-mobile-header-stack: calc(var(--sl-mobile-header-main) + var(--sl-mobile-header-toolbar));
        padding-top: var(--sl-mobile-header-stack) !important;
    }

    body.sl-front-shell-active.sl-front-has-mobile-toolbar.sl-front-has-mobile-ad-slot:has(.sl-front-ad-carousel-lane--mobile),
    body.sl-front-shell-active.sl-front-has-mobile-toolbar.sl-front-has-mobile-ad-slot {
        --sl-mobile-header-ad: 100px;
        --sl-mobile-header-stack: calc(var(--sl-mobile-header-main) + var(--sl-mobile-header-toolbar) + var(--sl-mobile-header-ad));
        padding-top: var(--sl-mobile-header-stack) !important;
    }

    body.sl-front-shell-active.sl-front-has-mobile-toolbar.sl-front-has-mobile-rail:not(.sl-front-has-mobile-ad-slot) {
        --sl-mobile-header-stack: calc(var(--sl-mobile-header-main) + var(--sl-mobile-header-toolbar) + 42px);
        padding-top: var(--sl-mobile-header-stack) !important;
    }

    body.sl-front-shell-active.sl-front-has-mobile-toolbar.sl-streamlumi-nav-active {
        --sl-mobile-header-chips: 52px;
        --sl-mobile-header-stack: calc(var(--sl-mobile-header-main) + var(--sl-mobile-header-toolbar) + var(--sl-mobile-header-chips));
        padding-top: var(--sl-mobile-header-stack) !important;
    }

    body.sl-front-shell-active.sl-front-has-mobile-toolbar.sl-streamlumi-nav-active.sl-front-has-mobile-ad-slot:has(.sl-front-ad-carousel-lane--mobile),
    body.sl-front-shell-active.sl-front-has-mobile-toolbar.sl-streamlumi-nav-active.sl-front-has-mobile-ad-slot {
        --sl-mobile-header-ad: 100px;
        --sl-mobile-header-stack: calc(var(--sl-mobile-header-main) + var(--sl-mobile-header-toolbar) + var(--sl-mobile-header-chips) + var(--sl-mobile-header-ad));
        padding-top: var(--sl-mobile-header-stack) !important;
    }

    body.sl-front-shell-active .sl-front-ad-carousel-lane--mobile,
    body.sl-front-shell-active .sl-front-mobile-ad-slot {
        display: block;
        padding: 8px 12px 10px;
        background: #080a0f;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        overflow: visible;
    }

    body.sl-front-shell-active .sl-front-mobile-ad-slot .sl-front-ad-pair,
    body.sl-front-shell-active .sl-front-mobile-ad-slot .sl-front-ad-unit {
        width: 100%;
        min-height: 88px;
        max-height: none;
        height: auto;
        border-radius: 12px;
        overflow: visible;
        align-items: stretch;
    }

    body.sl-front-shell-active .sl-front-mobile-ad-slot .sl-front-ad-empty {
        display: none !important;
    }

    body.sl-front-shell-active .sl-front-mobile-ad-slot img,
    body.sl-front-shell-active .sl-front-mobile-ad-slot iframe,
    body.sl-front-shell-active .sl-front-mobile-ad-slot video {
        width: 100%;
        height: auto;
        min-height: 72px;
        max-height: none;
        object-fit: contain;
        border-radius: 12px;
    }

    body.sl-front-shell-active .sl-front-ad-carousel-lane--mobile .sl-demo-ad--mobile,
    body.sl-front-shell-active .sl-front-mobile-ad-slot .sl-demo-ad--mobile {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px 10px;
        min-height: 72px;
        padding: 12px 14px;
        width: 100%;
        box-sizing: border-box;
    }

    body.sl-front-shell-active .sl-front-mobile-ad-slot .sl-demo-ad--mobile strong {
        font-size: 14px;
        white-space: normal;
        line-height: 1.2;
    }

    body.sl-front-shell-active .sl-front-mobile-ad-slot .sl-demo-ad--mobile > span:not(.sl-demo-ad-badge):not(.sl-demo-ad-cta) {
        flex: 1 1 100%;
        white-space: normal;
        line-height: 1.35;
        font-size: 11px;
    }

    body.sl-front-shell-active .sl-front-mobile-ad-slot .sl-demo-ad--mobile .sl-demo-ad-cta {
        margin-left: auto;
        margin-top: 0;
        flex-shrink: 0;
    }

    /* Token promo hidden on mobile — ad slot replaces it */
    body.sl-front-shell-active .sl-discovery-token-promo {
        display: none !important;
    }

    /* Hide duplicate content ads when front shell owns the single slot */
    body.sl-front-shell-active .mobile-ad-banner,
    body.sl-front-shell-active .sl-home-mobile-inline-ad {
        display: none !important;
    }

    body.sl-front-shell-active .sl-front-tabs-ad-row {
        display: none !important;
    }

    body.sl-front-shell-active .sl-front-drawer-section--primary {
        margin-top: 4px;
    }

    body.sl-front-shell-active .sl-front-drawer-lang-foot {
        margin-top: auto;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    body.sl-front-shell-active .sl-front-drawer-lang-note {
        margin: 0;
        font-size: 12px;
        line-height: 1.45;
        color: rgba(255, 255, 255, 0.55);
    }

    body.sl-front-shell-active .sl-front-drawer-panel {
        display: flex;
        flex-direction: column;
    }

    body.sl-front-shell-active .sl-front-link--accent {
        background: linear-gradient(135deg, rgba(250, 204, 21, 0.18), rgba(245, 158, 11, 0.12)) !important;
        border-color: rgba(250, 204, 21, 0.35) !important;
    }

    body.sl-front-shell-active .sl-front-mobile-toggle {
        flex-shrink: 0;
        transition: transform 0.2s ease, background 0.2s ease;
    }

    body.sl-front-shell-active .sl-front-mobile-toggle.is-open {
        background: #111827;
        color: #facc15;
        border-color: rgba(250, 204, 21, 0.55);
    }

    body.sl-front-shell-active .sl-front-drawer {
        display: block;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.24s ease, visibility 0.24s ease;
    }

    body.sl-front-shell-active .sl-front-drawer.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    body.sl-front-shell-active .sl-front-drawer-panel {
        transform: translateX(-104%);
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        box-shadow: 18px 0 48px rgba(0, 0, 0, 0.45);
    }

    body.sl-front-shell-active .sl-front-drawer.is-open .sl-front-drawer-panel {
        transform: translateX(0);
    }

    body.sl-front-shell-active.sl-front-drawer-open {
        overflow: hidden;
    }
}

.sl-front-mobile-toolbar,
.sl-front-mobile-sponsored,
.sl-front-mobile-ad-slot {
    display: none;
}
