/* Liquid Clouds 13 · «Тест личности» в общей сцене.
   Слой подключается последним и только добавляет: точку нового цвета в хабе,
   постоянную кнопку предложения в рассказе и карточку предложения в финале.
   Стили самого теста живут в Shadow DOM (app/ui/personality_test.js), чтобы
   его id и разметка не пересекались с приложением. */

/* ── хаб: цвет точки и подписи ───────────────────────────────────────────── */
.v5-hub-legend .v5-lg-chapters::before{background:#48777a}
.v5-hub-legend .v5-lg-stories::before{background:#7d6bc0}
.v5-hub-legend .v5-lg-test::before{background:#C08A3E;box-shadow:0 0 0 2px #f4e2c2}
.v5-hub-legend .v5-lg-games::before{background:#b67f72}
.v5-hub-legend .v5-lg-found::before{background:#be95be}
.v5-hub-legend .v5-lg-read::before{background:#c8f6e2;border:2px solid #25795c}

.v5-hub-focus[data-node-kind="test"] .v5-hf-kicker{color:#8a5a1e}
.v5-hub-focus[data-node-kind="test"]{border-color:#c08a3e66!important;
  box-shadow:0 14px 36px rgba(120,80,24,.14),inset 0 1px 0 rgba(255,255,255,.9)!important}
.v5-hub-focus[data-node-kind="test"] .v5-hf-progress{background:#f7e6c8;color:#6a4516}
.v5-hub-focus[data-node-kind="test"] #v5-hf-open{
  border:1px solid #c08a3e!important;
  background:linear-gradient(115deg,#fff3d8,#f6dfae)!important;
  color:#5a3a0e!important;
  box-shadow:0 8px 22px rgba(160,105,30,.26),inset 0 1px 0 rgba(255,255,255,.7)!important}
.v5-hub-focus[data-node-kind="test"] #v5-hf-open:hover{
  background:linear-gradient(115deg,#fff8e8,#f9e6c0)!important;
  box-shadow:0 12px 26px rgba(160,105,30,.34),inset 0 1px 0 rgba(255,255,255,.85)!important}

/* ── читалка: постоянное предложение в строке заголовка ──────────────────── */
.v5-reader-head{transition:max-width .3s ease}
.v5-scene.has-test-offer .v5-reader-head{max-width:calc(100% - 36px)}
/* В рассказе с тестом в строке появляется лишняя кнопка: название-«связь»
   уступает место, а глава ужимается многоточием, чтобы ничего не уезжало
   за край плиты на ноутбучных ширинах. */
.v5-scene.has-test-offer .v5-rh-title{display:none}
.v5-scene.has-test-offer .v5-rh-chapter{min-width:0;flex:1 1 auto}
.v5-scene.has-test-offer .v5-rh-ch{min-width:0;max-width:100%;overflow:hidden;
  text-overflow:ellipsis}
.v5-rh-test{
  display:inline-flex;align-items:center;gap:7px;flex:0 0 auto;height:44px;padding:0 14px;
  border:1px solid #c08a3e88;border-radius:999px;background:#fff8eaee;color:#6a4516;
  font:700 12px/1 system-ui,"Segoe UI",sans-serif;letter-spacing:.01em;cursor:pointer;
  pointer-events:auto;transition:background .15s ease,border-color .15s ease,transform .15s ease}
.v5-rh-test[hidden]{display:none!important}
.v5-rh-test:hover{background:#fff;border-color:#c08a3e}
.v5-rh-test:active{transform:scale(.97)}
.v5-rh-test:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
.v5-rh-test-mark{color:#b0742f;font-size:13px;line-height:1}

/* Внутри теста своя шапка (назад к рассказу / в хаб), поэтому верхняя строка
   читалки не нужна: она дублирует название и показывает бессмысленный здесь
   процент чтения. */
.v5-scene.is-personality-test .v5-reader-head{display:none!important}
.v5-scene.is-personality-test .v5-rh-hint{display:none}
.v5-scene.is-personality-test .v5-rh-title{display:none}
.v5-scene.is-personality-test .v5-rh-chapter{cursor:default}
.v5-scene.is-personality-test .v5-rh-chapter:hover{background:inherit}

/* ── плита теста ─────────────────────────────────────────────────────────── */
.v5-scene.is-personality-test .v5-plate-inner{padding:14px 20px 16px}
.v5-plate-inner > .pt-mount{display:flex;flex-direction:column;flex:1 1 auto;width:100%;
  min-height:0;height:auto}

/* ── финал рассказа: предложение пройти тест ─────────────────────────────── */
.v5-chapter-event .v5-ce-card{max-height:calc(100vh - 48px);overflow-y:auto}
.v5-ce-test{
  margin:14px 0 2px;padding:14px 16px 15px;border:1px solid #d9b878;border-radius:16px;
  background:linear-gradient(120deg,#fffaf0,#f8edd8);color:#2e2517}
.v5-ce-test[hidden]{display:none!important}
.v5-ce-test-kicker{margin:0 0 4px;color:#8a5a1e;font-size:10px;font-weight:700;
  letter-spacing:.14em;text-transform:uppercase}
.v5-ce-test-line{margin:0 0 12px;color:#5f5137;font-size:12.5px;line-height:1.45;max-width:52ch}
.v5-ce-btn.v5-ce-btn--test{
  color:#4a3410;border-color:#c08a3e;background:linear-gradient(110deg,#ffe8bd,#f6d79a);
  font-weight:700}
.v5-ce-btn.v5-ce-btn--test:hover{background:linear-gradient(110deg,#fff0d4,#f9dfae)}

@media(max-width:720px){
  .v5-scene.has-test-offer .v5-rh-chapter{display:none}
  .v5-rh-test{height:38px;padding:0 11px;font-size:11px;gap:5px}
  .v5-scene.is-personality-test .v5-plate-inner{padding:8px 8px 10px}
  .v5-ce-test{padding:12px 12px 13px;margin-top:12px}
  .v5-ce-test-line{font-size:12px}
}
@media(max-height:600px){
  .v5-scene.is-personality-test .v5-plate-inner{padding-top:6px;padding-bottom:8px}
}
