/* ==========================================================================
   Live AI Stock Reporter & Speaking Avatar Styles (Dark Neon Glassmorphism)
   ========================================================================== */

.live-reporter-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 14, 26, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.live-reporter-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.live-reporter-dialog {
    width: 95%;
    max-width: 1100px;
    height: 90vh;
    max-height: 750px;
    background: linear-gradient(135deg, rgba(16, 26, 46, 0.95), rgba(10, 18, 32, 0.98));
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: 24px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7),
                0 0 35px rgba(0, 240, 255, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    direction: rtl;
    transform: scale(0.95);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.live-reporter-modal-backdrop.active .live-reporter-dialog {
    transform: scale(1);
}

/* Header */
.live-reporter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(13, 22, 38, 0.8);
    border-bottom: 1px solid rgba(0, 240, 255, 0.15);
}

.reporter-title-cluster {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reporter-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    border-radius: 20px;
    color: #f87171;
    font-size: 0.8rem;
    font-weight: 700;
}

.reporter-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    50% { transform: scale(1.2); opacity: 0.8; box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.reporter-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reporter-symbol-tag {
    color: #00f0ff;
    background: rgba(0, 240, 255, 0.1);
    padding: 2px 10px;
    border-radius: 8px;
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.btn-close-reporter {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.btn-close-reporter:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

/* Body Split View */
.live-reporter-body {
    flex: 1;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 16px;
    padding: 20px;
    min-height: 0;
}

/* Left/Main Column: Avatar Stage */
.avatar-stage-card {
    position: relative;
    background: radial-gradient(circle at 50% 40%, rgba(14, 30, 56, 0.9), rgba(6, 12, 24, 0.95));
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 40px rgba(0, 240, 255, 0.05);
}

.avatar-canvas-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#avatarCanvas {
    width: 100%;
    height: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 16px;
    filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.25));
}

/* Speaking & Waveform Indicator Overlay */
.avatar-status-overlay {
    position: absolute;
    bottom: 16px;
    left: 20px;
    right: 20px;
    background: rgba(10, 20, 36, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 14px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.avatar-state-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.audio-bars-container {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 22px;
}

.audio-bar {
    width: 4px;
    height: 6px;
    background: #00f0ff;
    border-radius: 2px;
    transition: height 0.08s ease-in-out;
}

/* Right Column: Mini Ticker & Transcript */
.reporter-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}

.sidebar-box {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 14px;
    overflow: hidden;
}

/* Live Market Stats Box */
.market-mini-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.market-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.88rem;
    color: #94a3b8;
    padding: 4px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.market-stat-val {
    font-weight: 700;
    color: #ffffff;
    font-feature-settings: tnum;
}

.stat-up { color: #10b981 !important; }
.stat-down { color: #ef4444 !important; }

/* Transcript Subtitles Box */
.transcript-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.transcript-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #00f0ff;
}

.transcript-content {
    flex: 1;
    overflow-y: auto;
    font-size: 0.92rem;
    line-height: 1.8;
    color: #cbd5e1;
    padding: 8px;
    background: rgba(8, 14, 26, 0.6);
    border-radius: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 240, 255, 0.3) transparent;
}

/* Bottom Controls Toolbar */
.live-reporter-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: rgba(13, 22, 38, 0.9);
    border-top: 1px solid rgba(0, 240, 255, 0.15);
}

.reporter-controls-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-reporter-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-talk-mic {
    background: linear-gradient(135deg, #00f0ff, #0284c7);
    color: #031124;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.35);
}

.btn-talk-mic.recording {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.45);
    animation: livePulse 1.2s infinite;
}

.btn-talk-mic:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.5);
}

.btn-ask-report {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-ask-report:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: rgba(0, 240, 255, 0.4);
    color: #00f0ff;
}

.reporter-text-input-wrap {
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: 12px;
    padding: 2px 6px;
    margin-right: 8px;
    transition: border-color 0.2s;
}

.reporter-text-input-wrap:focus-within {
    border-color: #00f0ff;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.reporter-text-input {
    background: transparent;
    border: none;
    outline: none;
    color: #f1f5f9;
    font-size: 0.88rem;
    padding: 8px 12px;
    width: 220px;
    font-family: inherit;
}

.reporter-text-input::placeholder {
    color: #64748b;
}

.btn-send-question {
    background: transparent;
    border: none;
    color: #00f0ff;
    padding: 6px 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-send-question:hover {
    background: rgba(0, 240, 255, 0.15);
    transform: scale(1.05);
}

/* Card Button Trigger */
.btn-live-avatar-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(59, 130, 246, 0.2));
    border: 1px solid rgba(0, 240, 255, 0.4);
    color: #00f0ff;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-live-avatar-trigger:hover {
    background: linear-gradient(135deg, #00f0ff, #3b82f6);
    color: #081120;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
    transform: translateY(-1px);
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .live-reporter-body {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }
    .avatar-stage-card {
        height: 320px;
    }
}
