/* Help Center — Figma-aligned styles (Phase 1 + Phase 2) */

html.help-scroll-locked,
body.help-scroll-locked {
  overflow: hidden;
}

.help-center-hub__title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

@media screen and (min-width: 1024px) {
  .help-center-hub__title {
    font-size: 48px;
  }
}

.help-center-hub__header {
  margin-bottom: 40px;
}

.help-center-hub__search-wrap {
  margin-top: 40px;
  max-width: 800px;
}

.help-search-bar {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 800px;
}

.help-search-bar__field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-right: none;
  border-radius: 8px 0 0 8px;
  min-height: 48px;
}

.help-search-bar__icon {
  color: rgba(0, 0, 0, 0.3);
  display: flex;
}

.help-search-bar__input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  background: transparent;
  color: #000;
}

.help-search-bar__input::placeholder {
  color: rgba(0, 0, 0, 0.3);
}

.help-search-bar__button {
  border: none;
  background: #000;
  color: #fff;
  padding: 0 30px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  min-height: 48px;
}

.help-center-hub__layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.help-center-hub__sidebar {
  flex: 0 0 320px;
  max-width: 320px;
}

.help-center-hub__sidebar-inner {
  background: #f5f5f6;
  padding: 20px 0;
}

.help-center-hub__nav-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-bottom: 12px;
  padding: 12px 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
}

.help-center-hub__nav-toggle-label {
  font-weight: 600;
  color: #000;
}

.help-center-hub__nav-toggle-value {
  color: rgba(0, 0, 0, 0.5);
  flex: 1;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.help-center-hub__nav-toggle-icon {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #000;
  border-bottom: 1.5px solid #000;
  transform: rotate(45deg);
  flex-shrink: 0;
}

.help-center-hub__drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1;
}

.help-center-hub__drawer-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.help-center-hub__drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #000;
  border-radius: 50%;
}

.help-center-hub__drawer-close:hover {
  background: rgba(0, 0, 0, 0.05);
}

.help-center-hub__main {
  flex: 1;
  min-width: 0;
}

.help-center-hub__count {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.5);
  margin: 0 0 16px;
}

.help-center-hub__count [data-help-results-suffix]::before {
  content: " ";
}

.help-center-hub__nav-toggle-count {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

.help-center-hub__results {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.help-center-hub__empty,
.help-center-hub__loading {
  color: rgba(0, 0, 0, 0.5);
  font-size: 14px;
}

.help-nav-node__row {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.help-nav-node__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding: 14px 8px 14px 0;
  border: none;
  background: transparent;
  color: #000;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.help-nav-node__title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.help-nav-node__count {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
  font-weight: 400;
  flex-shrink: 0;
}

.help-nav-node__link.is-active .help-nav-node__count {
  color: rgba(0, 0, 0, 0.5);
  font-weight: 600;
}

.help-nav-node__row:hover {
  background: rgba(0, 0, 0, 0.03);
}

.help-nav-node__link.is-active {
  font-weight: 700;
}

.help-nav-node__row:has(.help-nav-node__link.is-active) {
  background: #f0f0f0;
}

.help-nav-node__link.has-children .help-nav-node__title {
  font-weight: 700;
}

.help-nav-node__link--all {
  width: 100%;
  padding: 14px 20px;
  border: none;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

.help-nav-node__link--all.is-active {
  background: #f0f0f0;
  font-weight: 700;
}

.help-nav-node__chevron-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  flex-shrink: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.help-nav-node__chevron {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #000;
  border-bottom: 1.5px solid #000;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.help-nav-node.is-expanded > .help-nav-node__row .help-nav-node__chevron {
  transform: rotate(45deg);
}

.help-nav-node__children {
  overflow: hidden;
}

.help-article-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.help-article-card__title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: #000;
}

.help-article-card__summary {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.7);
}

.help-article-card__meta {
  margin: 0;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.5);
}

.help-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin-top: 32px;
}

.help-pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #000;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  font-size: 16px;
}

.help-pagination__btn.is-disabled {
  opacity: 0.3;
  pointer-events: none;
}

.help-pagination__label {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.5);
}

.help-center-hub__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 40;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.help-center-hub__overlay.is-visible {
  opacity: 1;
}

