/* Tariff-aware cabinet — см. tariff_gate.js.
 * .cab-lean навешивается на <body> для эффективного тарифа «Методички». */

/* Out-of-tariff поверхности, недоступные на methodology_only, — прячем,
 * чтобы не висели «мёртвыми» элементами (фидбек: «функции не из тарифа → путаница»).
 * Персональный тьютор = тарифы tutor/legacytutor:
 *   #tutorCallBlock  — видеозвонок тьютор↔ученик
 *   #tutorDocsBlock  — тьютор-доки (ответы на экз. вопросы)
 * AI-тьютор НЕ прячем: он работает и на methodology_only (бэкенд не гейтит по тарифу). */
body.cab-lean #tutorCallBlock,
body.cab-lean #tutorDocsBlock {
  display: none !important;
}

/* Карточка «Расширить тариф» — единственная точка апгрейда вместо разбросанных
 * «заблокировано»-элементов. */
.cab-upgrade-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--border, #e6e8ef);
  border-radius: var(--radius, 16px);
  background:
    color-mix(in srgb, var(--surface, #fff) 90%, var(--accent, #4f7cff) 10%);
  padding: 18px 20px;
  margin-bottom: 16px;
}

.cab-upgrade-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.cab-upgrade-emoji {
  font-size: 1.7rem;
  line-height: 1;
  flex: 0 0 auto;
}

.cab-upgrade-tier {
  display: inline-block;
  font-weight: 700;
  font-size: 1.02rem;
}

.cab-upgrade-sub {
  margin: 4px 0 0;
  color: var(--muted, #6b7280);
  font-size: 0.9rem;
  line-height: 1.45;
}

.cab-upgrade-label {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cab-upgrade-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.cab-upgrade-list li {
  display: flex;
  gap: 9px;
  align-items: baseline;
  font-size: 0.92rem;
  line-height: 1.4;
}

.cab-upgrade-list li span {
  flex: 0 0 auto;
}

.cab-upgrade-btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent, #4f7cff);
  color: #fff;
  justify-self: start;
  transition: filter 0.15s ease;
}

.cab-upgrade-btn:hover { filter: brightness(1.05); }
.cab-upgrade-btn:active { filter: brightness(0.96); }

/* ── Сфокусированный first-run онбординг «Методичек» (onboarding_methodology.js) ── */
.cab-mi-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 18, 30, 0.55);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.cab-mi-overlay.visible { opacity: 1; }

.cab-mi-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  box-sizing: border-box;
  background: var(--surface, #fff);
  color: var(--text, #1a1f2e);
  border: 1px solid var(--border, #e6e8ef);
  border-radius: 20px;
  padding: 26px 24px 22px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(15, 18, 30, 0.28);
  transform: translateY(8px) scale(0.98);
  transition: transform 0.2s ease;
}
.cab-mi-overlay.visible .cab-mi-card { transform: none; }

.cab-mi-skip {
  position: absolute;
  top: 12px;
  right: 14px;
  appearance: none;
  border: 0;
  background: none;
  color: var(--muted, #6b7280);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 4px 6px;
}
.cab-mi-skip:hover { text-decoration: underline; }

.cab-mi-emoji { font-size: 2.6rem; line-height: 1; margin-bottom: 10px; }
.cab-mi-title { margin: 0 0 8px; font-size: 1.15rem; font-weight: 700; }
.cab-mi-text { margin: 0 0 16px; font-size: 0.94rem; line-height: 1.5; color: var(--muted, #6b7280); }

.cab-mi-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 16px; }
.cab-mi-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: color-mix(in srgb, var(--muted, #6b7280) 35%, transparent);
  transition: background 0.15s ease, transform 0.15s ease;
}
.cab-mi-dot.active { background: var(--accent, #4f7cff); transform: scale(1.25); }

.cab-mi-actions { display: flex; gap: 10px; justify-content: center; }
.cab-mi-back, .cab-mi-next {
  appearance: none;
  border-radius: 12px;
  padding: 11px 20px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.cab-mi-back {
  border: 1px solid var(--border, #e6e8ef);
  background: var(--surface, #fff);
  color: var(--text, #1a1f2e);
}
.cab-mi-next {
  border: 0;
  background: var(--accent, #4f7cff);
  color: #fff;
}
.cab-mi-next:hover { filter: brightness(1.05); }
