/**
 * brief.css — Reimagined Утренний брифинг Aimo (warm-dark + amber/rose).
 *
 * Класс-контракт сохранён (используется в BriefModule.js / BM_*.js).
 * Поменяна палитра: emerald/blue → amber/rose, чтобы соответствовать
 * единой warm-dark системе остальной Reimagined UI.
 */

.brief-open-active { overflow: hidden !important; }

/* ─── Оверлей во весь экран ─── */
.bm-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background:
        radial-gradient(circle at 50% 50%, #1A0F0A 0%, #0A0504 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, sans-serif;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: bmFadeInOverlay 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bmFadeInOverlay {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ─── Loading / error ─── */
.bm-loading-container,
.bm-error-container {
    text-align: center;
    max-width: 500px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary);
}

.bm-orb-pulse-loader {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--accent-gradient);
    box-shadow: 0 0 50px rgba(245, 158, 11, 0.45);
    animation: bmOrbPulse 2s infinite ease-in-out;
}

@keyframes bmOrbPulse {
    0%   { transform: scale(0.9); box-shadow: 0 0 30px rgba(245, 158, 11, 0.35); }
    50%  { transform: scale(1.05); box-shadow: 0 0 60px rgba(251, 113, 133, 0.55); }
    100% { transform: scale(0.9); box-shadow: 0 0 30px rgba(245, 158, 11, 0.35); }
}

/* ─── Главный контейнер ─── */
.bm-container {
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    background: rgba(28, 16, 8, 0.65);
    border: 1px solid rgba(251, 146, 60, 0.18);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    animation: bmScaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bmScaleIn {
    from { transform: scale(0.92); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* ─── Шапка ─── */
.bm-header {
    padding: 22px 30px;
    border-bottom: 1px solid rgba(251, 146, 60, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bm-header-title h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #FBBF24 0%, #FDA4AF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.bm-header-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.bm-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s, transform 0.2s;
}

.bm-close-btn:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

/* ─── Колонки ─── */
.bm-content-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 450px 1fr;
    overflow: hidden;
}

/* Левая колонка — плеер */
.bm-player-column {
    border-right: 1px solid rgba(251, 146, 60, 0.10);
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    overflow-y: auto;
    background: rgba(15, 8, 5, 0.45);
}

/* ─── Aimo Orb ─── */
.bm-orb-visualizer {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
}

.bm-orb-glow {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.32) 0%, rgba(251, 113, 133, 0.08) 70%);
    filter: blur(30px);
    animation: bmOrbGlowFloat 4s infinite ease-in-out;
}

@keyframes bmOrbGlowFloat {
    0%, 100% { transform: scale(1); opacity: 0.65; }
    50%      { transform: scale(1.15); opacity: 0.95; }
}

.bm-orb-sphere {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, #3A1F12 0%, #1F140D 50%, #0A0504 100%);
    border: 2px solid rgba(245, 158, 11, 0.30);
    box-shadow:
        inset 0 0 30px rgba(245, 158, 11, 0.22),
        0 10px 40px rgba(0, 0, 0, 0.6);
    transition: border-color 0.5s, box-shadow 0.5s;
}

.bm-orb-sphere::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(251, 113, 133, 0.14) 100%);
    opacity: 0.8;
}

.bm-orb-sphere.speaking {
    border-color: rgba(245, 158, 11, 0.65);
    box-shadow:
        inset 0 0 40px rgba(245, 158, 11, 0.45),
        0 0 60px rgba(251, 113, 133, 0.35),
        0 10px 40px rgba(0, 0, 0, 0.6);
    animation: bmSpeakingPulse 1.5s infinite ease-in-out;
}

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

/* ─── Эквалайзер ─── */
.bm-orb-wave {
    position: absolute;
    bottom: 10px;
    width: 240px;
    height: 50px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s, transform 0.4s;
    pointer-events: none;
}

.bm-orb-wave.active {
    opacity: 1;
    transform: translateY(0);
}

.bm-wave-bar {
    width: 4px;
    height: 4px;
    background: linear-gradient(to top, #F59E0B, #FB7185);
    border-radius: 2px;
    transition: height 0.08s ease-in-out;
}

/* ─── Audio controls ─── */
.bm-audio-controls {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bm-progress-area {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#bm-progress-bar {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(251, 146, 60, 0.14);
    outline: none;
    cursor: pointer;
    transition: background 0.3s;
}

#bm-progress-bar::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    border-radius: 3px;
}

#bm-progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.8);
    cursor: pointer;
    margin-top: -5px;
    transition: transform 0.1s;
}

