﻿/* ===================== AIDA212 v2 - TRAINER STYLES ===================== */
.trainer-chat { background: var(--bg-card); border-radius: var(--radius-xl); border: 1px solid var(--border-color); overflow: hidden; box-shadow: var(--shadow-card); }
.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; background: var(--bg-card); border-bottom: 1px solid var(--border-color); }
.chat-header-info { display: flex; align-items: center; gap: 12px; }
.chat-client-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.chat-client-name { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.chat-client-detail { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.chat-messages { height: 500px; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; background: var(--bg-primary); }
.message { display: flex; gap: 12px; max-width: 80%; }
.client-message { align-self: flex-start; }
.user-message { align-self: flex-end; flex-direction: row-reverse; }
.message-avatar { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.user-avatar-small { background: var(--accent-gradient); color: white; font-weight: 700; font-size: 11px; }
.message-bubble { padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; font-size: 14px; line-height: 1.6; color: var(--text-primary); }
.user-bubble { background: rgba(67, 97, 238, 0.15); border-color: rgba(67, 97, 238, 0.3); }
.message-time { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
.typing-indicator { display: none; align-items: center; gap: 4px; padding: 12px 16px; margin-left: 44px; }
.typing-indicator.visible { display: flex; }
.typing-indicator span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); animation: typing 1.4s ease-in-out infinite; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-8px); opacity: 1; } }
.chat-input-area { padding: 16px 24px; background: var(--bg-card); border-top: 1px solid var(--border-color); }
.chat-input-wrapper { display: flex; gap: 8px; align-items: flex-end; }
.chat-input { flex: 1; padding: 12px 16px; background: var(--bg-input); border: 1px solid var(--border-light); border-radius: var(--radius-md); color: var(--text-primary); font-size: 14px; resize: none; transition: all 0.3s ease; }
.chat-input:focus { border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15); }
.chat-input::placeholder { color: var(--text-muted); }
.chat-input-actions { display: flex; gap: 8px; align-items: center; }

/* ===== Chat send button - bigger ===== */
.btn-send {
    width: 48px !important;
    height: 48px !important;
    background: var(--accent-gradient) !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    color: white !important;
    font-size: 18px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3) !important;
}

.btn-send:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4) !important;
}

.btn-send:active {
    transform: translateY(0) !important;
}

/* End training button */
.btn-end {
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    color: #ef4444 !important;
    padding: 8px 16px !important;
    border-radius: var(--radius-md) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.btn-end:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2) !important;
}

/* Chat input wrapper with bigger button */
.chat-input-wrapper {
    display: flex !important;
    gap: 8px !important;
    align-items: flex-end !important;
}

.chat-input {
    flex: 1 !important;
    min-height: 48px !important;
}

.chat-scenario-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(67, 97, 238, 0.08);
    border-bottom: 1px solid rgba(67, 97, 238, 0.2);
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
}

.chat-scenario-banner i {
    color: var(--accent-primary);
    margin-top: 2px;
    flex-shrink: 0;
}

/* Chat footer (кнопка завершения внизу + подсказка таймаута) */
.chat-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 24px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

.chat-timeout-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.chat-session-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.chat-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== Модальное окно результата (обратная связь по секциям) ===== */
.result-modal-wrap {
    padding: 8px 0;
}

.result-score {
    font-size: 56px;
    font-weight: 900;
    text-align: center;
    line-height: 1;
}

.result-grade {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin-top: 8px;
}

.result-feedback {
    margin-top: 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.result-feedback-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.result-feedback-header i {
    color: var(--accent-primary);
}

.result-feedback-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
}

.fb-section-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 6px;
    padding-bottom: 2px;
    border-bottom: 1px dashed var(--border-color);
}

.fb-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
}

.fb-row-bullet {
    flex-shrink: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-primary);
    margin-top: 9px;
}

.fb-row-text {
    flex: 1;
    min-width: 0;
}

/* ===== Колокольчик уведомлений (метки, непрочитанное) ===== */
.notif-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.notif-unread {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.notif-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notif-item {
    position: relative;
    display: flex;
    gap: 12px;
    padding: 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
}

.notif-item-unread {
    border-color: rgba(67, 97, 238, 0.4);
    background: rgba(67, 97, 238, 0.04);
}

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.notif-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.notif-title {
    font-size: 14px;
    color: var(--text-primary);
}

.notif-date {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

.notif-text {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.notif-unread-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
}

/* ===== Раздел тренера «Новости и рассылки» ===== */
.trainer-news-wrap {
    max-width: 1200px;
    margin: 0 auto;
}

.trainer-news-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 16px;
    align-items: start;
}

@media (max-width: 900px) {
    .trainer-news-grid {
        grid-template-columns: 1fr;
    }
}

.news-list-trainer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trainer-news-item {
    padding: 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
}

.tnews-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tnews-draft {
    font-size: 10px;
    font-weight: 700;
    color: #f97316;
    background: rgba(249, 115, 22, 0.12);
    padding: 2px 8px;
    border-radius: 6px;
}

.tnews-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
}

.btn-sm {
    padding: 6px 10px !important;
    font-size: 12px !important;
}

/* === Голосовой тренажёр === */
.voice-input-area {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}
.voice-mic-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(67, 97, 238, 0.3);
}
.voice-mic-btn:hover { transform: translateY(-2px); }
.voice-mic-btn.active {
    background: #ef4444;
    animation: voicePulse 1.6s ease-in-out infinite;
}
.voice-hint {
    flex: 1;
    font-size: 13px;
    color: var(--text-muted);
    text-align: left;
}
@keyframes voicePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 0 14px rgba(239, 68, 68, 0); }
}

/* === Голосовой иммерсив === */
.voice-immersive {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 40px 24px;
    text-align: center;
    min-height: 52vh;
}
.voice-immersive-icon {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(67,97,238,0.15);
    color: #4361ee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    transition: all 0.3s ease;
}
.voice-immersive-text {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 420px;
    line-height: 1.5;
}

.voice-mic-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.voice-notes {
    padding: 14px 24px 16px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

/* Ожидание обработки в голосе */
.voice-wait-dots { display: flex; gap: 6px; }
.voice-wait-dots span { width: 10px; height: 10px; border-radius: 50%; background: #4361ee; animation: voiceWait 1.2s ease-in-out infinite; }
.voice-wait-dots span:nth-child(2) { animation-delay: 0.15s; }
.voice-wait-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes voiceWait { 0%,100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.1); } }
