/*
 * Помощен център (templates/public/help.php + assets/js/site/help.js) — /help. Пренесено от досегашния CSS (help.component)
 * без обвивката на Angular (21.10.2026, DECISIONS S7е): селекторите са под .help, класовете — същите (рисува ги и JS-ът).
 */
.help .help-wrap {
  max-width: 1580px;
  margin: 0 auto;
  padding: 56px 80px 40px;
}

/* ═══ Хедър на роля ═══ */
.help .role-header {
  margin-bottom: 22px;
}
.help .role-header h1 {
  /* шрифтът, редът и разредката — от типографията на старата рамка (Angular Material h1); „пациент“ — Inter */
  font-family: var(--font-text);
  line-height: 32px;
  letter-spacing: normal;
  font-size: var(--fs-h1);
  font-weight: 800;
  color: var(--ink-heading);
  margin: 0 0 6px;
}
.help .role-header h1 .accent {
  font-family: var(--font-text);
  color: var(--ink-link);
}
.help .role-header .role-sub {
  font-size: var(--fs-body);
  color: var(--ink-muted);
  margin: 0; line-height: var(--lh-body);
}

/* ═══ Оформление с лява навигация (роли със секции) ═══ */
.help .help-layout.has-nav {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 32px;
  align-items: start;
}

.help .side-nav {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.help .side-nav .side-cap {
  font-size: var(--fs-tiny);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 8px;
  padding-left: 12px; line-height: var(--lh-tiny);
}
.help .side-nav .side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  background: none;
  border-radius: 10px;
  font-size: var(--fs-small);
  font-weight: 600;
  font-family: inherit;
  color: var(--ink-muted);
  cursor: pointer;
  text-align: left;
  transition: background 0.14s, color 0.14s; line-height: var(--lh-small);
}
.help .side-nav .side-link:hover {
  background: #f0f9ff;
  color: var(--ink-link);
}
.help .side-nav .side-link.on {
  background: #e0f2fe;
  color: var(--ink-link);
}
.help .side-nav .side-contact {
  margin-top: 18px;
  padding: 14px;
  border: 1px dashed #e2e8f0;
  border-radius: 12px;
  font-size: var(--fs-note);
  line-height: var(--lh-note);
  color: var(--ink-muted);
}
.help .side-nav .side-contact a {
  color: var(--ink-link);
  font-weight: 600;
  text-decoration: none;
}
.help .side-nav .side-contact a:hover {
  text-decoration: underline;
}

/* ═══ Търсене ═══ */
.help .search-box {
  position: relative;
  margin-bottom: 14px;
}
.help .search-box .search-ic {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--ink-muted);
  pointer-events: none;
}
.help .search-box input {
  width: 100%;
  padding: 14px 44px 14px 44px;
  font-size: var(--fs-body);
  font-family: inherit;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.14s, box-shadow 0.14s; line-height: var(--lh-body);
}
.help .search-box input:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}
.help .search-box .search-clear {
  position: absolute;
  padding: 0; /* в старата рамка бутоните са без поле (Tailwind) */
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-muted);
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}
.help .search-box .search-clear:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* Връзка обратно към всички теми (при активно търсене) */
.help .show-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px 0;
  background: none;
  border: none;
  color: var(--ink-link);
  font-size: var(--fs-small);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.14s; line-height: var(--lh-small);
}
.help .show-all svg {
  width: 18px;
  height: 18px;
}
.help .show-all:hover {
  color: var(--ink-link);
}

/* ═══ Чипове „популярно" ═══ */
.help .chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}
.help .chips .chip-label {
  font-size: var(--fs-note);
  color: var(--ink-muted); line-height: var(--lh-note);
}
.help .chips .chip {
  padding: 6px 13px;
  font-size: var(--fs-note);
  font-family: inherit;
  color: var(--ink-link);
  background: #eff8fd;
  border: 1px solid #d3ecf9;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.14s, transform 0.14s; line-height: var(--lh-note);
}
.help .chips .chip:hover {
  background: #e0f2fe;
}

