/* postupashkin.ru — обучающий помощник страниц с плотными фильтрами и выдачей
   («Мои шансы», подбор вуза, калькулятор, подбор колледжа).
   Движок и тексты — public/js/site-tour.js. Токены берём из app.css, поэтому
   тёмная тема (html[data-theme="dark"]) работает сама, без отдельных правил. */

/* ── кнопка вызова: плавающая слева внизу (справа внизу живёт FAB обратной связи) ── */
#siteTourFab {
  position: fixed; left: 18px; bottom: 18px; z-index: 900;
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--blue); background: var(--card); color: var(--blue);
  border-radius: 100px; padding: 10px 16px 10px 13px;
  font: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer;
  box-shadow: var(--shadow-lg, 0 12px 28px rgba(15, 41, 66, .18));
}
#siteTourFab:hover { background: var(--blue-soft); }
#siteTourFab .mt-fab-ico { font-size: 17px; line-height: 1; }
#siteTourFab .mt-fab-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-soft);
}
@media (max-width: 640px) {
  #siteTourFab { left: 12px; bottom: 12px; padding: 9px 13px 9px 11px; font-size: 12.5px; }
  #siteTourFab .mt-fab-label { display: none; }
  #siteTourFab { border-radius: 50%; width: 46px; height: 46px; padding: 0; justify-content: center; }
}
body.mt-touring #siteTourFab { display: none; }

/* ── кнопка-полоска в шапке страницы (статичная разметка вьюхи) ── */
.site-tour-cta {
  display: flex; align-items: center; gap: 12px; width: 100%;
  margin: 0 0 18px; padding: 12px 16px; text-align: left;
  background: var(--card); border: 1.5px dashed var(--blue); border-radius: 14px;
  font: inherit; color: var(--ink); cursor: pointer;
}
.site-tour-cta:hover { background: var(--blue-soft); }
.site-tour-cta .mt-cta-ico { font-size: 22px; line-height: 1; }
.site-tour-cta .mt-cta-txt { flex: 1; }
.site-tour-cta b { display: block; font-size: 14px; }
.site-tour-cta span { color: var(--ink-2); font-size: 12px; font-weight: 600; }
.site-tour-cta .mt-cta-go { color: var(--blue); font-weight: 800; font-size: 14px; }

/* ── модалка помощника: оглавление экскурсии ── */
.mt-modal {
  position: fixed; inset: 0; z-index: 2147483100; display: flex;
  align-items: center; justify-content: center; padding: 14px;
  background: rgba(15, 23, 42, .58); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: mtFade .18s ease;
}
.mt-modal-card {
  position: relative; width: 100%; max-width: 520px;
  max-height: calc(100dvh - 28px); overflow: auto;
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 22px; padding: 20px 22px 18px;
  box-shadow: 0 28px 70px rgba(2, 32, 71, .34); animation: mtUp .22s ease;
}
.mt-modal-card h2 { font-size: 20px; margin: 0 0 6px; line-height: 1.2; }
.mt-modal-card .mt-lead { color: var(--ink-2); font-size: 13.5px; font-weight: 600; line-height: 1.55; margin: 0 0 14px; }
.mt-x {
  position: absolute; top: 12px; right: 14px; border: 0; background: none;
  color: var(--ink-3); font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 8px;
}
.mt-x:hover { color: var(--ink); background: var(--bg-2); }
.mt-chapters { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.mt-ch {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  border: 1.5px solid var(--line); background: var(--bg-2); color: var(--ink);
  border-radius: 14px; padding: 11px 14px; font: inherit; cursor: pointer;
}
.mt-ch:hover { border-color: var(--blue); }
.mt-ch-ico { font-size: 20px; line-height: 1; flex: none; }
.mt-ch-txt { flex: 1; min-width: 0; }
.mt-ch-txt b { display: block; font-size: 14px; font-weight: 800; }
.mt-ch-txt small { color: var(--ink-2); font-size: 12px; font-weight: 600; }
.mt-ch-state { font-size: 11.5px; font-weight: 800; color: var(--ink-3); flex: none; }
.mt-ch.done .mt-ch-state { color: var(--green, #16a34a); }
.mt-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mt-btn {
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 100px; padding: 9px 18px; font: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer;
}
.mt-btn:hover { border-color: var(--blue); }
.mt-btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.mt-btn-primary:hover { filter: brightness(1.06); }
.mt-lnk {
  border: 0; background: none; color: var(--ink-3); font: inherit; font-size: 12.5px;
  font-weight: 700; cursor: pointer; padding: 6px 2px; text-decoration: underline;
}
.mt-lnk:hover { color: var(--ink-2); }
.mt-video-guide {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 0 14px; padding: 12px 15px; border: 1.5px solid var(--blue);
  border-radius: 14px; background: var(--blue-soft); color: var(--ink);
  font-size: 13px; font-weight: 700; line-height: 1.35; text-decoration: none;
}
.mt-video-guide:hover { background: var(--card); }
.mt-video-guide b { display: block; color: var(--blue); font-size: 14px; }
.mt-video-guide span:last-child { flex: none; color: var(--blue); font-size: 20px; font-weight: 900; }
.mt-note { color: var(--ink-3); font-size: 12px; font-weight: 600; line-height: 1.5; margin: 12px 0 0; }

/* ── коучмарки: затемнение с «окном» на элементе ── */
/* Маска НЕ ловит клики: во время экскурсии страницей можно пользоваться —
   отметить предмет, заполнить поле, открыть ссылку. Затемнение даёт тень
   у .mt-spot, а не эта прослойка. */
.mt-mask { position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; background: transparent; }
.mt-spot {
  position: fixed; z-index: 2147483001; pointer-events: none; border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, .62), 0 0 0 3px var(--blue);
  transition: top .25s, left .25s, width .25s, height .25s;
}
.mt-card {
  position: fixed; z-index: 2147483002; width: 340px; max-width: calc(100vw - 24px);
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px 16px 12px;
  box-shadow: 0 22px 60px rgba(2, 32, 71, .4); animation: mtUp .2s ease;
}
.mt-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.mt-card-n { font-size: 11.5px; font-weight: 800; color: var(--ink-3); letter-spacing: .3px; }
.mt-card-title { font-size: 16px; font-weight: 800; margin-bottom: 5px; line-height: 1.25; }
.mt-card-text { font-size: 13.5px; font-weight: 600; line-height: 1.55; color: var(--ink-2); }
.mt-card-text b { color: var(--ink); font-weight: 800; }
.mt-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.mt-card-foot .mt-btn { padding: 8px 16px; font-size: 13px; }
.mt-card-center { top: 50%; left: 50%; transform: translate(-50%, -50%); }
@media (max-width: 640px) {
  .mt-card { width: auto; left: 12px; right: 12px; max-width: none; }
  .mt-card-bottom { bottom: 14px; top: auto !important; }
  .mt-card-at-top { top: 14px; bottom: auto !important; }
  .mt-card-center { top: 50%; left: 12px; right: 12px; transform: translateY(-50%); }
}
@keyframes mtFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes mtUp { from { opacity: 0; transform: translateY(12px) } to { opacity: 1; transform: none } }
@media (prefers-reduced-motion: reduce) {
  .mt-modal, .mt-modal-card, .mt-card { animation: none }
  .mt-spot { transition: none }
}
