/* LiveShop v2 — Phase 2 UX. Do not load on v1. */
:root {
    /* Accent = Loja button reference (#fc8eac) */
    --v2-accent: #fc8eac;
    --v2-accent-rgb: 252, 142, 172;
    --ls-accent: var(--v2-accent);
    --ls-accent-rgb: var(--v2-accent-rgb);
    --v2-ok: #3dd68c;
    --v2-warn: #f5c542;
    --v2-danger: #ff5c5c;
    --v2-dock-h: 56px;
    --ls-dock-control-height: 48px;
    --v2-vv-offset: 0px;
    --vv-height: 100dvh;
    --vv-offset-top: 0px;
}

@media (prefers-reduced-motion: reduce) {
    .app.liveshop-v2 *,
    .app.liveshop-v2 *::before,
    .app.liveshop-v2 *::after,
    #liveshopOverlayRoot *,
    #liveshopOverlayRoot *::before,
    #liveshopOverlayRoot *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.app.liveshop-v2 {
    --v2-featured-h: 0px;
    --v2-reply-h: 0px;
    --v2-pad-bottom: calc(var(--v2-dock-h) + var(--v2-reply-h) + var(--v2-featured-h) + env(safe-area-inset-bottom) + var(--v2-vv-offset));
    display: block;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
}

.app.liveshop-v2.is-replying {
    --v2-reply-h: 30px;
}

.app.liveshop-v2.has-featured-card {
    --v2-featured-h: 88px;
}

.app.liveshop-v2 .v2-stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.app.liveshop-v2 .v2-stage .video {
    position: absolute;
    inset: 0;
}

.app.liveshop-v2 .v2-stage .topbar {
    position: absolute;
    top: env(safe-area-inset-top);
    left: 0;
    right: 0;
    z-index: 12;
}

.app.liveshop-v2.is-sheet-open {
    /* body already overflow hidden; class used for chip hide / toast */
}

/* Toast/chip removed in v2 corrections — keep selectors inert if legacy nodes appear */
.app.liveshop-v2 .featuredToast,
.app.liveshop-v2 .featuredChip {
    display: none !important;
}

.app.liveshop-v2 .topbar {
    z-index: 12;
    padding: 12px 12px 8px;
    pointer-events: none;
    align-items: center;
}

.app.liveshop-v2 .topbar > * {
    pointer-events: auto;
}