/* ═══ Теми (акордеон) ═══ */
.help .topics {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Секционно заглавие между групите теми (Работа с графика, Ограничения…) */
.help .topics-section-cap {
  margin: 18px 0 2px;
  font-size: var(--fs-note);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  scroll-margin-top: 90px; line-height: var(--lh-note);
}
.help .topics-section-cap:first-child {
  margin-top: 4px;
}

.help .topic-card {
  background: #fff;
  border: 1px solid #e6eef4;
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow 0.16s ease, border-color 0.16s ease;
}
.help .topic-card:hover {
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}
.help .topic-card.open {
  border-color: #bae6fd;
  box-shadow: 0 10px 26px rgba(2, 132, 199, 0.1);
}

.help .topic-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}
.help .topic-head .topic-ic {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e0f2fe;
  color: #0284c7;
}
.help .topic-head .topic-ic svg {
  width: 22px;
  height: 22px;
}
.help .topic-head .topic-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.help .topic-head .topic-text .topic-title {
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--ink-heading); line-height: var(--lh-h3);
}
.help .topic-head .topic-text .topic-summary {
  font-size: var(--fs-note);
  color: var(--ink-muted);
  margin-top: 2px; line-height: var(--lh-note);
}
.help .topic-head .topic-caret {
  color: var(--ink-muted);
  font-size: 20px;
  line-height: 1;
  transition: transform 0.18s ease;
}
.help .topic-head .topic-caret.up {
  transform: rotate(180deg);
  color: #0284c7;
}

.help .topic-body {
  padding: 4px 20px 22px 74px;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ═══ Обикновена тема ═══ */
.help .prose p {
  font-size: var(--fs-body);
  color: var(--ink-body);
  line-height: var(--lh-body);
  margin: 0 0 12px;
  max-width: none;
}
.help .prose p:last-child {
  margin-bottom: 0;
}
/* `.prose p strong { color: #0f172a; font-weight: 700 }` от старата НЕ се пренася: там параграфите идват през [innerHTML],
   капсулираният стил не стига до <strong> и той е с цвета на параграфа (#475569), удебелен от браузъра (решение на Тео,
   15.10.2026: като в старата) */

/* Ограничаваме реда и на текста в walkthrough стъпките */
.help .walk .walk-text {
  max-width: none;
}

/* Текст веднага след walkthrough (напр. „премахване") — отделен с тънка линия */
.help .walk + .prose {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #eef2f6;
}

/* Пациентските снимки по-малки + центрирани — лекарят (.has-nav) непроменен */
.help .help-layout.is-patient .walk-stage .shot,
.help .help-layout.is-patient .topic-shot {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

/* Единична илюстрация към описателна тема (рамка като „продуктов" екран) */
.help .topic-shot {
  margin: 16px 0 0;
  max-width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 30px rgba(2, 132, 199, 0.12);
}
.help .topic-shot .shot-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  background: #f1f5f9;
  border-bottom: 1px solid #e6eef4;
}
.help .topic-shot .shot-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #cbd5e1;
}
.help .topic-shot .shot-bar i:nth-child(1) {
  background: #f4a9a9;
}
.help .topic-shot .shot-bar i:nth-child(2) {
  background: #f6d39a;
}
.help .topic-shot .shot-bar i:nth-child(3) {
  background: #a3dcb4;
}
.help .topic-shot img {
  display: block;
  width: 100%;
  height: auto;
}
.help .topic-shot figcaption {
  padding: 9px 13px;
  font-size: var(--fs-note);
  color: var(--ink-muted);
  border-top: 1px solid #f1f5f9; line-height: var(--lh-note);
}

@media (max-width: 767px) {
  .help .topic-shot {
    max-width: 100%;
  }
}
/* ═══ Легенда (цветовете от графика) ═══ */
.help .legend {
  margin-top: 14px;
  padding: 14px 16px;
  background: #f8fbfe;
  border: 1px solid #e6eef4;
  border-radius: 12px;
}
.help .legend .legend-cap {
  font-size: var(--fs-note);
  font-weight: 600;
  color: var(--ink-body);
  margin: 0 0 10px; line-height: var(--lh-note);
}
.help .legend .legend-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.help .legend .legend-row + .legend-row {
  margin-top: 8px;
}
.help .legend .legend-swatch {
  flex-shrink: 0;
  width: 26px;
  height: 20px;
  border-radius: 5px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  /* Реалните цветове от графика (day-view/week-view) */
}
.help .legend .legend-swatch.sw-free {
  background: #dcfce7;
}
.help .legend .legend-swatch.sw-booked {
  background: #fee2e2;
}
.help .legend .legend-swatch.sw-blocked {
  background: #d1d5db;
}
.help .legend .legend-swatch.sw-hidden {
  background-color: #fff;
  background-image: repeating-linear-gradient(45deg, rgba(107, 114, 128, 0.18), rgba(107, 114, 128, 0.18) 4px, rgba(107, 114, 128, 0.05) 4px, rgba(107, 114, 128, 0.05) 8px);
}
.help .legend .legend-text {
  font-size: var(--fs-note);
  color: var(--ink-body);
  line-height: var(--lh-note);
}

