/* Innora — Hotel documentation page (/docs)
   Mobile-first. Reuses the --ota-* design tokens from ota.css. */

.docs-page { padding-bottom: 40px; }

/* Справочная страница: не перекрываем чтение PWA-баннером. */
#ota-pwa-banner { display: none !important; }

/* ---------- Hero ---------- */
.docs-hero {
  background:
    radial-gradient(900px 340px at 12% -30%, rgba(94, 234, 212, .22), transparent 60%),
    linear-gradient(150deg, #0b3d4a, #0b1f2a 70%);
  color: #fff;
  padding: 28px 0 32px;
}
.docs-hero-inner { display: grid; gap: 14px; }
.docs-kicker {
  margin: 0;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #5eead4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.docs-hero h1 {
  margin: 0;
  font-size: clamp(1.65rem, 6vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 900;
}
.docs-hero-lead {
  margin: 0;
  max-width: 62ch;
  color: rgba(255, 255, 255, .82);
  font-size: 1rem;
  line-height: 1.6;
}
.docs-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2px; }
.docs-hero-actions .ota-btn { min-height: 44px; }
.docs-hero-actions .ota-btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, .38);
  background: rgba(255, 255, 255, .10);
}
.docs-hero-actions .ota-btn-ghost:hover {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}
.docs-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}
.docs-stat {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  padding: 10px 12px;
}
.docs-stat strong { display: block; font-size: 1.15rem; font-weight: 900; }
.docs-stat span { font-size: .78rem; color: rgba(255, 255, 255, .72); }

/* ---------- Shell / layout ---------- */
.docs-shell {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  align-items: start;
}