.app.liveshop-v2 .topbarLeft {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.app.liveshop-v2 .topbarRight {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Shared topbar chip height: LIVE, identidade, carrinho, mais */
.app.liveshop-v2 .badge,
.app.liveshop-v2 .identityBtn {
    box-sizing: border-box;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
}

.app.liveshop-v2 .topbarLeft {
    flex: 1 1 auto;
    min-width: 0;
}

.app.liveshop-v2 .identityBtn {
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(42vw, 160px);
}

.app.liveshop-v2 .identityMenu {
    position: absolute;
    top: calc(52px + env(safe-area-inset-top));
    left: 12px;
    right: auto;
    z-index: 40;
    width: min(220px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    background: #16161c;
    border: 1px solid #333;
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 12px 40px rgba(0,0,0,.45);
    box-sizing: border-box;
}

.app.liveshop-v2 .identityMenu[hidden] {
    display: none !important;
}

.app.liveshop-v2 .identityMenu__meta {
    padding: 10px 12px 8px;
    color: #bbb;
    font-size: 12px;
    line-height: 1.35;
    border-bottom: 1px solid rgba(255,255,255,.08);
    margin-bottom: 4px;
    word-break: break-word;
}

.app.liveshop-v2 .identityMenu__meta strong {
    display: block;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 2px;
}

.app.liveshop-v2 .identityMenu button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: #eee;
    font-size: 13px;
    font-weight: 700;
    padding: 11px 12px;
    min-height: 44px;
    border-radius: 10px;
    cursor: pointer;
}

.app.liveshop-v2 .identityMenu button[hidden] {
    display: none !important;
}

.app.liveshop-v2 .identityMenu button:hover,
.app.liveshop-v2 .identityMenu button:focus-visible {
    background: #222;
    outline: 2px solid var(--v2-accent);
    outline-offset: 1px;
}

.app.liveshop-v2 .identityMenu button[data-identity-action="logout"] {
    color: #ffb4b4;
}

.app.liveshop-v2 .cartBtn {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    width: auto;
    min-width: 46px;
    height: auto;
    min-height: 34px;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    color: inherit;
    box-sizing: border-box;
    overflow: visible;
}

.app.liveshop-v2 .cartBtn .productsBtn {
    justify-content: center;
    align-items: center;
    height: 34px;
    min-height: 34px;
    min-width: 44px;
    padding: 0 12px;
    box-sizing: border-box;
}

.app.liveshop-v2 .cartBtn.is-bounce .productsBtn {
    animation: v2CartBounce .38s ease;
}

@keyframes v2CartBounce {
    0% { transform: scale(1); }
    40% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

/* In-flow under the cart pill (absolute+fixed 34px height hid the TTL bar). */
.app.liveshop-v2 .cartUrgency {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: auto;
    margin: 3px 4px 0;
    height: 5px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.22);
    display: none;
    pointer-events: none;
    z-index: 2;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.app.liveshop-v2 .cartUrgency.is-on {
    display: block !important;
}

.app.liveshop-v2 .cartUrgency > i,
.app.liveshop-v2 .cartUrgency > span,
.app.liveshop-v2 .cartUrgency > .cartUrgencyFill {
    display: block;
    height: 100%;
    width: 0%;
    max-width: 100%;
    border-radius: inherit;
    background: var(--v2-ok, #4ade80);
    transform-origin: left center;
    transition: width .35s linear, background-color .3s ease;
}

.app.liveshop-v2 .cartUrgency.is-on > i,
.app.liveshop-v2 .cartUrgency.is-on > span,
.app.liveshop-v2 .cartUrgency.is-on > .cartUrgencyFill {
    animation: v2UrgencyIdle 2.4s ease-in-out infinite;
}

.app.liveshop-v2 .cartUrgency.is-warn > i,
.app.liveshop-v2 .cartUrgency.is-warn > span,
.app.liveshop-v2 .cartUrgency.is-warn > .cartUrgencyFill { background: var(--v2-warn, #fbbf24); }
.app.liveshop-v2 .cartUrgency.is-danger > i,
.app.liveshop-v2 .cartUrgency.is-danger > span,
.app.liveshop-v2 .cartUrgency.is-danger > .cartUrgencyFill {
    background: var(--v2-danger, #f87171);
    animation: v2UrgencyPulse .9s ease-in-out infinite;
}

@keyframes v2UrgencyIdle {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.25); }
}

@keyframes v2UrgencyPulse {
    50% { opacity: .55; }
}

.app.liveshop-v2 .moreBtn {
    box-sizing: border-box;
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    justify-content: center;
    align-items: center;
    padding: 0;
    font-size: 16px;
    line-height: 1;
}

.app.liveshop-v2 .moreMenu {
    position: absolute;
    top: calc(52px + env(safe-area-inset-top));
    right: 12px;
    z-index: 40;
    width: 188px;
    background: #16161c;
    border: 1px solid #333;
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 12px 40px rgba(0,0,0,.45);
}

.app.liveshop-v2 .moreMenu[hidden] {
    display: none !important;
}

.app.liveshop-v2 .moreMenu button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: #eee;
    font-size: 13px;
    font-weight: 700;
    padding: 11px 12px;
    min-height: 44px;
    border-radius: 10px;
    cursor: pointer;
}

.app.liveshop-v2 .moreMenu button:hover,
.app.liveshop-v2 .moreMenu button:focus-visible {
    background: #222;
    outline: 2px solid var(--v2-accent);
    outline-offset: 1px;
}

.app.liveshop-v2 #featured {
    display: none !important;
}

/* ——— Featured toast / chip REMOVED — product lives in chat only ——— */

/* ——— Bottom fade (video stays visible; no solid dock bar) ——— */
.app.liveshop-v2 .v2-bottom-fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6;
    height: calc(var(--v2-dock-h) + var(--v2-reply-h) + var(--v2-featured-h) + env(safe-area-inset-bottom) + 140px + var(--v2-vv-offset));
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.12) 42%,
        rgba(0, 0, 0, 0.38) 78%,
        rgba(0, 0, 0, 0.52) 100%
    );
    transition: opacity .22s ease, height .22s ease;
}

.app.liveshop-v2.is-chat-collapsed .v2-bottom-fade {
    opacity: 0;
    height: 0;
}

/* ——— Featured product card (between chat feed and dock; not in feed) ——— */
.app.liveshop-v2 .v2-featured-card {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: calc(var(--v2-dock-h) + var(--v2-reply-h) + env(safe-area-inset-bottom) + var(--v2-vv-offset));
    z-index: 13;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 64px;
    padding: 8px 40px 8px 8px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
    pointer-events: auto;
}

.app.liveshop-v2 .v2-featured-card[hidden] {
    display: none !important;
}

.app.liveshop-v2 .v2-featured-card__close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.app.liveshop-v2 .v2-featured-card__close:focus-visible {
    outline: 2px solid var(--v2-accent);
    outline-offset: 1px;
}

.app.liveshop-v2 .v2-featured-card__close svg {
    width: 18px;
    height: 18px;
}

.app.liveshop-v2 .v2-featured-card__thumb {
    width: 48px;
    height: 56px;
    border-radius: 10px;
    background: #2a2a30;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    color: #888;
}

.app.liveshop-v2 .v2-featured-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.app.liveshop-v2 .v2-featured-card__body {
    min-width: 0;
}