/* Article detail */
.help-center-article__layout {
  display: flex;
  gap: 75px;
  align-items: flex-start;
}

.help-center-article__toc {
  flex: 0 0 345px;
  max-width: 345px;
}

.help-center-article__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: #000;
  font-size: 18px;
}

.help-center-article__toc-title {
  margin: 24px 0 16px;
  font-size: 24px;
  font-weight: 600;
}

.help-center-article__toc-list a {
  display: block;
  padding: 14px 0 14px 12px;
  margin-left: -12px;
  font-size: 14px;
  color: #000;
  text-decoration: none;
  line-height: 1.5;
  border-left: 2px solid transparent;
  transition: border-color 0.15s ease, font-weight 0.15s ease;
}

.help-center-article__toc-list a.is-active {
  font-weight: 700;
  border-left-color: #000;
}

.help-center-article__toc-list .toc-h3 {
  padding-left: 20px;
}

.help-center-article__body {
  flex: 1;
  min-width: 0;
  max-width: 800px;
}

.help-center-article__title {
  margin: 0 0 16px;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
}

.help-center-article__summary {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.7);
}

.help-center-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.5);
  margin-bottom: 32px;
}

.help-center-article__content {
  font-size: 16px;
  line-height: 1.7;
  color: #170b01;
}

.help-center-article__content img {
  max-width: 100%;
  height: auto;
}

.help-center-article__content h2,
.help-center-article__content h3 {
  scroll-margin-top: 80px;
}

.help-center-article__feedback {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.help-center-article__feedback-label {
  margin: 0 0 12px;
  font-weight: 600;
}

.help-center-article__feedback-actions {
  display: flex;
  gap: 12px;
}

.help-center-article__feedback-btn {
  padding: 8px 20px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
}

.help-center-article__feedback-btn:hover {
  background: #f5f5f6;
}

.help-center-article__feedback-thanks {
  margin-top: 12px;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.6);
}

.help-center-article__breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.5);
}

.help-center-article__breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.help-center-article__breadcrumbs a:hover {
  color: #000;
  text-decoration: underline;
}

.help-center-article__breadcrumbs-sep {
  opacity: 0.4;
}

.help-center-article__toc-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background: #f5f5f6;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.help-center-article__toc-toggle-icon {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #000;
  border-bottom: 1.5px solid #000;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.help-center-article__toc-toggle[aria-expanded="true"] .help-center-article__toc-toggle-icon {
  transform: rotate(-135deg);
}

.help-center-article__toc-panel {
  overflow: hidden;
}

@media (min-width: 1024px) {
  .help-center-article__toc {
    position: sticky;
    top: 96px;
    align-self: flex-start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }

  .help-center-article__toc-toggle {
    display: none;
  }

  .help-center-hub__nav-toggle,
  .help-center-hub__overlay {
    display: none;
  }

  .help-center-hub__drawer-header {
    display: none;
  }

  .help-center-hub__sidebar-inner {
    position: static;
    transform: none;
    box-shadow: none;
    display: block;
  }
}

@media (max-width: 1023px) {
  .help-center-hub__layout,
  .help-center-article__layout {
    flex-direction: column;
  }

  .help-center-hub__sidebar,
  .help-center-article__toc {
    flex: none;
    max-width: none;
    width: 100%;
  }

  .help-center-hub__sidebar-inner {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 85vw);
    z-index: 50;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    padding: 0;
  }

  .help-center-hub__sidebar-inner.is-open {
    transform: translateX(0);
  }

  .help-search-bar {
    flex-direction: column;
  }

  .help-search-bar__field {
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
  }

  .help-search-bar__button {
    border-radius: 4px;
    width: 100%;
  }

  .help-center-article__title {
    font-size: 28px;
  }

  .help-center-article__toc {
    order: -1;
  }

  .help-center-article__toc-panel:not(.is-open) .help-center-article__toc-list {
    display: none;
  }

  .help-center-article__toc-panel.is-open .help-center-article__toc-title {
    display: block;
    margin-top: 8px;
  }

  .help-center-article__toc-panel:not(.is-open) .help-center-article__toc-title {
    display: none;
  }

  .help-center-article__back {
    display: none;
  }
}
