/* EliteTon AI — минималистичный режим.
   Включается классом html.minimal (по умолчанию включён).
   Вернуть прежний вид: localStorage.uiStyle = 'classic' или переключатель в настройках. */

/* ---------- Палитра ---------- */
html.minimal body {
    --bg-deep: #151617;
    --bg-dark: #1b1c1e;
    --bg-elevated: #1b1c1e;
    --bg-glass: #1b1c1e;
    --text-primary: #ececec;
    --text-secondary: #b4b4b4;
    --text-muted: #7d7d7d;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-gold: rgba(255, 255, 255, 0.12);
    --gold: #ececec;
    --gold-bright: #ffffff;
    --gold-glow: transparent;
    --gold-glow-strong: transparent;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 12px;
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
    --shadow-gold: none;
    --transition: all 0.15s ease;
    --mn-line: rgba(255, 255, 255, 0.08);
    --mn-surface: #1b1c1e;
    --mn-surface-2: #232426;
    --mn-accent: #ececec;
    --mn-on-accent: #151617;
    background: var(--bg-deep) !important;
}

html.minimal body.luxury-light {
    --bg-deep: #ffffff;
    --bg-dark: #f7f7f7;
    --bg-elevated: #f7f7f7;
    --bg-glass: #f7f7f7;
    --text-primary: #1a1a1a;
    --text-secondary: #4d4d4d;
    --text-muted: #8a8a8a;
    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-gold: rgba(0, 0, 0, 0.12);
    --gold: #1a1a1a;
    --gold-bright: #000000;
    --mn-line: rgba(0, 0, 0, 0.08);
    --mn-surface: #f7f7f7;
    --mn-surface-2: #efefef;
    --mn-accent: #1a1a1a;
    --mn-on-accent: #ffffff;
    background: var(--bg-deep) !important;
}

/* ---------- Типографика: один шрифт, без капса и разрядки ---------- */
html.minimal body,
html.minimal body * {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}
html.minimal body .fas, html.minimal body .far, html.minimal body .fa-solid, html.minimal body .fa-regular {
    font-family: 'Font Awesome 6 Free';
}
html.minimal body .fab, html.minimal body .fa-brands {
    font-family: 'Font Awesome 6 Brands';
}
html.minimal body *:not(i):not(code):not(pre) {
    letter-spacing: normal !important;
    text-transform: none !important;
}

/* ---------- Убираем свечение, блюр и тени ---------- */
html.minimal body::before,
html.minimal body::after {
    display: none !important;
}
html.minimal *,
html.minimal *::before,
html.minimal *::after {
    box-shadow: none !important;
    text-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}
/* Поля ввода при фокусе: тонкая рамка вместо свечения */
html.minimal body textarea:focus,
html.minimal body input:focus,
html.minimal body select:focus {
    outline: none !important;
    border-color: var(--text-muted) !important;
}
/* Видимый фокус с клавиатуры */
html.minimal :focus-visible {
    outline: 2px solid var(--text-muted) !important;
    outline-offset: 2px;
}

/* ---------- Декор экрана входа ---------- */
html.minimal body .eta-bg-orb,
html.minimal body .eta-float-icons,
html.minimal body .eta-ticker-outer,
html.minimal body .eta-logo-wrap::after {
    display: none !important;
}
html.minimal body .auth-overlay {
    background: var(--bg-deep) !important;
}
html.minimal body .auth-card {
    background: var(--mn-surface) !important;
    border: 1px solid var(--mn-line) !important;
    border-radius: var(--radius-lg) !important;
}
html.minimal body .auth-title {
    font-weight: 600 !important;
}

/* ---------- Каркас ---------- */
html.minimal body .sidebar {
    background: var(--mn-surface) !important;
    border-right: 1px solid var(--mn-line) !important;
}
html.minimal body .sidebar-logo span {
    color: var(--text-primary) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}
html.minimal body .top-bar {
    background: var(--bg-deep) !important;
    border-bottom: 1px solid var(--mn-line) !important;
}
html.minimal body .chat-header {
    background: transparent !important;
    border-bottom: 1px solid var(--mn-line) !important;
}
html.minimal body .chat-title {
    font-family: 'DM Sans', sans-serif !important;
    font-weight: 600 !important;
}
html.minimal body .chat-sub {
    color: var(--text-muted) !important;
}
html.minimal body .crown-icon {
    display: none !important;
}

/* ---------- Список чатов ---------- */
html.minimal body .chat-item {
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: var(--radius-md) !important;
}
html.minimal body .chat-item:hover {
    background: var(--mn-surface-2) !important;
}
html.minimal body .chat-item.active {
    background: var(--mn-surface-2) !important;
    border-color: var(--mn-line) !important;
}