.app.liveshop-v2 .v2-featured-card__eyebrow {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--v2-accent);
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.app.liveshop-v2 .v2-featured-card__name {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.app.liveshop-v2 .v2-featured-card__price {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 2px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.app.liveshop-v2 .v2-featured-card__stock {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.72);
    margin-top: 1px;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.app.liveshop-v2 .v2-featured-card__buy {
    border: 0;
    border-radius: 999px;
    background: var(--v2-accent);
    color: #111;
    font-size: 12px;
    font-weight: 800;
    padding: 10px 14px;
    min-height: 44px;
    min-width: 44px;
    cursor: pointer;
    white-space: nowrap;
}

.app.liveshop-v2 .v2-featured-card__buy:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ——— Fixed bottom dock (YouTube-like, no opaque full-width bar) ——— */
.app.liveshop-v2 .v2-dock {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom) + var(--v2-vv-offset));
    z-index: 14;
    min-height: var(--v2-dock-h);
    height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    /* end: composer/chat/loja share the same baseline (reply bar sits above composer) */
    align-items: end;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-sizing: border-box;
    transition: grid-template-columns .2s ease, opacity .22s ease, transform .22s ease;
}

.app.liveshop-v2 .v2-dock.is-focused {
    grid-template-columns: minmax(0, 1fr);
}

.app.liveshop-v2 .v2-dock__primary {
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-self: end;
    gap: 4px;
}

.app.liveshop-v2 .v2-dock__reply {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    min-height: 26px;
    padding: 3px 4px 3px 10px;
    border-radius: 999px;
    background: rgba(var(--v2-accent-rgb), .20);
    border: 1px solid rgba(var(--v2-accent-rgb), .38);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.app.liveshop-v2 .v2-dock__reply[hidden] {
    display: none !important;
}

.app.liveshop-v2 .v2-dock__reply-main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
}

.app.liveshop-v2 .v2-dock__reply-label {
    min-width: 0;
    flex: 1 1 auto;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    color: rgba(255,255,255,.92);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app.liveshop-v2 .v2-dock__reply-label strong {
    font-weight: 800;
    color: #fff;
}

.app.liveshop-v2 .v2-dock__reply-excerpt {
    display: none;
    min-width: 0;
    flex: 0 1 42%;
    font-size: 10px;
    font-weight: 550;
    color: rgba(255,255,255,.68);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 900px) {
    .app.liveshop-v2 .v2-dock__reply-excerpt:not([hidden]) {
        display: inline;
    }
}

.app.liveshop-v2 .v2-dock__reply-cancel {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    background: rgba(0,0,0,.22);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.app.liveshop-v2 .v2-dock__reply-cancel svg {
    width: 14px;
    height: 14px;
}

.app.liveshop-v2 .v2-dock__reply-cancel:focus-visible {
    outline: 2px solid var(--v2-accent);
    outline-offset: 2px;
}

.app.liveshop-v2 .v2-dock__composer {
    display: flex;
    align-items: center;
    align-self: stretch;
    gap: 6px;
    min-width: 0;
    width: 100%;
    height: var(--ls-dock-control-height);
    min-height: var(--ls-dock-control-height);
    max-height: var(--ls-dock-control-height);
    box-sizing: border-box;
    margin: 0;
    padding: 4px 6px 4px 12px;
    border-radius: 999px;
    background: rgba(12,12,16,.42);
    border: 1px solid rgba(255,255,255,.16);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 4px 18px rgba(0,0,0,.22);
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.app.liveshop-v2 .v2-dock__composer:focus-within {
    background: rgba(12,12,16,.58);
    border-color: rgba(255,255,255,.28);
    box-shadow: 0 6px 22px rgba(0,0,0,.28);
}

.app.liveshop-v2 .v2-dock__avatar {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(var(--v2-accent-rgb), .85);
    color: #1a1a1a;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.app.liveshop-v2 .v2-dock__avatar[hidden] {
    display: none !important;
}

.app.liveshop-v2 .v2-dock__icon {
    display: none;
}

.app.liveshop-v2 .v2-dock #lsChatInput {
    flex: 1;
    min-width: 0;
    height: 40px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
    padding: 0;
}

.app.liveshop-v2 .v2-dock #lsChatInput:focus,
.app.liveshop-v2 .v2-dock #lsChatInput:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border: 0 !important;
}

.app.liveshop-v2 .v2-dock #lsChatInput::placeholder {
    color: rgba(255,255,255,.5);
    font-weight: 600;
}

.app.liveshop-v2 .v2-dock__emoji {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.app.liveshop-v2 .v2-dock__emoji:focus-visible {
    outline: 2px solid rgba(255,255,255,.35);
    outline-offset: 1px;
}

.app.liveshop-v2 .v2-dock #lsChatSend {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border: 0;
    border-radius: 999px;
    padding: 0;
    background: var(--v2-accent);
    color: #1a1a1a;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.app.liveshop-v2 .v2-dock #lsChatSend svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.app.liveshop-v2 .v2-dock #lsChatSend[hidden],
.app.liveshop-v2 .v2-dock #lsChatSend:disabled {
    opacity: .4;
}

.app.liveshop-v2 .v2-dock #lsChatSend[hidden] {
    display: none !important;
}

.app.liveshop-v2 .v2-dock__emoji svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
}