/* ═══ Сравнителна таблица (скрито vs блокирано и т.н.) ═══ */
.help .help-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
}

.help .help-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-note);
  color: var(--ink-body); line-height: var(--lh-note);
}
.help .help-table th, .help .help-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1.5px solid #dbe4ee;
  white-space: nowrap;
}
.help .help-table td:first-child, .help .help-table th:first-child {
  white-space: normal;
  font-weight: 600;
  color: var(--ink-heading);
}
.help .help-table td:last-child, .help .help-table th:last-child {
  white-space: normal;
}
.help .help-table thead th {
  background: #e3f0fb;
  font-size: var(--fs-note);
  font-weight: 700;
  color: var(--ink-body);
  text-transform: none; line-height: var(--lh-note);
}
.help .help-table tbody tr:last-child td {
  border-bottom: none;
}
.help .help-table tbody tr:hover td {
  background: #fafcff;
}

/* ═══ „Виж и…" — линкове към свързани теми ═══ */
.help .related {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.help .related .related-cap {
  font-size: var(--fs-note);
  font-weight: 600;
  color: var(--ink-muted); line-height: var(--lh-note);
}
.help .related .related-link {
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  color: var(--ink-link);
  font-size: var(--fs-note);
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s; line-height: var(--lh-note);
}
.help .related .related-link:hover {
  background: #e0f2fe;
}

/* ═══ Walkthrough ═══ */
.help .walk .walk-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.help .walk .walk-progress .walk-dot {
  height: 5px;
  flex: 1;
  border-radius: 999px;
  background: #e2e8f0;
  transition: background 0.2s ease;
}
.help .walk .walk-progress .walk-dot.done {
  background: #7dd3fc;
}
.help .walk .walk-progress .walk-dot.active {
  background: #0ea5e9;
}
.help .walk .walk-stage {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  /* плъзгането наляво/надясно сменя стъпката (help.js, № 10); браузърът — само превъртане нагоре/надолу и приближаване */
  touch-action: pan-y pinch-zoom;
  /* Рамкирана реална снимка — голяма, ползва цялата ширина на темата */
}
.help .walk .walk-stage .walk-num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #0ea5e9;
  color: #fff;
  font-weight: 700;
  font-size: var(--fs-h3);
  display: flex;
  align-items: center;
  justify-content: center; line-height: var(--lh-h3);
}
.help .walk .walk-stage .walk-content {
  flex: 1;
}
.help .walk .walk-stage .walk-text {
  font-size: var(--fs-body);
  color: var(--ink-body);
  line-height: var(--lh-body);
  margin: 4px 0 14px;
}
.help .walk .walk-stage .shot-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 260px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fbfe;
  color: var(--ink-muted);
}
.help .walk .walk-stage .shot-placeholder span {
  font-weight: 600;
  font-size: var(--fs-small); line-height: var(--lh-small);
}
.help .walk .walk-stage .shot-placeholder small {
  font-size: var(--fs-tiny);
  color: var(--ink-muted); line-height: var(--lh-tiny);
}
.help .walk .walk-stage .shot {
  margin: 0;
  max-width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 30px rgba(2, 132, 199, 0.12);
}
.help .walk .walk-stage .shot .shot-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  background: #f1f5f9;
  border-bottom: 1px solid #e6eef4;
}
.help .walk .walk-stage .shot .shot-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #cbd5e1;
}
.help .walk .walk-stage .shot .shot-bar i:nth-child(1) {
  background: #f4a9a9;
}
.help .walk .walk-stage .shot .shot-bar i:nth-child(2) {
  background: #f6d39a;
}
.help .walk .walk-stage .shot .shot-bar i:nth-child(3) {
  background: #a3dcb4;
}
.help .walk .walk-stage .shot img {
  display: block;
  width: 100%;
  height: auto;
}
.help .walk .walk-stage .shot figcaption {
  padding: 9px 13px;
  font-size: var(--fs-note);
  color: var(--ink-muted);
  border-top: 1px solid #f1f5f9; line-height: var(--lh-note);
}
.help .walk .walk-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}
.help .walk .walk-actions .walk-btn {
  padding: 9px 20px;
  font-size: var(--fs-small);
  font-weight: 600;
  font-family: inherit;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  background: var(--btn-main);
  color: #fff;
  transition: background 0.14s; line-height: var(--lh-small);
}
.help .walk .walk-actions .walk-btn:hover:not(:disabled) {
  background: var(--btn-main-hover);
}
.help .walk .walk-actions .walk-btn.ghost {
  background: #fff;
  color: var(--ink-muted);
  border: 1px solid #cbd5e1;
}
.help .walk .walk-actions .walk-btn.ghost:hover:not(:disabled) {
  background: #f1f5f9;
  color: var(--ink-body);
}
.help .walk .walk-actions .walk-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.help .walk .walk-actions .walk-count {
  font-size: var(--fs-note);
  color: var(--ink-muted);
  margin-left: auto; line-height: var(--lh-note);
}
.help .walk .walk-actions .walk-done {
  margin-left: auto;
  font-size: var(--fs-small);
  font-weight: 700;
  color: #16a34a;
  animation: pop 0.25s ease; line-height: var(--lh-small);
}

