/*
 * Как доклад MENAAP Economic Update настраивает Репортер: единственное место, где в демо стоят
 * переменные `--reporter-*`. Цвета — из палитры `style.css`: жёлтый акцент `--sun` с тёмными
 * буквами `--sun-ink` вместо зелёного, тёмное стекло `--ink` вместо серого. На белой панели
 * чата и в белом поле мелкие метки — синие `--navy`: жёлтый на белом не читается. Шрифт тегам
 * задавать не нужно: они наследуют Struve от `body`.
 */

/* Пока тег не поднят, его слоты видно текстом посреди страницы: CSS сайта успевает раньше SDK. */
reporter-chat:not(:defined) { display: none; }

reporter-chat {
  --reporter-chat-suggest-bg: #fae45d;
  --reporter-chat-suggest-ink: #03161b;
  --reporter-chat-suggest-hover-bg: #03161b;
  --reporter-chat-suggest-hover-ink: #fae45d;
  --reporter-chat-mic-bg: #fae45d;
  --reporter-chat-user-bg: #03161b;
  --reporter-chat-user-ink: #f2f6f5;
  --reporter-chat-grounded-ink: #0e5494;
  /* Знак Репортера: им нарисована и кнопка чата, и приветствие. */
  --reporter-chat-mark-body: #fae45d;
  --reporter-chat-glow: radial-gradient(60% 80% at 15% 100%, rgba(250, 228, 93, .32), transparent 70%),
    radial-gradient(60% 70% at 85% 100%, rgba(253, 238, 154, .4), transparent 70%);
  --reporter-chat-spark: #0e5494;
  --reporter-chat-speaking: #0e5494;
  --reporter-chat-visual-bar: #0e5494;
  --reporter-chat-visual-whence-action: #0e5494;
  --reporter-chat-selection-spark: #0e5494;
  --reporter-chat-selection-mic-recording: #0e5494;
}

reporter-voice-talk {
  --reporter-voice-talk-button-bg: rgba(8, 36, 42, .86);
  --reporter-voice-talk-button-hover-bg: #0d2f36;
  --reporter-voice-talk-frame: #fae45d;
  --reporter-voice-talk-frame-ink: #03161b;
  --reporter-voice-talk-hint-bg: #fae45d;
  --reporter-voice-talk-hint-ink: #03161b;
  --reporter-voice-talk-pressed-bg: #fae45d;
  --reporter-voice-talk-pressed-ink: #03161b;
}

reporter-marker {
  --reporter-marker-bg: rgba(8, 36, 42, .86);
  --reporter-marker-hover-bg: #0d2f36;
  --reporter-marker-pressed-bg: #fae45d;
  --reporter-marker-pressed-ink: #03161b;
}

reporter-modes {
  --reporter-modes-bg: rgba(8, 36, 42, .86);
  --reporter-modes-tab-pressed-bg: #fae45d;
  --reporter-modes-tab-pressed-ink: #03161b;
}

reporter-player {
  --reporter-player-bg: rgba(8, 36, 42, .86);
  --reporter-player-border: #0d2f36;
  --reporter-player-button-hover-bg: #0d2f36;
  --reporter-player-track: #2b4a51;
  --reporter-player-progress: #fae45d;
  --reporter-player-play-hover-bg: #fae45d;
  --reporter-player-back-bg: #fae45d;
  --reporter-player-back-ink: #03161b;
}

/* Строка и цитата карточки — тем же гротеском, что текст статьи. */
reporter-cards {
  --reporter-cards-bg: #03161b;
  --reporter-cards-text-font: Struve, 'Helvetica Neue', Arial, sans-serif;
  --reporter-cards-dot: #fae45d;
}

reporter-mindmap {
  --reporter-mindmap-bg: #03161b;
  --reporter-mindmap-button-bg: rgba(8, 36, 42, .86);
  --reporter-mindmap-button-hover-bg: #0d2f36;
  --reporter-mindmap-question: #fae45d;
  --reporter-mindmap-tab-on-bg: #fae45d;
  --reporter-mindmap-tab-on-ink: #03161b;
}

/* Блок глоссария — цвета номеров глав: жёлтые на тёмных главах, синие на светлых. Звезда стоит
   в белом поле — она синяя на любой главе. */
reporter-glossary {
  --reporter-glossary-kicker: #fae45d;
  --reporter-glossary-line: #fae45d;
  --reporter-glossary-spark: #0e5494;
  --reporter-glossary-visual-bar: #fae45d;
  --reporter-glossary-visual-whence-action: #fae45d;
}

.light reporter-glossary {
  --reporter-glossary-kicker: #0e5494;
  --reporter-glossary-line: #0e5494;
  --reporter-glossary-visual-bar: #0e5494;
  --reporter-glossary-visual-whence-action: #0e5494;
}

/*
 * Подсветка в тексте страницы ложится и на тёмные главы, и на светлые, поэтому цвета сплошные:
 * полупрозрачные на тёмном мутнеют. Термин — жёлтый, как маркер `.mk` сайта, звучащее слово —
 * мятное, чтобы их не спутать.
 */
:root {
  --reporter-glossary-term: #fdee9a;
  --reporter-glossary-term-ink: #03161b;
  --reporter-glossary-term-hover: #fae45d;
  --reporter-glossary-term-hover-ink: #03161b;
  --reporter-glossary-term-marked: #f2d43a;
  --reporter-glossary-term-marked-ink: #03161b;
  --reporter-player-word: #7fd0b9;
  --reporter-chat-selection-mark: #fff7cc;
  --reporter-chat-selection-mark-ink: #03161b;
  --reporter-mindmap-found: #fff7cc;
}

/* У звучащего слова и находки поиска нет переменной для букв: светлые буквы тёмных глав на
   светлой плашке не читаются, поэтому буквы — тёмные. Голым `::highlight()`: Safari не
   наследует его от `:root`. */
::highlight(reporter-word),
::highlight(reporter-mindmap-found) { color: #03161b; }

/* Термин нажимается: курсор руки у текста задаёт сама страница. */
[data-reporter-term] { cursor: pointer; }
