/*=============== HELP CENTRE ===============*/
/* Extends legal.css (which extends privacy.css / styles.css) for the Help Centre:
   the hub (/help/), category pages (/help/<category>/) and articles
   (/help/<category>/<slug>/). Generated pages: edit legal-src/help/**, then
   run legal-src/build.py. */
@import url('/assets/css/legal.css');

.help { padding-bottom: var(--mb-3); }

.help .privacy__container { 
  max-width: 1100px;
  margin-inline: auto; 
  margin-top: 8rem;
}

/* Reading width for an article body, narrower than the hub/category pages */
.help-article .privacy__container { max-width: 720px; margin-inline: auto; }

/*=============== BREADCRUMBS ===============*/
.help-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  font-size: var(--smaller-font-size);
  color: var(--text-color-light);
  margin-bottom: var(--mb-1-5);
}

.help-breadcrumbs a {
  color: var(--text-color-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.help-breadcrumbs a:hover,
.help-breadcrumbs a:focus-visible { color: var(--first-color); }

.help-breadcrumbs span[aria-current] { color: var(--title-color); font-weight: var(--font-medium); }

/*=============== HERO + SEARCH ===============*/
.help-hero {
  text-align: center;
  margin-bottom: var(--mb-2-5, 2.5rem);
}

.help-hero__title {
  font-size: var(--h2-font-size);
  font-weight: var(--font-medium);
  color: var(--title-color);
  margin-bottom: var(--mb-1);
}

.help-hero__subtitle {
  color: var(--text-color-light);
  font-size: var(--normal-font-size);
  max-width: 540px;
  margin: 0 auto var(--mb-2);
}

.help-search {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
}

.help-search__label {
  display: block;
  font-size: var(--smaller-font-size);
  font-weight: var(--font-medium);
  color: var(--title-color);
  margin-bottom: .4rem;
}

.help-search__box {
  position: relative;
  display: flex;
  align-items: center;
}

.help-search__icon {
  position: absolute;
  left: 1rem;
  font-size: 1.1rem;
  color: var(--text-color-light);
  pointer-events: none;
}

.help-search__input {
  width: 100%;
  min-height: 52px;
  padding: .85rem 1rem .85rem 2.75rem;
  border-radius: 1rem;
  border: 1px solid hsl(0, 0%, 85%);
  background-color: var(--container-color);
  color: var(--title-color);
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  transition: border-color .3s ease, box-shadow .3s ease;
}

.help-search__input::placeholder { 
  color: var(--text-color-light); 
  font-size: var(--small-font-size);
  opacity: 0.3; /* Firefox */
}

.help-search__input:focus-visible {
  outline: none;
  border-color: var(--first-color);
  box-shadow: 0 0 0 3px hsla(var(--hue), 87%, 53%, .18);
}


.help-search__results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + .5rem);
  background-color: var(--container-color);
  border: 1px solid hsl(0, 0%, 90%);
  border-radius: 1rem;
  box-shadow: 0 16px 32px -12px rgba(0, 0, 0, .18);
  max-height: 60vh;
  overflow-y: auto;
  z-index: 50;
  padding: .4rem;
}

.help-search__results:empty { display: none; }

.help-search__result {
  display: block;
  padding: .7rem .85rem;
  border-radius: .7rem;
  color: var(--title-color);
  text-decoration: none;
}

.help-search__result:hover,
.help-search__result:focus-visible,
.help-search__result.is-active {
  background-color: var(--body-color);
  outline: none;
}

.help-search__result-title {
  font-size: var(--normal-font-size);
  display: block;
  font-weight: var(--font-medium);
  margin-bottom: .15rem;
}

.help-search__result-title mark {
  background: none;
  color: var(--first-color);
  font-weight: var(--font-semi-bold);
}

.help-search__result-summary {
  display: block;
  font-size: var(--smaller-font-size);
  color: var(--text-color-light);
}

.help-search__result-category {
  display: inline-block;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--first-color);
  margin-top: .25rem;
}

.help-search__empty {
  padding: 1.1rem 1rem;
  text-align: center;
  color: var(--text-color-light);
  font-size: var(--small-font-size);
}