.app.liveshop-v2 .v2-dock__shop {
    height: var(--ls-dock-control-height);
    min-height: var(--ls-dock-control-height);
    max-height: var(--ls-dock-control-height);
    min-width: 88px;
    align-self: end;
    box-sizing: border-box;
    margin: 0;
    border-radius: 999px;
    padding: 0 14px;
    background: rgba(var(--v2-accent-rgb), .88);
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 18px rgba(0,0,0,.22);
    transition: opacity .18s ease, transform .18s ease;
}

.app.liveshop-v2 .v2-dock__shop svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.app.liveshop-v2 .v2-dock.is-focused .v2-dock__shop,
.app.liveshop-v2 .v2-dock.is-focused .v2-dock__chat,
.app.liveshop-v2 .v2-dock__shop[hidden],
.app.liveshop-v2 .v2-dock__chat[hidden] {
    display: none !important;
}

.app.liveshop-v2 .v2-dock__shop:focus-visible,
.app.liveshop-v2 .v2-dock #lsChatSend:focus-visible,
.app.liveshop-v2 .v2-dock__chat:focus-visible {
    outline: 2px solid rgba(255,255,255,.4);
    outline-offset: 2px;
}

.app.liveshop-v2 .v2-dock__chat {
    position: relative;
    width: var(--ls-dock-control-height);
    min-width: var(--ls-dock-control-height);
    height: var(--ls-dock-control-height);
    min-height: var(--ls-dock-control-height);
    max-height: var(--ls-dock-control-height);
    align-self: end;
    margin: 0;
    padding: 0;
    border-radius: 999px;
    background: rgba(12,12,16,.42);
    border: 1px solid rgba(255,255,255,.16);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    box-shadow: 0 4px 18px rgba(0,0,0,.22);
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.app.liveshop-v2 .v2-dock__chat:hover,
.app.liveshop-v2 .v2-dock__chat:focus-visible {
    background: rgba(12,12,16,.58);
    border-color: rgba(255,255,255,.28);
    box-shadow: 0 6px 22px rgba(0,0,0,.28);
}

.app.liveshop-v2 .v2-dock__chat svg,
.app.liveshop-v2 .v2-chat-expand-float svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.app.liveshop-v2 .v2-dock__chat-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--v2-accent);
    color: #1a1a1a;
    font-size: 10px;
    font-weight: 900;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.35);
}

.app.liveshop-v2 .v2-dock__chat-badge[hidden] {
    display: none !important;
}

.app.liveshop-v2 .v2-dock__chat--header {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    box-shadow: none;
}

.app.liveshop-v2 .v2-chat-expand-float {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 15;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(16,16,20,.42);
    border: 1px solid rgba(255,255,255,.16);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0,0,0,.3);
}

.app.liveshop-v2 .v2-chat-expand-float[hidden] {
    display: none !important;
}

.app.liveshop-v2 .ls-chat__head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.app.liveshop-v2 .ls-chat__pin-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.app.liveshop-v2 .ls-chat__pin-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.app.liveshop-v2 .ls-chat__new {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.app.liveshop-v2 .ls-chat__new svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

#buyConfirmBtn.waitlist,
#liveshopOverlayRoot #buyConfirmBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#buyConfirmBtn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.app.liveshop-v2.is-chat-collapsing #lsChatPanel {
    animation: v2ChatSlideDown 200ms ease forwards;
    pointer-events: none;
}

.app.liveshop-v2.is-chat-expanding #lsChatPanel {
    animation: v2ChatSlideUp 200ms ease;
}

.app.liveshop-v2.is-chat-collapsed #lsChatPanel,
.app.liveshop-v2.is-chat-collapsed #lsChatPanel.ls-chat {
    display: none !important;
}

@keyframes v2ChatSlideDown {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(12px); }
}

@keyframes v2ChatSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ——— Chat feed (YouTube-like) ——— */
.app.liveshop-v2 #lsChatToggle {
    display: none !important;
}

.app.liveshop-v2 #lsChatPanel.ls-chat {
    position: absolute;
    left: 0;
    right: 0;
    bottom: var(--v2-pad-bottom);
    top: auto;
    width: 100%;
    max-height: min(42vh, 360px);
    z-index: 7;
    display: flex !important;
    flex-direction: column;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    pointer-events: none;
    overflow: hidden;
    padding-bottom: 4px;
    transition: opacity .22s ease, transform .22s ease;
}

.app.liveshop-v2 #lsChatPanel[hidden] {
    display: flex !important;
}

.app.liveshop-v2 .ls-chat__head {
    display: none;
}

.app.liveshop-v2 .ls-chat__pin {
    margin: 0 12px 6px;
    pointer-events: auto;
}

