/**
 * AVIORA Training - AAvi AI Video Experience Styles
 *
 * Ultra-premium holographic digital assistant player
 * Supports vertical 9:16 high-definition video, browser audio policy prompts,
 * synced real-time subtitles, and interactive post-video decision cards.
 *
 * @version 1.3.0
 */

/* ==========================================================================
   1. Floating Launcher Video Play Beacon
   ========================================================================== */
.aavi-video-play-badge {
    position: absolute;
    top: -2px;
    left: -2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #FF6B35;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border: 2px solid #FFFFFF;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.6);
    z-index: 6;
    animation: playBeaconPulse 2s infinite ease-in-out;
}

@keyframes playBeaconPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.7); }
    50% { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(255, 107, 53, 0); }
}

/* ==========================================================================
   2. AAvi Video Popup Modal (Holographic AI Pod)
   ========================================================================== */
.aviora-aavi-video-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.aviora-aavi-video-modal.is-active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

/* Dark Glassmorphic Backdrop */
.aavi-video-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(11, 25, 44, 0.85) 0%, rgba(6, 14, 26, 0.95) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Holographic Window */
.aavi-video-window {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    background: linear-gradient(165deg, #0E2238 0%, #08172E 100%);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 28px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 229, 255, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(30px) scale(0.96);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.aviora-aavi-video-modal.is-active .aavi-video-window {
    transform: translateY(0) scale(1);
}

/* Ambient Cyber Glow Behind */
.aavi-video-glow {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 140px;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.35) 0%, rgba(255, 107, 53, 0.2) 60%, transparent 80%);
    filter: blur(40px);
    pointer-events: none;
    z-index: 1;
}

/* Header */
.aavi-video-header {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(14, 34, 56, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.aavi-vheader-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.aavi-vheader-avatar {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #0B192C;
    border: 2px solid #00E5FF;
    padding: 3px;
    box-shadow: 0 0 14px rgba(0, 229, 255, 0.4);
}

.aavi-vheader-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.aavi-live-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #10B981;
    border: 2px solid #0E2238;
}

.aavi-vheader-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #00E5FF;
}

.badge-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00E5FF;
    box-shadow: 0 0 8px #00E5FF;
}

.aavi-vheader-title {
    margin: 2px 0 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.2;
}

.aavi-vheader-subtitle {
    font-size: 11px;
    font-weight: 500;
    color: #94A3B8;
}

.aavi-vheader-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.aavi-vctrl-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #E2E8F0;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.aavi-vctrl-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #FFFFFF;
    border-color: #00E5FF;
}

.aavi-close-video-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
}

.aavi-close-video-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #EF4444;
    color: #EF4444;
}

/* ==========================================================================
   3. Main Cinema Stage (Vertical 9:16 Video Stage)
   ========================================================================== */
.aavi-cinema-stage {
    position: relative;
    width: 100%;
    height: 520px;
    background: #030810;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

@media (max-height: 720px) {
    .aavi-cinema-stage {
        height: 440px;
    }
}

.aavi-player-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    background: #030810;
}

/* Big Center Play State Indicator */
.aavi-play-state-indicator {
    position: absolute;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(11, 25, 44, 0.7);
    border: 2px solid #00E5FF;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    z-index: 8;
}

.aavi-play-state-indicator.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* ==========================================================================
   4. Browser Audio Policy Unmute Banner
   ========================================================================== */
.aavi-unmute-overlay {
    position: absolute;
    top: 18px;
    left: 18px;
    right: 18px;
    z-index: 15;
    display: none;
    animation: slideDownFade 0.4s ease;
}

.aavi-unmute-overlay.is-visible {
    display: block;
}

@keyframes slideDownFade {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.aavi-unmute-prompt-btn {
    width: 100%;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.95) 0%, rgba(224, 76, 24, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 16px;
    padding: 10px 16px;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.45), 0 0 15px rgba(255, 107, 53, 0.3);
    text-align: left;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.aavi-unmute-prompt-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(255, 107, 53, 0.6);
}

.unmute-icon-pulse {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    animation: unmuteBeep 1.5s infinite;
}