.help-search__empty a { color: var(--first-color); }

.help-search__status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Smaller search box reused in the header area of category/article pages */
.help-search--compact { max-width: 420px; margin: 0 0 var(--mb-2); }
.help-search--compact .help-search__input { min-height: 46px; font-size: var(--small-font-size); }

/*=============== CATEGORY GRID (hub) ===============*/
.help-category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 5rem;
  margin-top: var(--mb-3);
}

.help-category-card {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid hsl(0, 0%, 90%);
  background-color: var(--container-color);
  text-decoration: none;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.help-category-card:hover,
.help-category-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--first-color);
  box-shadow: 0 16px 28px -16px hsla(var(--hue), 87%, 53%, .35);
  outline: none;
}

.help-category-card__icon {
  width: 44px;
  height: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: .75rem;
  background-color: hsl(var(--hue), 87%, 96%);
  color: var(--first-color);
  font-size: 1.4rem;
}

.help-category-card__title {
  font-size: var(--h4-font-size);
  font-weight: var(--font-medium);
  color: var(--title-color);
}

.help-category-card__description {
  color: var(--text-color-light);
  font-size: var(--small-font-size);
  line-height: 1.5;
}

.help-category-card__count {
  margin-top: auto;
  font-size: var(--smaller-font-size);
  color: var(--first-color);
  font-weight: var(--font-medium);
}

/*=============== POPULAR QUESTIONS ===============*/
.help-section-title {
  font-size: var(--h2-font-size);
  font-weight: var(--font-medium);
  color: var(--title-color);
  margin-bottom: var(--mb-3);
}

.help-popular-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: var(--mb-3);
}

.help-popular-card {
  display: block;
  padding: 1.1rem 1.25rem;
  border-radius: .85rem;
  background-color: var(--body-color);
  text-decoration: none;
  min-height: 44px;
}

.help-popular-card__title {
  color: var(--title-color);
  font-weight: var(--font-medium);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.help-popular-card__title i { color: var(--first-color); flex-shrink: 0; }

.help-popular-card__summary {
  display: block;
  color: var(--text-color-light);
  font-size: var(--smaller-font-size);
  margin-top: .3rem;
}

.help-popular-card:hover .help-popular-card__title,
.help-popular-card:focus-visible .help-popular-card__title { color: var(--first-color); }

/*=============== CONTACT CARD ===============*/
.help-contact-card {
  background: linear-gradient(165deg, hsl(var(--hue), 87%, 97%), hsl(var(--hue), 87%, 93%));
  border-radius: 1.25rem;
  padding: 1.75rem;
  text-align: center;
}

.help-contact-card__title {
  font-size: var(--h3-font-size);
  font-weight: var(--font-semi-bold);
  color: var(--title-color);
  margin-bottom: .5rem;
}

.help-contact-card__text {
  color: var(--text-color);
  font-size: var(--small-font-size);
  margin-bottom: 1.1rem;
}

.help-contact-card__options {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  align-items: center;
  margin-bottom: 1.1rem;
  font-size: var(--small-font-size);
  color: var(--text-color);
}

.help-contact-card__options a { color: var(--first-color); font-weight: var(--font-medium); }

/*=============== CATEGORY PAGE: ARTICLE LIST ===============*/
.help-article-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  margin: 0 0 var(--mb-2);
}

.help-article-item a {
  display: block;
  padding: 1rem .25rem;
  min-height: 44px;
  border-bottom: 1px solid hsl(0, 0%, 92%);
  text-decoration: none;
}

.help-article-item:last-child a { border-bottom: none; }

.help-article-item__title {
  color: var(--title-color);
  font-weight: var(--font-medium);
}

.help-article-item__summary {
  display: block;
  color: var(--text-color-light);
  font-size: var(--small-font-size);
  margin-top: .2rem;
}

.help-article-item a:hover .help-article-item__title,
.help-article-item a:focus-visible .help-article-item__title { color: var(--first-color); }

