/**
 * OXORA Landing V5 — Live Experience / WOW
 */

/* ── Live Status (OxLiveStatus) ── */
.ox-wow-live-status {
    position: fixed;
    top: calc(var(--ox-topbar-height, 72px) + 8px);
    right: var(--ox-space-4);
    z-index: 95;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--ox-text-secondary);
    background: rgba(8, 10, 20, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(155, 61, 255, 0.2);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    max-width: min(280px, 90vw);
}

.ox-wow-live-status.is-pulse {
    border-color: rgba(155, 61, 255, 0.45);
    box-shadow: 0 0 20px rgba(155, 61, 255, 0.15);
}

.ox-wow-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 8px #34d399;
    flex-shrink: 0;
    animation: ox-wow-dot-breathe 2.5s ease-in-out infinite;
}

@keyframes ox-wow-dot-breathe {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.65; transform: scale(0.85); }
}

.ox-wow-status-prefix { color: var(--ox-text-tertiary); white-space: nowrap; }
.ox-wow-status-text { color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── AI state (inteligência em movimento) ── */
.ox-wow-ai-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: var(--ox-space-4);
    font-size: 0.8rem;
    color: var(--ox-purple-light, #c084fc);
    min-height: 1.4em;
}

.ox-wow-ai-state.is-changing { opacity: 0.5; }

.ox-wow-ai-state::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ox-purple);
    animation: ox-wow-dot-breathe 1.5s ease-in-out infinite;
}

/* ── Timeline (OxLiveTimeline) ── */
.ox-wow-timeline {
    margin-top: var(--ox-space-6);
    padding: var(--ox-space-4);
    border-radius: var(--ox-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    max-height: 200px;
    overflow: hidden;
    mask-image: linear-gradient(180deg, #000 70%, transparent);
}

.ox-wow-timeline-item {
    display: flex;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.78rem;
    opacity: 0.35;
    transition: opacity var(--ox-motion-base) var(--ox-motion-ease), transform var(--ox-motion-base);
}

.ox-wow-timeline-item.is-active {
    opacity: 1;
    transform: translateX(4px);
}

.ox-wow-timeline-time {
    font-weight: 700;
    color: var(--ox-purple);
    min-width: 42px;
    font-variant-numeric: tabular-nums;
}

.ox-wow-timeline-text { color: var(--ox-text-secondary); }

/* ── Presentation button ── */
.ox-wow-present-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: var(--ox-space-4);
    padding: 0;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ox-purple-light, #c084fc);
    cursor: pointer;
    transition: color var(--ox-motion-fast), gap var(--ox-motion-fast);
}

.ox-wow-present-btn:hover { color: #fff; gap: 12px; }

.ox-wow-present-btn [data-lucide] { width: 18px; height: 18px; }

body.ox-wow-presenting .ox-wow-present-btn { opacity: 0.5; pointer-events: none; }

/* ── Section pulse (live experience) ── */
.ox-wow-section-pulse {
    animation: ox-wow-section-glow 1.2s var(--ox-motion-ease) forwards;
}

@keyframes ox-wow-section-glow {
    0% { box-shadow: inset 0 0 0 0 rgba(155, 61, 255, 0); }
    40% { box-shadow: inset 0 0 80px 0 rgba(155, 61, 255, 0.06); }
    100% { box-shadow: inset 0 0 0 0 rgba(155, 61, 255, 0); }
}

/* ── Chat message wow entrance ── */
.ox-wow-chat-in {
    animation: ox-wow-chat-in 0.45s var(--ox-motion-ease) forwards;
}

@keyframes ox-wow-chat-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Smart highlights ── */
.ox-wow-highlight-flash,
[data-wow-highlight].ox-wow-highlight-active {
    animation: ox-wow-kpi-flash 1.2s var(--ox-motion-ease);
    border-color: rgba(155, 61, 255, 0.35) !important;
}

@keyframes ox-wow-kpi-flash {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 24px rgba(155, 61, 255, 0.25); }
}

/* ── Scroll bridges ── */
.ox-wow-bridge {
    text-align: center;
    padding: var(--ox-space-3) var(--ox-space-6);
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    font-style: italic;
    color: var(--ox-text-tertiary);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.6s var(--ox-motion-ease), transform 0.6s var(--ox-motion-ease);
}

.ox-wow-bridge.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Presentation complete ── */
.ox-wow-complete {
    position: fixed;
    bottom: calc(var(--ox-space-6) + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 110;
    max-width: 420px;
    width: calc(100% - var(--ox-space-8));
    padding: var(--ox-space-5) var(--ox-space-6);
    border-radius: var(--ox-radius-lg);
    background: rgba(12, 12, 22, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(155, 61, 255, 0.25);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: ox-wow-complete-in 0.5s var(--ox-motion-ease);
}

.ox-wow-complete[hidden] { display: none !important; }

@keyframes ox-wow-complete-in {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.ox-wow-complete-msg {
    margin: 0 0 var(--ox-space-4);
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--ox-text);
}

.ox-wow-complete-actions {
    display: flex;
    gap: var(--ox-space-3);
    justify-content: center;
    flex-wrap: wrap;
}

.ox-wow-complete-close {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--ox-text-tertiary);
    font-family: inherit;
    cursor: pointer;
    font-size: 0.85rem;
}

/* ── Ambient (presentation + live) ── */
body.ox-wow-live-active .ox-lv2-hero-aurora,
body.ox-wow-presenting .ox-lv2-hero-aurora {
    animation-duration: 12s;
}

body.ox-wow-presenting {
    scroll-behavior: smooth;
}

/* ── Scroll story chapters ── */
[data-wow-chapter].ox-wow-chapter-active {
    transition: box-shadow 0.8s var(--ox-motion-ease);
}

[data-wow-chapter="5"].ox-wow-chapter-active .ox-lv2-kpi[data-wow-highlight] {
    border-color: rgba(155, 61, 255, 0.2);
}

/* ── Ambient motion (live / presentation) ── */
body.ox-wow-live-active .ox-lv2-hero-mesh,
body.ox-wow-presenting .ox-lv2-hero-mesh {
    opacity: 0.85;
    transition: opacity 2s ease;
}

body.ox-wow-live-active .ox-lv2-float-card,
body.ox-wow-presenting .ox-lv2-float-card {
    animation-duration: 6s;
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .ox-wow-live-status {
        top: auto;
        bottom: calc(72px + env(safe-area-inset-bottom));
        right: var(--ox-space-3);
        left: var(--ox-space-3);
        max-width: none;
        justify-content: center;
    }

    .ox-wow-timeline { display: none; }

    body.ox-wow-presenting .ox-cro-sticky-cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .ox-wow-live-status,
    .ox-wow-timeline,
    .ox-wow-present-btn,
    .ox-wow-ai-state { display: none !important; }

    .ox-wow-section-pulse,
    .ox-wow-chat-in,
    .ox-wow-highlight-flash { animation: none !important; }
}