.app.liveshop-v2 .ls-chat__messages {
    pointer-events: auto;
    min-height: 0;
    mask-image: linear-gradient(180deg, transparent 0%, #000 18%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%);
}

.app.liveshop-v2 .ls-chat__msg {
    text-shadow: 0 1px 3px rgba(0,0,0,.85);
    max-width: 92%;
    position: relative;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.app.liveshop-v2 .ls-chat__msg--can-reply {
    cursor: pointer;
}

.app.liveshop-v2 .ls-chat__msg--reply-to-me,
.app.liveshop-v2 .ls-chat-message--reply-to-me {
    padding: 7px 10px 7px 10px;
    margin-left: 0;
    border-radius: 12px;
    border-left: 3px solid rgba(var(--v2-accent-rgb), 1);
    /* Fade accent → transparent (rgba fallback: Safari iPhone-safe, same token as Loja) */
    background: linear-gradient(
        to right,
        rgba(var(--v2-accent-rgb), .24) 0%,
        rgba(var(--v2-accent-rgb), .10) 55%,
        rgba(var(--v2-accent-rgb), 0) 100%
    );
}

.app.liveshop-v2 .ls-chat__reply-to-me-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .02em;
    color: #ffe0ea;
    margin: 0 0 4px;
    text-shadow: 0 1px 2px rgba(0,0,0,.55);
}

.app.liveshop-v2 .ls-chat__reply-to-me-label svg {
    width: 11px;
    height: 11px;
    flex: 0 0 auto;
}

.app.liveshop-v2 .ls-chat-mention {
    display: inline;
    color: rgba(255, 208, 222, .98);
    font-weight: 800;
    background: none;
    border-radius: 0;
    padding: 0;
}

.app.liveshop-v2 .ls-chat__body img.emoji,
.app.liveshop-v2 .ls-chat__body img.ls-chat-emoji {
    width: 1.1em;
    height: 1.1em;
    margin: 0 0.05em;
    padding: 0;
    border: 0;
    vertical-align: -0.15em;
    display: inline-block;
    object-fit: contain;
}

.app.liveshop-v2 .ls-chat__msg--reply-pulse {
    animation: v2ReplyPulse 1.1s ease;
}

@keyframes v2ReplyPulse {
    0% { box-shadow: 0 0 0 0 rgba(var(--v2-accent-rgb), .45); }
    40% { box-shadow: 0 0 0 6px rgba(var(--v2-accent-rgb), .12); }
    100% { box-shadow: 0 0 0 0 rgba(var(--v2-accent-rgb), 0); }
}

.app.liveshop-v2 .v2-dock__chat.has-reply-unread .v2-dock__chat-badge,
.app.liveshop-v2 .v2-chat-expand-float.has-reply-unread .v2-dock__chat-badge {
    background: var(--v2-accent);
    color: #1a1a1a;
    box-shadow: 0 0 0 2px rgba(var(--v2-accent-rgb), .35);
}

.app.liveshop-v2 .ls-chat__reply-quote {
    display: flex !important;
    align-items: flex-start;
    gap: 6px;
    max-width: min(100%, 300px);
    width: max-content;
    margin: 3px 0 6px;
    padding: 6px 9px 6px 8px;
    border: 0;
    border-radius: 9px;
    border-left: 3px solid rgba(var(--v2-accent-rgb), .95);
    background: rgba(0, 0, 0, .48);
    color: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.10),
        0 2px 8px rgba(0,0,0,.25);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.app.liveshop-v2 .ls-chat__msg--reply .ls-chat__reply-quote {
    /* Always visible for every viewer, not only reply-to-me */
    display: flex !important;
}

.app.liveshop-v2 .ls-chat__reply-quote-icon {
    flex: 0 0 auto;
    display: inline-flex;
    margin-top: 1px;
    color: rgba(var(--v2-accent-rgb), 1);
}

.app.liveshop-v2 .ls-chat__reply-quote-icon svg {
    width: 13px;
    height: 13px;
}

.app.liveshop-v2 .ls-chat__reply-quote-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.app.liveshop-v2 .ls-chat__reply-quote-name {
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app.liveshop-v2 .ls-chat__reply-quote-preview {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    color: rgba(255,255,255,.78);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    word-break: break-word;
}

/* legacy class kept harmless if any old nodes linger */
.app.liveshop-v2 .ls-chat__reply-ref {
    display: none;
}

.app.liveshop-v2 .ls-chat__msg-actions {
    display: none;
    margin-top: 2px;
    line-height: 1;
}

.app.liveshop-v2 .ls-chat__msg.is-actions-open .ls-chat__msg-actions {
    display: inline-flex;
}

@media (hover: hover) and (pointer: fine) {
    .app.liveshop-v2 .ls-chat__msg--can-reply:hover .ls-chat__msg-actions {
        display: inline-flex;
    }
}

.app.liveshop-v2 .ls-chat__reply-action {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,.58);
    font: inherit;
    font-size: 10px;
    font-weight: 650;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.app.liveshop-v2 .ls-chat__reply-action svg {
    width: 11px;
    height: 11px;
}

.app.liveshop-v2 .ls-chat__reply-action:hover,
.app.liveshop-v2 .ls-chat__reply-action:focus-visible {
    color: rgba(255,255,255,.92);
}

.app.liveshop-v2 .ls-chat__product-action {
    margin-top: 4px;
}

.app.liveshop-v2 .ls-chat__buy-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 0;
    background: transparent;
    padding: 2px 0;
    margin: 0;
    color: rgba(var(--v2-accent-rgb), 0.95);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.app.liveshop-v2 .ls-chat__buy-action:hover,
.app.liveshop-v2 .ls-chat__buy-action:focus-visible {
    color: #fff;
    outline: none;
}

.app.liveshop-v2 .ls-chat__buy-action:focus-visible {
    box-shadow: 0 0 0 2px rgba(var(--v2-accent-rgb), 0.55);
    border-radius: 4px;
}

.app.liveshop-v2 .ls-chat__msg--jump-target {
    border-radius: 10px;
    background: rgba(var(--v2-accent-rgb), .22);
    box-shadow: inset 0 0 0 1px rgba(var(--v2-accent-rgb), .45);
    transition: background .35s ease, box-shadow .35s ease;
}

.app.liveshop-v2 .ls-chat__msg-meta {
    gap: 6px;
    min-width: 0;
}

.app.liveshop-v2 .ls-chat__avatar {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(80,80,90,.85);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    text-shadow: none;
    overflow: hidden;
}

.app.liveshop-v2 .ls-chat__avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.app.liveshop-v2 .ls-chat__avatar--photo {
    background: rgba(80,80,90,.35);
    padding: 0;
}

.app.liveshop-v2 .ls-chat__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app.liveshop-v2 .ls-chat__time {
    margin-left: 0;
    flex: 0 0 auto;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.app.liveshop-v2 .ls-chat__msg--product,
.app.liveshop-v2 .ls-chat__msg--commercial {
    background: rgba(0,0,0,.28);
    border-radius: 10px;
    padding: 6px 8px;
}

/* Auto stock/reservas: soft L→R wash, no card edge / shadow */
.app.liveshop-v2 .ls-chat__msg--stock,
.app.liveshop-v2 .ls-chat__msg--reservas {
    border: 0 !important;
    border-left: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    filter: none !important;
    -webkit-box-shadow: none !important;
    text-shadow: none;
    border-radius: 10px;
    padding: 6px 8px;
    background-color: transparent !important;
}

.app.liveshop-v2 .ls-chat__msg--stock {
    background-image: linear-gradient(
        to right,
        rgba(255, 87, 34, 0.22) 0%,
        rgba(255, 87, 34, 0.12) 40%,
        rgba(255, 87, 34, 0.05) 68%,
        rgba(255, 87, 34, 0) 100%
    ) !important;
    background-color: transparent !important;
}

.app.liveshop-v2 .ls-chat__msg--reservas {
    background-image: linear-gradient(
        to right,
        rgba(0, 200, 83, 0.22) 0%,
        rgba(0, 200, 83, 0.12) 40%,
        rgba(0, 200, 83, 0.05) 68%,
        rgba(0, 200, 83, 0) 100%
    ) !important;
    background-color: transparent !important;
}

.app.liveshop-v2 .ls-chat__msg--question-answered {
    border-left: 3px solid rgba(124, 252, 144, 0.55);
    background: rgba(124, 252, 144, 0.08);
    border-radius: 8px;
    padding-left: 8px;
}

.app.liveshop-v2 .ls-chat__new {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    z-index: 2;
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    min-height: 36px;
    background: rgba(var(--v2-accent-rgb), .92);
    color: #111;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 4px 16px rgba(0,0,0,.35);
}

.app.liveshop-v2 .ls-chat__new[hidden] {
    display: none !important;
}

.app.liveshop-v2 .ls-chat__composer,
.app.liveshop-v2 .ls-chat__question,
.app.liveshop-v2 .ls-chat__shop {
    display: none !important;
}

/* ——— Overlay portal (body-level; Safari VisualViewport) ——— */
html.ls-body-locked,
body.ls-body-locked {
    overflow: hidden !important;
    overscroll-behavior: none;
    touch-action: none;
}

.liveshop-overlay-root {
    position: fixed;
    top: var(--vv-offset-top, 0px);
    left: 0;
    right: 0;
    width: 100%;
    height: var(--vv-height, 100dvh);
    z-index: 400;
    pointer-events: none;
    overflow: hidden;
}

.liveshop-overlay-root.is-open {
    pointer-events: auto;
}

.liveshop-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
    pointer-events: auto;
}

.liveshop-overlay-backdrop[hidden] {
    display: none !important;
}

/* ——— Sheets (inside overlay root only) ——— */
#liveshopOverlayRoot .sheetHandle {
    width: 42px;
    height: 4px;
    border-radius: 999px;
    background: #444;
    margin: 4px auto 10px;
    flex: 0 0 auto;
}

#liveshopOverlayRoot .shopSpotlight {
    display: none;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px;
    border-radius: 14px;
    background: #1c1c22;
    margin-bottom: 12px;
    box-sizing: border-box;
}