/*=============== ARTICLE PAGE ===============*/
.help-article .privacy__text ol,
.help-article .privacy__text ul { margin-top: .5rem; }

.help-article-body ol {
  color: var(--text-color);
  font-size: var(--small-font-size);
  margin: 0 0 var(--mb-1-5) var(--mb-1-5);
}

.help-article-body ol li { margin-bottom: var(--mb-0-75); line-height: 1.65; padding-left: .25rem; }

.help-article-body p { color: var(--text-color); font-size: var(--small-font-size); line-height: 1.65; margin-bottom: var(--mb-1-5); }

.help-article-body ul { list-style: none; margin: 0 0 var(--mb-1-5); padding-left: var(--mb-1-5); }
.help-article-body ul li { position: relative; color: var(--text-color); font-size: var(--small-font-size); line-height: 1.6; margin-bottom: .5rem; padding-left: var(--mb-1); }
.help-article-body ul li::before { content: '•'; position: absolute; left: 0; color: var(--first-color); }

.help-article-body a { color: var(--first-color); text-decoration: underline; text-underline-offset: 2px; }

/*=============== RELATED + PAGER + FEEDBACK ===============*/
.help-related {
  margin-top: var(--mb-3);
  padding-top: var(--mb-2);
  border-top: 1px solid hsl(0, 0%, 90%);
}

.help-related__list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
  margin-top: 1rem;
}

.help-related__list a {
  display: block;
  padding: 1rem;
  border-radius: .75rem;
  background-color: var(--body-color);
  color: var(--title-color);
  font-weight: var(--font-medium);
  text-decoration: none;
  min-height: 44px;
}

.help-related__list a:hover,
.help-related__list a:focus-visible { color: var(--first-color); }

.help-pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: var(--mb-2);
  padding-top: var(--mb-1-5);
  border-top: 1px solid hsl(0, 0%, 90%);
}

.help-pager__link {
  display: flex;
  flex-direction: column;
  max-width: 48%;
  text-decoration: none;
  min-height: 44px;
  justify-content: center;
}

.help-pager__link--next { text-align: right; margin-left: auto; }

.help-pager__label {
  font-size: var(--smaller-font-size);
  color: var(--text-color-light);
}

.help-pager__title { color: var(--first-color); font-weight: var(--font-medium); }

.help-feedback {
  margin: var(--mb-2) 0;
  padding: 1.25rem;
  border-radius: 1rem;
  background-color: var(--body-color);
  text-align: center;
}

.help-feedback__question { font-weight: var(--font-medium); color: var(--title-color); margin-bottom: .75rem; }

.help-feedback__buttons { display: flex; justify-content: center; gap: .75rem; }

.help-feedback__button {
  min-width: 80px;
  min-height: 44px;
  padding: .5rem 1.25rem;
  border-radius: 2rem;
  border: 1px solid hsl(0, 0%, 85%);
  background-color: var(--container-color);
  color: var(--title-color);
  font-family: var(--body-font);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}

.help-feedback__button:hover,
.help-feedback__button:focus-visible {
  border-color: var(--first-color);
  color: var(--first-color);
  outline: none;
}

.help-feedback__thanks { color: var(--first-color); font-weight: var(--font-medium); }
/* [hidden] is fixed globally in styles.css (this page imports it via legal.css). */

/*=============== NO-RESULTS STATE ===============*/
.help-search__empty-links {
  margin-top: .6rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
}

/*=============== REDUCED MOTION ===============*/
@media (prefers-reduced-motion: reduce) {
  .help-category-card,
  .help-feedback__button { transition: none; }
}

/*=============== RESPONSIVE ===============*/
@media screen and (min-width: 640px) {
  .help-category-grid { grid-template-columns: repeat(2, 1fr); }
  .help-popular-grid { grid-template-columns: repeat(2, 1fr); }
  .help-related__list { grid-template-columns: repeat(3, 1fr); }
  .help-contact-card__options { flex-direction: row; justify-content: center; gap: 1.5rem; }
}

@media screen and (min-width: 1024px) {
  .help-category-grid { grid-template-columns: repeat(3, 1fr); }
}