@keyframes pop {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  60% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
/* ═══ Празно състояние ═══ */
.help .empty {
  text-align: center;
  padding: 40px 20px;
}
.help .empty .empty-title {
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--ink-body);
  margin: 0 0 6px; line-height: var(--lh-h3);
}
.help .empty .empty-sub {
  font-size: var(--fs-small);
  color: var(--ink-muted);
  margin: 0; line-height: var(--lh-small);
}
.help .empty a {
  color: var(--ink-link);
  text-decoration: underline;
}

/* ═══ Таблет (≤991px): навигацията става хоризонтални чипове над темите.
   991 = стандартният таблет праг на проекта — под него никъде няма 2-колонен изглед. ═══ */
@media (max-width: 991px) {
  .help .help-layout.has-nav {
    display: block;
  }
  .help .side-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 6px;
    margin-bottom: 12px;
    align-items: flex-start; /* хапчетата не се изтеглят до височината на най-високото */
  }
  .help .side-nav .side-cap, .help .side-nav .side-contact {
    display: none;
  }
  .help .side-nav .side-link {
    flex-shrink: 0;
    border: 1px solid #e6eef4;
    background: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    /* тема, по-широка от реда, пренася текста — иначе началото ѝ остава отрязано и при плъзгане докрай
       („За потребители на продуктите на „Нисет““ на 320; доклад 04.11, № 15; DECISIONS „Изглед 09.11 — „Помощ“…“) */
    max-width: 100%;
  }
}
/* ═══ Мобилно (≤767px — стандартът на проекта, съвпада с ResponsiveService.isHandset$) ═══ */
@media (max-width: 767px) {
  .help .help-wrap {
    padding: 36px 16px 40px;
  }
  .help .role-header h1 {
    font-size: var(--fs-h1); line-height: var(--lh-h1);
}
  /* Темите заемат цялата ширина (иконата на реда, без дълбок ляв отстъп) */
  .help .topic-head {
    padding: 16px;
    gap: 12px;
  }
  .help .topic-body {
    padding: 4px 16px 20px;
  }
  /* Walkthrough: номерът застава НАД текста → снимката ползва цялата ширина */
  .help .walk .walk-stage {
    flex-direction: column;
    gap: 10px;
  }
  .help .walk .walk-stage .walk-num {
    width: 30px;
    height: 30px;
    font-size: var(--fs-h3); line-height: var(--lh-h3);
}
  .help .walk .shot {
    max-width: 100%;
  }
  /* Бутоните долу да не преливат на тесен екран */
  .help .walk .walk-actions {
    flex-wrap: wrap;
    gap: 10px;
  }
  .help .walk .walk-actions .walk-btn {
    padding: 10px 18px;
  }
}

/* Сензорен екран: зона за докосване поне 44px (Обща визия) */
@media (pointer: coarse) {
  .help .chips .chip { display: inline-flex; align-items: center; min-height: 44px; }
}