#liveshopOverlayRoot .shopSpotlight.is-on {
    display: grid;
}

/* Override global .thumb (74×94) so it cannot spill into the text column */
#liveshopOverlayRoot .shopSpotlight .shopSpotlight__thumb,
#liveshopOverlayRoot .shopSpotlight .thumb {
    position: static;
    width: 56px;
    height: 70px;
    max-width: 56px;
    flex: 0 0 56px;
    border-radius: 12px;
    overflow: hidden;
    box-sizing: border-box;
}

#liveshopOverlayRoot .shopSpotlight .shopSpotlight__thumb img,
#liveshopOverlayRoot .shopSpotlight .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#liveshopOverlayRoot .shopSpotlight__body {
    position: static;
    min-width: 0;
}

#liveshopOverlayRoot .shopSpotlight__eyebrow {
    font-size: 11px;
    font-weight: 800;
    color: var(--v2-accent);
}

#liveshopOverlayRoot .shopSpotlight__name {
    font-weight: 800;
    font-size: 14px;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    word-break: break-word;
}

#liveshopOverlayRoot .shopSpotlight__meta {
    font-size: 12px;
    color: #bbb;
    margin-top: 2px;
}

#liveshopOverlayRoot .shopSpotlight .buy {
    position: static;
    margin-top: 8px;
    min-height: 44px;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
}

