/* Hosting help (/help/hosting/, W-09): the three big choices, the five answers and the contact card.
 * Loads after /content.css (notes, numbered steps, contact card). Every value comes from the tokens.
 * The answers are native <details>, so the page works without script. */

.hosting-help { padding-block: var(--space-40) var(--space-56); }

@media (min-width: 1024px) {
  .hosting-help { padding-block: var(--space-72) var(--space-96); }
}

.hosting-help__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
  max-width: calc(880px + 2 * var(--page-gutter));
}

.hosting-help__intro {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.hosting-help__intro .page-intro__lead { margin-block-start: 0; }

/* The three big choices (and the two smaller links) open their answers below. Each links to the
 * answer inside its <details> (#duplicate-answer): following a link into a closed <details> opens
 * it with no script (the HTML standard's ancestor revealing algorithm), while a link to the
 * <details> itself (#duplicate) would only scroll to the closed question. */
.choice-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-12);
  margin-block-start: var(--space-8);
}

@media (min-width: 768px) {
  .choice-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.choice-card {
  --state-layer: 0%;
  --state-color: color-mix(in srgb, currentColor var(--state-layer), transparent);
  display: flex;
  align-items: center;
  gap: var(--space-16);
  height: 100%;
  min-height: var(--size-row);
  padding: var(--space-16);
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-card);
  background-color: var(--color-surface);
  background-image: linear-gradient(var(--state-color), var(--state-color));
  color: var(--color-text);
  font-size: var(--type-app-title-m-size);
  line-height: var(--type-app-title-m-line);
  font-weight: var(--type-app-title-m-weight);
  text-decoration: none;
}

.choice-card:hover { --state-layer: calc(var(--state-hover) * 100%); }
.choice-card:focus-visible { --state-layer: calc(var(--state-focus) * 100%); }
.choice-card:active { --state-layer: calc(var(--state-pressed) * 100%); }

.choice-card__tile {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--size-touch-min);
  height: var(--size-touch-min);
  border-radius: var(--radius-s);
  background-color: var(--color-primary-container);
  color: var(--color-on-primary-container);
}

.choice-card__title { flex: 1; min-width: 0; }
.choice-card__arrow { width: var(--size-icon-compact); height: var(--size-icon-compact); color: var(--color-text-2); }

@media (min-width: 768px) {
  .choice-card {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-12);
    padding: var(--space-24);
    font-size: var(--type-app-title-l-size);
    line-height: var(--type-app-title-l-line);
    font-weight: var(--type-app-title-l-weight);
  }

  .choice-card__tile { width: var(--content-tile); height: var(--content-tile); border-radius: var(--radius-m); }
  .choice-card__arrow { margin-block-start: auto; }
}

.choice-more {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-24);
}

.choice-more a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  min-height: var(--size-touch-min);
  font-size: var(--type-app-label-l-size);
  line-height: var(--type-app-label-l-line);
  font-weight: var(--type-app-label-l-weight);
}

.choice-more .icon { width: var(--size-icon-compact); height: var(--size-icon-compact); }

/* The answers: Figma FAQ item 26:352 (a question that opens in place). */
.help-choices {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  margin-block-start: var(--space-16);
}

.faq {
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-card);
  background-color: var(--color-surface);
}

/* Arriving from a choice above (or an address naming a question or its answer): that question is
 * outlined. */
.faq:is(:target, :has(> .faq__answer:target)) { border-color: var(--color-primary); box-shadow: inset 0 0 0 1px var(--color-primary); }

.faq > summary {
  --state-layer: 0%;
  --state-color: color-mix(in srgb, currentColor var(--state-layer), transparent);
  display: flex;
  align-items: center;
  gap: var(--space-16);
  min-height: var(--size-row);
  padding: var(--space-16) var(--space-20);
  border-radius: var(--radius-card);
  background-image: linear-gradient(var(--state-color), var(--state-color));
  color: var(--color-text);
  font-size: var(--type-app-title-m-size);
  line-height: var(--type-app-title-m-line);
  font-weight: var(--type-app-title-m-weight);
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.faq > summary::-webkit-details-marker { display: none; }
.faq > summary:hover { --state-layer: calc(var(--state-hover) * 100%); }
.faq > summary:focus-visible { --state-layer: calc(var(--state-focus) * 100%); }
.faq[open] > summary { border-end-start-radius: 0; border-end-end-radius: 0; }

.faq__question { flex: 1; min-width: 0; }

.faq__chevron {
  color: var(--color-text-2);
  transition: transform var(--motion-base) var(--ease-standard);
}

.faq[open] .faq__chevron { transform: rotate(180deg); }

.faq__answer {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  padding: 0 var(--space-20) var(--space-24);
  color: var(--color-text-2);
  /* A choice scrolls to the answer, which starts right under its question: stop one question
   * height higher (64 px rows; 80 px when the question wraps to two lines on a phone), so the
   * question stays in view below the sticky header (base.css adds the header's scroll padding). */
  scroll-margin-block-start: calc(var(--size-row) + var(--space-16));
}

.faq__answer strong { color: var(--color-text); }

.faq__answer h2 {
  margin-block-start: var(--space-8);
  color: var(--color-text);
  font-size: var(--type-app-title-m-size);
  line-height: var(--type-app-title-m-line);
  font-weight: var(--type-app-title-m-weight);
  letter-spacing: var(--type-app-title-m-tracking);
}

@media (min-width: 600px) {
  .faq > summary {
    padding-inline: var(--space-24);
    font-size: var(--type-app-title-l-size);
    line-height: var(--type-app-title-l-line);
    font-weight: var(--type-app-title-l-weight);
  }

  .faq__answer { padding: 0 var(--space-24) var(--space-24); }
}

/* Store and support links: outlined buttons that open the store's or the provider's page. */
.help-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
}

@media (max-width: 599.98px) {
  .help-links .button { width: 100%; }
}

/* The contact card here carries more: what to send, what never to send, three routes. */
.hosting-contact {
  align-items: flex-start;
  margin-block-start: var(--space-16);
}

.hosting-contact .contact-card__text { gap: var(--space-16); }
.hosting-contact .contact-card__body + .contact-card__body { margin-block-start: 0; }

@media (min-width: 600px) {
  .hosting-contact { flex-direction: row; }
}

.back-link { align-self: flex-start; }

@media (forced-colors: active) {
  .faq:is(:target, :has(> .faq__answer:target)) { outline: 2px solid Highlight; }
  .faq__chevron { transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  .faq__chevron { transition: none; }
}
