/* ── Lavi Product Story – Frontend ── */

/* ── Trigger: ícone circular estilo Instagram Story ── */
.lps-story-trigger-wrap {
    display: flex;
    align-items: center;
    margin: 14px 0 4px;
}

.lps-story-trigger {
    appearance: none;
    -webkit-appearance: none;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    color: inherit;
}

.lps-story-trigger:hover,
.lps-story-trigger:focus,
.lps-story-trigger:active,
.lps-story-trigger:focus-visible {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    text-decoration: none;
}

.lps-story-ring {
    display: block;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #f9a825 0%, #f06292 50%, #ab47bc 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
    transition: transform .18s ease, box-shadow .18s ease;
}

.lps-story-trigger:hover .lps-story-ring,
.lps-story-trigger:focus-visible .lps-story-ring {
    transform: scale(1.07);
    box-shadow: 0 4px 16px rgba(0,0,0,.35);
}

.lps-story-thumb {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
}

.lps-story-label {
    font-size: 11px;
    font-weight: 600;
    color: #333;
    letter-spacing: .3px;
    line-height: 1;
}

/* ── Modal overlay ── */
.lps-story-modal {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 2147483647 !important; /* valor máximo de z-index */
    display: flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;
}

.lps-story-modal[hidden] {
    display: none !important;
}

body.lps-modal-open,
body.lps-modal-open #wpadminbar {
    z-index: 0 !important;
}

body.lps-modal-open {
    overflow: hidden;
}

.lps-story-backdrop {
    position: fixed !important;
    inset: 0;
    background: rgba(0, 0, 0, .82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* ── Container do story ── */
.lps-story-container {
    position: relative;
    width: min(420px, 100vw);
    height: min(746px, 100svh);
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 24px 80px rgba(0,0,0,.7);
    display: flex;
    flex-direction: column;
    /* Animação de entrada */
    animation: lpsSlideUp .28s cubic-bezier(.22,.68,0,1.2) both;
}

@keyframes lpsSlideUp {
    from { opacity: 0; transform: translateY(40px) scale(.96); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

/* ── Barra de progresso ── */
.lps-story-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,.35);
    z-index: 10;
    border-radius: 0;
}

.lps-story-progress-bar {
    height: 100%;
    background: #fff;
    width: 0%;
    transition: width .1s linear;
    border-radius: 0 2px 2px 0;
}

/* ── Header ── */
.lps-story-header {
    position: absolute;
    top: 8px;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px 10px;
    background: linear-gradient(to bottom, rgba(0,0,0,.55) 0%, transparent 100%);
}

.lps-story-header-avatar img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
}

.lps-story-header-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.lps-story-header-info strong {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lps-story-header-info span {
    color: rgba(255,255,255,.75);
    font-size: 11px;
}

.lps-story-close {
    background: rgba(0,0,0,.4);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s;
    padding: 0;
}

.lps-story-close:hover {
    background: rgba(0,0,0,.65);
}

/* ── Vídeo ── */
.lps-story-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Botão de mute ── */
.lps-story-mute-btn {
    position: absolute;
    bottom: 80px;
    right: 14px;
    z-index: 10;
    background: rgba(0,0,0,.45);
    border: none;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background .15s;
}

.lps-story-mute-btn:hover {
    background: rgba(0,0,0,.65);
}

/* ── CTA ── */
.lps-story-cta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 16px;
    background: linear-gradient(to top, rgba(0,0,0,.72) 0%, transparent 100%);
    display: flex;
    justify-content: center;
}

.lps-story-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: #111;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 28px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(0,0,0,.35);
    transition: transform .15s, box-shadow .15s;
}

.lps-story-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(0,0,0,.45);
    color: #111;
    text-decoration: none;
}

/* ── Mobile: fullscreen ── */
@media (max-width: 480px) {
    .lps-story-container {
        width: 100vw;
        height: 100svh;
        border-radius: 0;
    }
}