#liveshopOverlayRoot #sheet .sheetTitle::before {
    content: none;
}

#liveshopOverlayRoot .bagCountdownLabel {
    font-size: 12px;
    font-weight: 800;
    color: var(--v2-warn);
    text-align: center;
    margin-bottom: 10px;
}

#liveshopOverlayRoot .bagQtySummary {
    font-size: 12px;
    font-weight: 700;
    color: #bbb;
    text-align: center;
    margin-bottom: 6px;
}

#liveshopOverlayRoot .bagActions {
    display: grid;
    gap: 8px;
    margin-top: 4px;
}

#liveshopOverlayRoot .bagActions .buySecondary {
    width: 100%;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 16px;
    padding: 14px 12px;
    font-size: 15px;
    font-weight: 800;
    background: transparent;
    color: #fff;
    cursor: pointer;
    min-height: 48px;
}

#liveshopOverlayRoot .sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: calc(var(--vv-height, 100dvh) - 12px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 2;
    pointer-events: auto;
    transform: none;
    /* No backdrop-filter: avoids containing-block / compositing bugs with fixed portal */
    background: rgba(12, 12, 12, 0.96);
    border-radius: 24px 24px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 -18px 55px rgba(0, 0, 0, 0.55);
    padding: 14px 12px 0;
}

#liveshopOverlayRoot .sheet[hidden] {
    display: none !important;
}

#liveshopOverlayRoot .sheet:not(.open) {
    visibility: hidden;
    pointer-events: none;
}

#liveshopOverlayRoot .sheet.open {
    visibility: visible;
    pointer-events: auto;
}

#liveshopOverlayRoot #buySheet.sheet--buy.open {
    z-index: 3;
}

#liveshopOverlayRoot .sheet__header {
    flex: 0 0 auto;
}

#liveshopOverlayRoot .sheet__body {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

#liveshopOverlayRoot .sheet__footer {
    flex: 0 0 auto;
    padding-top: 8px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
}

/* Loja has no footer — safe-area once on the scroll body */
#liveshopOverlayRoot #sheet .sheet__body {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    min-width: 0;
    max-width: 100%;
}

#liveshopOverlayRoot #buySheet .buySheetFooter .buy,
#liveshopOverlayRoot .sheet__footer .buy {
    margin-top: 0;
}

#liveshopOverlayRoot #sheet .productList,
#liveshopOverlayRoot #bagSheet .productList {
    min-height: 0;
    min-width: 0;
    max-width: 100%;
}

/* Long product titles (search hits) must not expand cards past the sheet width. */
#liveshopOverlayRoot #sheet .productList > .card {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

#liveshopOverlayRoot #sheet .productList .cardInfo {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
}

#liveshopOverlayRoot #sheet .productList .cardName,
#liveshopOverlayRoot #sheet .productList .cardMeta {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#liveshopOverlayRoot #sheet .productList .cardBtn {
    flex: 0 0 auto;
}

.app.liveshop-v2 #toast {
    z-index: 25;
}

.app.liveshop-v2.is-sheet-open #toast {
    z-index: 15;
}

/* Legacy in-player overlay unused; portal backdrop replaces it */
.app.liveshop-v2 .videoOverlay {
    display: none !important;
}