@keyframes unmuteBeep {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.unmute-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.unmute-text strong {
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.2;
}

.unmute-text small {
    font-size: 11px;
    opacity: 0.9;
    margin-top: 2px;
}

.arrow-icon {
    font-size: 12px;
    opacity: 0.8;
}

/* ==========================================================================
   5. Synced Subtitles Ribbon
   ========================================================================== */
.aavi-subtitles-bar {
    position: absolute;
    bottom: 20px;
    left: 16px;
    right: 16px;
    z-index: 12;
    background: rgba(8, 23, 46, 0.88);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.subtitle-sparkle {
    color: #00E5FF;
    font-size: 12px;
    margin-top: 2px;
    flex-shrink: 0;
}

.subtitle-text {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #F8FAFC;
    line-height: 1.45;
}

/* ==========================================================================
   6. Post-Video Interactive Choice Overlay
   ========================================================================== */
.aavi-decision-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    background: linear-gradient(180deg, rgba(8, 23, 46, 0.7) 0%, rgba(6, 14, 26, 0.97) 50%, #060E1A 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: flex-end;
    padding: 24px 20px;
    animation: fadeDecisionIn 0.4s ease;
}

.aavi-decision-overlay.is-visible {
    display: flex;
}

@keyframes fadeDecisionIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.aavi-decision-content {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.aavi-decision-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #00E5FF;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.aavi-decision-title {
    margin: 0 0 4px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.25;
}

.aavi-decision-subtitle {
    margin: 0 0 16px;
    font-size: 12.5px;
    color: #94A3B8;
    line-height: 1.4;
}

.aavi-decision-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.aavi-choice-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.aavi-choice-team {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.18) 0%, rgba(255, 107, 53, 0.08) 100%);
    border-color: rgba(255, 107, 53, 0.45);
}

.aavi-choice-team:hover {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.3) 0%, rgba(255, 107, 53, 0.15) 100%);
    border-color: #FF6B35;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.25);
}

.aavi-choice-team .choice-icon-wrap {
    background: rgba(255, 107, 53, 0.25);
    color: #FF6B35;
}

.aavi-choice-self {
    background: linear-gradient(135deg, rgba(11, 79, 216, 0.25) 0%, rgba(0, 229, 255, 0.1) 100%);
    border-color: rgba(0, 229, 255, 0.4);
}

.aavi-choice-self:hover {
    background: linear-gradient(135deg, rgba(11, 79, 216, 0.4) 0%, rgba(0, 229, 255, 0.2) 100%);
    border-color: #00E5FF;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 229, 255, 0.2);
}

.aavi-choice-self .choice-icon-wrap {
    background: rgba(0, 229, 255, 0.2);
    color: #00E5FF;
}

.choice-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.choice-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.choice-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.2;
}

.choice-desc {
    font-size: 11.5px;
    color: #CBD5E1;
    margin-top: 2px;
}

.choice-arrow {
    color: #94A3B8;
    font-size: 13px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.aavi-choice-card:hover .choice-arrow {
    transform: translateX(4px);
    color: #FFFFFF;
}

/* Secondary Choices */
.aavi-decision-secondary {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.aavi-sec-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #E2E8F0;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.aavi-sec-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #FFFFFF;
    border-color: #00E5FF;
}

/* ==========================================================================
   7. Bottom Footer / Scrubber Bar
   ========================================================================== */
.aavi-video-footer {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(14, 34, 56, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.aavi-vfooter-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.aavi-play-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #FFFFFF;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.aavi-play-toggle-btn:hover {
    background: #FF6B35;
    transform: scale(1.08);
}

.aavi-scrubber-wrap {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.aavi-scrubber-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #00E5FF 0%, #FF6B35 100%);
    border-radius: 3px;
    transition: width 0.1s linear;
}

.aavi-time-display {
    font-size: 11px;
    font-weight: 600;
    color: #94A3B8;
    min-width: 65px;
    text-align: right;
    font-family: monospace;
}

.aavi-switch-chat-btn {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.15) 0%, rgba(11, 79, 216, 0.25) 100%);
    border: 1px solid rgba(0, 229, 255, 0.35);
    color: #00E5FF;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.aavi-switch-chat-btn:hover {
    background: #00E5FF;
    color: #0B192C;
    box-shadow: 0 4px 14px rgba(0, 229, 255, 0.35);
}

/* ==========================================================================
   8. Assistant Modal Stage Button Overrides
   ========================================================================== */
.aavi-watch-video-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #FF6B35 0%, #E04C18 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    transition: all 0.2s ease;
}

.aavi-watch-video-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.5);
}

.aavi-stage-play-pill {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #FFFFFF;
    border: 1px solid #BFDBFE;
    color: #0B4FD8;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(11, 79, 216, 0.1);
    transition: all 0.2s ease;
    z-index: 5;
}

.aavi-stage-play-pill:hover {
    background: #0B4FD8;
    color: #FFFFFF;
    border-color: #0B4FD8;
}