/* ---------- Table of contents (mobile: collapsible) ---------- */
.docs-toc {
  background: var(--ota-surface);
  border: 1px solid var(--ota-line);
  border-radius: var(--ota-radius);
  box-shadow: var(--ota-shadow);
  padding: 6px;
  overflow: hidden;
}
.docs-toc summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 10px;
  font-weight: 800;
  font-size: .95rem;
  border-radius: var(--ota-radius-sm);
}
.docs-toc summary::-webkit-details-marker { display: none; }
.docs-toc summary .bi-chevron-down { margin-left: auto; transition: transform .18s ease; }
.docs-toc[open] summary .bi-chevron-down { transform: rotate(180deg); }
.docs-toc[open] summary {
  border-bottom: 1px solid var(--ota-line);
  border-radius: var(--ota-radius-sm) var(--ota-radius-sm) 0 0;
  margin-bottom: 4px;
}
.docs-toc-group { padding: 4px; }
.docs-toc-group + .docs-toc-group { border-top: 1px solid var(--ota-line); margin-top: 2px; padding-top: 6px; }
.docs-toc-group h3 {
  margin: 8px 10px 4px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ota-muted);
}
.docs-toc a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: var(--ota-radius-sm);
  color: var(--ota-ink-soft);
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.3;
}
.docs-toc a .bi { color: var(--ota-brand); font-size: 1rem; flex: 0 0 auto; }
.docs-toc a:hover { background: #f0fdfa; color: var(--ota-brand-dark); }
.docs-toc a.is-active { background: #ccfbf1; color: var(--ota-brand-dark); font-weight: 700; }

/* ---------- Content ---------- */
.docs-content { display: grid; gap: 14px; min-width: 0; }

.docs-section {
  background: var(--ota-surface);
  border: 1px solid var(--ota-line);
  border-radius: var(--ota-radius);
  box-shadow: var(--ota-shadow);
  padding: 18px 16px;
  min-width: 0;
}
.docs-section-head { display: flex; align-items: flex-start; gap: 12px; }
.docs-section-icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  color: var(--ota-brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.docs-section h2 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: -.01em;
  font-weight: 800;
}
.docs-plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.docs-plan-badge[data-tier="business"] { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.docs-plan-badge[data-tier="pro"] { background: #f5f3ff; color: #5b21b6; border-color: #ddd6fe; }
.docs-plan-badge[data-tier="enterprise"] { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }

.docs-lead { margin: 12px 0 0; color: var(--ota-ink-soft); font-size: 1rem; line-height: 1.6; }
.docs-subhead {
  margin: 18px 0 0;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ota-muted);
}
.docs-list { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.docs-list li { display: flex; align-items: flex-start; gap: 10px; color: var(--ota-ink-soft); font-size: .95rem; line-height: 1.5; }
.docs-list li .bi { color: var(--ota-brand); margin-top: 2px; flex: 0 0 auto; }

.docs-steps { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.docs-step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; }
.docs-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ota-brand);
  color: #fff;
  font-size: .8rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.docs-step-body { color: var(--ota-ink-soft); font-size: .95rem; line-height: 1.55; }
.docs-step-body strong { color: var(--ota-ink); }

.docs-note {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #78350f;
  font-size: .9rem;
  line-height: 1.5;
}
.docs-note .bi { color: #b45309; flex: 0 0 auto; margin-top: 2px; }
.docs-note a { color: inherit; text-decoration: underline; }

/* ---------- Tables ---------- */
.docs-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--ota-line);
  border-radius: 12px;
  max-width: 100%;
}
.docs-table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 560px; }
.docs-table th,
.docs-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--ota-line); vertical-align: top; }
.docs-table thead th { background: #f8fafc; font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ota-muted); }
.docs-table tbody tr:last-child td { border-bottom: 0; }
.docs-table td.is-yes { color: #047857; font-weight: 700; }
.docs-table td.is-no { color: #b91c1c; }
.docs-table th:not(:first-child),
.docs-table td:not(:first-child) { white-space: normal; }
.docs-table.is-matrix th:not(:first-child),
.docs-table.is-matrix td:not(:first-child) { text-align: center; white-space: nowrap; }

/* ---------- Pricing ---------- */
.docs-plans { display: grid; gap: 12px; margin-top: 14px; }
.docs-plan {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--ota-line);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}
.docs-plan.is-featured { border-color: var(--ota-brand); box-shadow: 0 10px 26px rgba(13, 148, 136, .16); }
.docs-plan-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.docs-plan-name { margin: 0; font-size: 1rem; font-weight: 800; }
.docs-plan-flag {
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--ota-brand);
  color: #fff;
}
.docs-plan-desc { margin: 0; color: var(--ota-muted); font-size: .85rem; line-height: 1.45; }
.docs-plan-price { font-size: 1.5rem; font-weight: 900; line-height: 1.1; }
.docs-plan-price small { font-size: .76rem; font-weight: 700; color: var(--ota-muted); }
.docs-plan-yearly { font-size: .78rem; color: var(--ota-muted); }
.docs-plan-yearly b { color: #047857; }
.docs-plan-limits {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 10px 0 0;
  border-top: 1px dashed var(--ota-line);
  list-style: none;
  font-size: .82rem;
  color: var(--ota-ink-soft);
}
.docs-plan-limits li { display: flex; align-items: center; gap: 7px; }
.docs-plan-limits .bi { color: var(--ota-brand); }
.docs-plan-feats { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: .84rem; color: var(--ota-ink-soft); }
.docs-plan-feats li { display: flex; align-items: flex-start; gap: 7px; line-height: 1.4; }
.docs-plan-feats .bi { color: #059669; margin-top: 2px; flex: 0 0 auto; }
.docs-plan-cta { margin-top: auto; padding-top: 6px; }
.docs-plan-cta .ota-btn { width: 100%; min-height: 44px; }

/* ---------- FAQ ---------- */
.docs-faq { display: grid; gap: 8px; margin-top: 12px; }
.docs-faq details {
  border: 1px solid var(--ota-line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.docs-faq summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  list-style: none;
}
.docs-faq summary::-webkit-details-marker { display: none; }
.docs-faq summary .bi { color: var(--ota-brand); transition: transform .18s ease; flex: 0 0 auto; }
.docs-faq details[open] summary .bi { transform: rotate(180deg); }
.docs-faq-body { padding: 0 14px 14px; color: var(--ota-ink-soft); font-size: .93rem; line-height: 1.6; }

/* ---------- CTA / support ---------- */
.docs-cta {
  margin-top: 14px;
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(150deg, #0b3d4a, #0b1f2a);
  color: #fff;
}
.docs-cta h3 { margin: 0; font-size: 1.05rem; }
.docs-cta p { margin: 0; color: rgba(255, 255, 255, .8); font-size: .92rem; line-height: 1.55; }
.docs-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.docs-cta-actions .ota-btn { min-height: 44px; }

/* ---------- Small screens: hero actions ---------- */
@media (max-width: 559px) {
  .docs-hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .docs-hero-actions .ota-btn:first-child { grid-column: 1 / -1; }
}

/* ---------- Larger screens ---------- */
@media (min-width: 560px) {
  .docs-plans { grid-template-columns: 1fr 1fr; }
  .docs-hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .docs-hero { padding: 44px 0 50px; }
  .docs-shell { grid-template-columns: 268px minmax(0, 1fr); gap: 24px; margin-top: 24px; }
  .docs-toc {
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 104px);
    overflow-y: auto;
    padding: 10px;
  }
  .docs-toc summary { display: none; }
  .docs-section { padding: 24px; }
  .docs-content { gap: 18px; }
}

@media (min-width: 1200px) {
  .docs-plans { grid-template-columns: 1fr 1fr; }
}

/* ---------- Scroll experience ---------- */
/* Тонкая полоса прогресса чтения вверху страницы. */
.docs-progress {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  z-index: 60;
  pointer-events: none;
}
.docs-progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, #0d9488, #5eead4 60%, #f59e0b);
  transition: transform .08s linear;
  will-change: transform;
}

/* Плавное появление секций. Класс добавляет JS — без него контент виден сразу. */
.docs-reveal-on .docs-section {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s ease, transform .5s cubic-bezier(.2, .7, .3, 1);
}
.docs-reveal-on .docs-section.is-revealed {
  opacity: 1;
  transform: none;
}

/* Аккуратные скроллбары для оглавления и прокручиваемых таблиц. */
.docs-toc,
.docs-table-wrap { scrollbar-width: thin; scrollbar-color: #94a3b8 transparent; }
.docs-toc::-webkit-scrollbar,
.docs-table-wrap::-webkit-scrollbar { width: 8px; height: 8px; }
.docs-toc::-webkit-scrollbar-track,
.docs-table-wrap::-webkit-scrollbar-track { background: transparent; }
.docs-toc::-webkit-scrollbar-thumb,
.docs-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, .35);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.docs-toc::-webkit-scrollbar-thumb:hover,
.docs-table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, .62);
  background-clip: padding-box;
}

@media (prefers-reduced-motion: reduce) {
  .docs-toc summary .bi-chevron-down,
  .docs-faq summary .bi { transition: none; }
  .docs-progress span { transition: none; }
  .docs-reveal-on .docs-section { opacity: 1; transform: none; transition: none; }
}

/* Печать: показываем все секции полностью, скрываем служебные элементы. */
@media print {
  .docs-progress,
  .docs-toc { display: none !important; }
  .docs-shell { display: block; margin: 0; }
  .docs-reveal-on .docs-section,
  .docs-section {
    opacity: 1 !important;
    transform: none !important;
    box-shadow: none;
    border-color: #ddd;
    break-inside: avoid;
  }
}