@media (min-width: 900px) {
    .app.liveshop-v2 {
        display: grid;
        grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
        grid-template-rows: 1fr auto auto;
        --v2-pad-bottom: 12px;
        --v2-featured-h: 0px;
        transition: grid-template-columns .22s ease;
    }

    .app.liveshop-v2.has-featured-card {
        --v2-featured-h: 0px;
    }

    .app.liveshop-v2.is-chat-collapsed {
        /* Keep sidebar so featured card + composer stay visible when feed is hidden */
        grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
    }

    .app.liveshop-v2 .v2-bottom-fade {
        display: none;
    }

    .app.liveshop-v2 .v2-stage {
        position: relative;
        grid-column: 1;
        grid-row: 1 / -1;
        inset: auto;
        width: 100%;
        height: 100%;
        min-height: 0;
    }

    .app.liveshop-v2.is-chat-collapsed .v2-stage {
        grid-column: 1;
        grid-row: 1 / -1;
    }

    .app.liveshop-v2 .v2-stage .video {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }

    .app.liveshop-v2 .v2-stage .topbar {
        position: absolute;
        top: env(safe-area-inset-top);
        left: 0;
        right: 0;
    }

    .app.liveshop-v2 .moreMenu {
        position: absolute;
        top: calc(52px + env(safe-area-inset-top));
        right: 12px;
        margin: 0;
    }

    .app.liveshop-v2 .identityMenu {
        position: absolute;
        top: calc(52px + env(safe-area-inset-top));
        left: 12px;
        margin: 0;
    }

    .app.liveshop-v2 #lsChatPanel.ls-chat {
        position: relative;
        grid-column: 2;
        grid-row: 1;
        left: auto;
        right: auto;
        bottom: auto;
        width: 100%;
        height: 100%;
        max-height: none;
        background: #0e0e12;
        border-left: 1px solid rgba(255,255,255,.08);
        pointer-events: auto;
        padding-bottom: 0;
    }

    .app.liveshop-v2 .ls-chat__head {
        display: flex;
    }

    .app.liveshop-v2 .v2-dock__chat:not(.v2-dock__chat--header) {
        display: none !important;
    }

    /* When feed is collapsed, desktop header toggle is gone — use dock Chat button */
    .app.liveshop-v2.is-chat-collapsed .v2-dock__chat:not(.v2-dock__chat--header) {
        display: inline-flex !important;
    }

    .app.liveshop-v2.is-chat-collapsed .v2-dock.is-focused .v2-dock__chat:not(.v2-dock__chat--header),
    .app.liveshop-v2.is-chat-collapsed .v2-dock__chat:not(.v2-dock__chat--header)[hidden] {
        display: none !important;
    }

    .app.liveshop-v2.is-chat-collapsed .v2-dock {
        grid-template-columns: minmax(0, 1fr) auto auto;
    }

    .app.liveshop-v2.is-chat-collapsed .v2-dock.is-focused {
        grid-template-columns: minmax(0, 1fr);
    }

    .app.liveshop-v2 .ls-chat__messages {
        mask-image: none;
        -webkit-mask-image: none;
        flex: 1;
    }

    .app.liveshop-v2 .v2-featured-card {
        position: relative;
        grid-column: 2;
        grid-row: 2;
        left: auto;
        right: auto;
        bottom: auto;
        margin: 0 12px 8px;
        width: auto;
        z-index: 8;
    }

    .app.liveshop-v2 .v2-dock {
        position: relative;
        grid-column: 2;
        grid-row: 3;
        align-self: stretch;
        left: auto;
        right: auto;
        bottom: auto;
        margin: 0 12px 12px;
        width: auto;
        z-index: 8;
        grid-template-columns: 1fr auto;
    }

    /* Collapse hides only the message feed — card + composer stay */
    .app.liveshop-v2.is-chat-collapsed #lsChatPanel {
        display: none !important;
    }

    .app.liveshop-v2.is-chat-collapsed .v2-chat-expand-float {
        display: none !important;
    }

    #liveshopOverlayRoot .sheet {
        left: auto;
        right: 16px;
        bottom: 16px;
        width: min(420px, calc(100% - 32px));
        max-height: min(calc(var(--vv-height, 100dvh) - 32px), 720px);
        border-radius: 18px;
        border: 1px solid rgba(255,255,255,.12);
        box-shadow: 0 20px 60px rgba(0,0,0,.55);
    }

    .app.liveshop-v2 .empty,
    .app.liveshop-v2 #featured {
        grid-column: 1;
    }
}

/* Logout confirmation — centered overlay, does not leave LiveShop */
.v2-confirm-modal[hidden] {
    display: none !important;
}

.v2-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    box-sizing: border-box;
}

.v2-confirm-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
}

.v2-confirm-modal__card {
    position: relative;
    width: min(100%, 340px);
    background: #151515;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 22px 18px 16px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
    box-sizing: border-box;
}

.v2-confirm-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.v2-confirm-modal__close svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.v2-confirm-modal__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--v2-accent-rgb), 0.16);
    color: var(--v2-accent);
    margin-bottom: 12px;
}

.v2-confirm-modal__icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
}

.v2-confirm-modal__title {
    margin: 0 36px 8px 0;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.v2-confirm-modal__text {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.94rem;
    line-height: 1.45;
}

.v2-confirm-modal__actions {
    display: flex;
    gap: 8px;
    margin-top: 18px;
}

.v2-confirm-modal__cancel,
.v2-confirm-modal__confirm {
    flex: 1;
    border: 0;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
}

.v2-confirm-modal__cancel {
    background: #2a2a2a;
    color: #ddd;
}

.v2-confirm-modal__confirm {
    background: var(--v2-accent);
    color: #1a0f14;
}

.v2-confirm-modal__confirm:disabled {
    opacity: 0.65;
    cursor: wait;
}

.v2-confirm-modal__cancel:focus-visible,
.v2-confirm-modal__confirm:focus-visible,
.v2-confirm-modal__close:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.45);
    outline-offset: 2px;
}