/* ---------- Сообщения: без пузырей-градиентов ---------- */
html.minimal body .message.user {
    background: var(--mn-surface-2) !important;
    color: var(--text-primary) !important;
    border: none !important;
    border-radius: var(--radius-lg) !important;
}
html.minimal body .message.user .message-content {
    color: var(--text-primary) !important;
}
html.minimal body .message.ai {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
}
html.minimal body .message,
html.minimal body .message-content {
    animation: none !important;
}
html.minimal body .message-avatar {
    border: none !important;
}
html.minimal body.luxury-light .message.ai {
    background: transparent !important;
    border: none !important;
}

/* ---------- Кнопки: одна спокойная акцентная, остальные — контур ---------- */
html.minimal body .new-chat-btn,
html.minimal body .sidebar-btn--primary,
html.minimal body .send-btn,
html.minimal body .plus-btn,
html.minimal body .image-gen-btn,
html.minimal body .auth-btn {
    background: var(--mn-accent) !important;
    color: var(--mn-on-accent) !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    font-weight: 600 !important;
}
html.minimal body .new-chat-btn:hover,
html.minimal body .sidebar-btn--primary:hover,
html.minimal body .send-btn:hover,
html.minimal body .plus-btn:hover,
html.minimal body .auth-btn:hover {
    opacity: 0.85;
    transform: none !important;
}
html.minimal body .send-btn .fas, html.minimal body .plus-btn .fas,
html.minimal body .send-btn i, html.minimal body .plus-btn i {
    color: var(--mn-on-accent) !important;
}
html.minimal body .sidebar-btn--secondary,
html.minimal body .icon-btn,
html.minimal body .input-buttons button,
html.minimal body .mode-select,
html.minimal body .custom-select-btn {
    background: transparent !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--mn-line) !important;
    border-radius: var(--radius-md) !important;
}
html.minimal body .sidebar-btn--secondary:hover,
html.minimal body .icon-btn:hover,
html.minimal body .input-buttons button:hover {
    background: var(--mn-surface-2) !important;
    color: var(--text-primary) !important;
}

/* ---------- Ввод ---------- */
html.minimal body .input-area {
    background: var(--bg-deep) !important;
    border-top: none !important;
}
html.minimal body .input-row textarea {
    background: var(--mn-surface) !important;
    border: 1px solid var(--mn-line) !important;
    border-radius: var(--radius-lg) !important;
    color: var(--text-primary) !important;
}

/* ---------- Модальные окна и настройки ---------- */
html.minimal body .modal-content,
html.minimal body .sd-card {
    background: var(--mn-surface) !important;
    border: 1px solid var(--mn-line) !important;
    border-radius: var(--radius-lg) !important;
}
html.minimal body .modal-title {
    color: var(--text-primary) !important;
}
html.minimal body .custom-select-dropdown {
    background: var(--mn-surface-2) !important;
    border: 1px solid var(--mn-line) !important;
}
html.minimal body .message-box {
    background: var(--mn-surface-2) !important;
    border: 1px solid var(--mn-line) !important;
}

/* ---------- Декоративные анимации выключены (индикаторы загрузки остаются) ---------- */
html.minimal body .eta-card,
html.minimal body .modal-content,
html.minimal body .auth-card {
    animation: none !important;
}
@media (prefers-reduced-motion: reduce) {
    html.minimal *, html.minimal *::before, html.minimal *::after {
        transition-duration: 0.01ms !important;
    }
}

/* ---------- Иконки кнопок наследуют цвет кнопки ---------- */
html.minimal body .send-btn svg,
html.minimal body .plus-btn svg,
html.minimal body .new-chat-btn svg {
    stroke: currentColor !important;
    color: inherit !important;
}
html.minimal body.luxury-light .send-btn,
html.minimal body.luxury-light .plus-btn,
html.minimal body.luxury-light .new-chat-btn,
html.minimal body.luxury-light .auth-btn,
html.minimal body.luxury-light .save-settings {
    background: #1a1a1a !important;
    color: #ffffff !important;
}
html.minimal body.luxury-light .send-btn:hover,
html.minimal body.luxury-light .new-chat-btn:hover,
html.minimal body.luxury-light .save-settings:hover {
    color: #ffffff !important;
}
html.minimal body .save-settings {
    background: var(--mn-accent) !important;
    color: var(--mn-on-accent) !important;
    border: none !important;
}
/* Голосовая кнопка и фото */
html.minimal body .voice-btn,
html.minimal body.luxury-light .voice-btn,
html.minimal body.luxury-light .photo-btn {
    background: transparent !important;
    border: 1px solid var(--mn-line) !important;
    color: var(--text-secondary) !important;
}