#bm-progress-bar::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.bm-time-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* ─── Кнопки управления ─── */
.bm-buttons-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.bm-icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bm-icon-btn:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.bm-icon-btn span { font-size: 2rem; }

.bm-play-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.40);
    transition: transform 0.2s, box-shadow 0.2s;
}

.bm-play-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.60);
}

.bm-play-btn span { font-size: 2.5rem; }

.bm-play-btn.playing {
    background: linear-gradient(135deg, #ef4444 0%, #e11d48 100%);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.40);
}

.bm-play-btn.playing:hover {
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.55);
}

/* ─── Скорость воспроизведения ─── */
.bm-settings-row {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.bm-badge-btn {
    background: rgba(251, 146, 60, 0.08);
    border: 1px solid rgba(251, 146, 60, 0.18);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.bm-badge-btn:hover {
    background: rgba(245, 158, 11, 0.16);
    color: var(--text-primary);
    border-color: rgba(245, 158, 11, 0.35);
}

.bm-badge-btn.active {
    background: rgba(245, 158, 11, 0.20);
    border-color: rgba(245, 158, 11, 0.50);
    color: var(--primary-color);
}

/* ─── Фидбэк ─── */
.bm-feedback-section {
    margin-top: 22px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.bm-feedback-question {
    font-size: 0.81rem;
    color: var(--text-secondary);
}

.bm-feedback-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
}

.bm-feedback-btn {
    flex: 1;
    background: rgba(28, 16, 8, 0.55);
    border: 1px solid rgba(251, 146, 60, 0.20);
    border-radius: 12px;
    padding: 10px;
    color: var(--text-primary);
    font-size: 0.81rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
}

.bm-feedback-btn:hover {
    background: rgba(251, 146, 60, 0.12);
    border-color: rgba(251, 146, 60, 0.40);
}

.bm-feedback-btn.active {
    background: rgba(245, 158, 11, 0.20);
    border-color: rgba(245, 158, 11, 0.55);
    color: var(--primary-color);
}

.bm-feedback-success {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #34d399;
    font-size: 0.81rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.30);
    padding: 8px 16px;
    border-radius: 12px;
    animation: bmFadeInFeedback 0.3s ease-out;
}

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

/* ─── Правая колонка ─── */
.bm-text-column {
    padding: 30px 38px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.bm-section-label {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary-color);
    margin-bottom: 12px;
}

/* Транскрипт */
.bm-transcript-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 14px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 22px;
    mask-image: linear-gradient(to bottom, transparent 0%, white 10%, white 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, white 10%, white 90%, transparent 100%);
}

.bm-transcript-segment {
    font-size: 1.13rem;
    line-height: 1.6;
    color: rgba(255, 245, 232, 0.35);
    transition: color 0.4s ease, transform 0.4s ease;
    cursor: pointer;
    transform-origin: left center;
}

.bm-transcript-segment.active {
    color: var(--text-primary);
    font-weight: 600;
    transform: scale(1.02);
    text-shadow: 0 0 14px rgba(245, 158, 11, 0.30);
}

/* Action chips */
.bm-action-chips-container {
    display: flex;
    gap: 10px;
}

.bm-chip-btn {
    background: rgba(28, 16, 8, 0.55);
    border: 1px solid rgba(251, 146, 60, 0.20);
    border-radius: 100px;
    padding: 10px 18px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.bm-chip-btn:hover {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.45);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .bm-container {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .bm-content-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        overflow-y: auto;
    }

    .bm-player-column {
        border-right: none;
        border-bottom: 1px solid rgba(251, 146, 60, 0.12);
        padding: 22px;
    }

    .bm-orb-visualizer { width: 180px; height: 180px; }
    .bm-orb-sphere     { width: 120px; height: 120px; }
    .bm-orb-wave       { width: 160px; }

    .bm-text-column {
        padding: 22px;
        height: auto;
        overflow: visible;
    }

    .bm-transcript-container {
        flex: none;
        height: 250px;
        mask-image: none;
        -webkit-mask-image: none;
    }

    .bm-action-chips-container { flex-wrap: wrap; }
    .bm-chip-btn { flex: 1 1 40%; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.spinning {
    display: inline-block;
    animation: spin 1s linear infinite;
}