/* ---------- Остатки золота (особенно в светлой теме) ---------- */
html.minimal body .menu-toggle,
html.minimal body.luxury-light .menu-toggle {
    background: transparent !important;
    border: 1px solid var(--mn-line) !important;
}
html.minimal body .menu-toggle span,
html.minimal body.luxury-light .menu-toggle span {
    background: var(--text-primary) !important;
}
html.minimal body .chat-mode-card,
html.minimal body.luxury-light .chat-mode-card {
    background: var(--mn-surface) !important;
    border: 1px solid var(--mn-line) !important;
    border-radius: var(--radius-lg) !important;
}
html.minimal body .chat-mode-card:hover,
html.minimal body.luxury-light .chat-mode-card:hover {
    background: var(--mn-surface-2) !important;
    transform: none !important;
}
html.minimal body .chat-mode-card .chat-mode-icon,
html.minimal body .chat-mode-card.pro .chat-mode-icon {
    color: var(--text-primary) !important;
}
html.minimal body .chat-name,
html.minimal body.luxury-light .chat-name,
html.minimal body.luxury-light .chat-title,
html.minimal body .nickname-display {
    color: var(--text-primary) !important;
}
html.minimal body.luxury-light .chat-header,
html.minimal body.luxury-light .top-bar {
    background: var(--bg-deep) !important;
}
html.minimal body.luxury-light .input-row textarea {
    background: var(--mn-surface) !important;
    border: 1px solid var(--mn-line) !important;
}
html.minimal body.luxury-light .credits-footer {
    border-top-color: var(--mn-line) !important;
}

/* ---------- Поле ввода: стабильная высота, без анимации размера ---------- */
html.minimal body .input-row textarea {
    box-sizing: border-box !important;
    min-height: 44px !important;
    padding: 11px 16px !important;
    line-height: 1.4 !important;
    font-size: 15px !important;
    transition: border-color 0.15s ease !important;
}
html.minimal body .input-row textarea::placeholder {
    color: var(--text-muted) !important;
}

/* ---------- Кнопки, которые были «золотая заливка + тёмный текст» ---------- */
html.minimal body .sd-save-btn,
html.minimal body .send-image-btn,
html.minimal body .photo-action-sheet button:first-child,
html.minimal body .chart-type-btn.active,
html.minimal body .speak-ai-msg-btn:hover,
html.minimal body .variant-nav-btn:hover:not(:disabled),
html.minimal body .magnifier-fab,
html.minimal body .ec-fab--on,
html.minimal body .ec-invert-btn--active,
html.minimal body .avatar-upload-btn,
html.minimal body .agent-toolbar-btn--gold,
html.minimal body .agent-type-btn--active,
html.minimal body .agent-pro-badge,
html.minimal body .call-ctrl-btn.cam-btn.active {
    background: var(--mn-accent) !important;
    color: var(--mn-on-accent) !important;
    border: none !important;
}
html.minimal body .sd-save-btn i,
html.minimal body .sd-save-btn span,
html.minimal body .send-image-btn i,
html.minimal body .send-image-btn svg,
html.minimal body .magnifier-fab i,
html.minimal body .ec-fab--on i,
html.minimal body .avatar-upload-btn i,
html.minimal body .agent-toolbar-btn--gold i {
    color: inherit !important;
}
html.minimal body .sd-save-btn:hover {
    opacity: 0.85;
    transform: none !important;
}
html.minimal body .sd-save-btn.saved {
    background: #16a34a !important;
    color: #ffffff !important;
}
/* Шапка настроек и поля в светлой теме */
html.minimal body.luxury-light .sd-topbar {
    background: var(--bg-deep) !important;
    border-bottom: 1px solid var(--mn-line) !important;
}
html.minimal body.luxury-light .sd-card {
    background: var(--mn-surface) !important;
    border: 1px solid var(--mn-line) !important;
}
html.minimal body .sd-close-btn,
html.minimal body .sd-file-btn {
    background: transparent !important;
    border: 1px solid var(--mn-line) !important;
    color: var(--text-primary) !important;
}
html.minimal body .sd-card-icon,
html.minimal body .sd-icon,
html.minimal body .sd-section-icon {
    background: var(--mn-surface-2) !important;
    border: 1px solid var(--mn-line) !important;
    color: var(--text-primary) !important;
}
