/* Help page (help.php): Help Bot chat, common questions, contact. */

.help-main {
  display: grid;
  gap: 1.25rem;
  max-width: 46rem;
}

.help-hero {
  padding: 1rem 0 0.5rem;
  text-align: center;
}

.help-hero__title {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 5vw, 2.625rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--profile2-text);
}

.help-hero__lead {
  max-width: 34rem;
  margin: 0 auto;
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--profile2-muted);
}

.help-card {
  padding: 1.5rem;
  background: var(--profile2-card);
  border: 1px solid var(--profile2-border);
  border-radius: var(--profile2-radius);
  box-shadow: var(--profile2-shadow);
  box-sizing: border-box;
}

.help-section-title {
  margin: 0 0 0.25rem;
  font-size: var(--sda-heading-4, 1.25rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--profile2-text);
}

/* Chat */

.help-chat {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.help-chat__head {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.help-chat__avatar {
  flex: 0 0 3rem;
  width: 3rem;
  height: 3rem;
}

.help-chat__heading {
  flex: 1 1 auto;
  min-width: 0;
}

.help-chat__title {
  margin: 0;
  font-size: var(--sda-heading-4, 1.25rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--profile2-text);
}

.help-chat__sub {
  margin: 0.125rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--profile2-muted);
}

.help-chat__open {
  flex: 0 0 auto;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--profile2-text);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.help-chat__open:hover {
  color: var(--profile2-accent);
}

.help-chat__log {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 9rem;
  max-height: min(50vh, 26rem);
  padding: 1rem;
  overflow-y: auto;
  background: var(--profile2-bg);
  border: 1px solid var(--profile2-border);
  border-radius: 14px;
  -webkit-overflow-scrolling: touch;
}

.help-chat__status {
  margin: auto;
  font-size: 0.9375rem;
  color: var(--profile2-muted);
  text-align: center;
}

.help-chat__row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

.help-chat__row--me {
  justify-content: flex-end;
}

.help-chat__row-avatar {
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
}

.help-chat__bubble {
  max-width: min(85%, 30rem);
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--profile2-border);
  border-radius: 1rem;
  border-bottom-left-radius: 0.375rem;
  background: var(--profile2-card);
  color: var(--profile2-text);
  font-size: 1rem;
  line-height: 1.5;
  text-align: left;
  white-space: pre-line;
  word-break: break-word;
}

.help-chat__row--me .help-chat__bubble {
  border-color: rgba(31, 200, 219, 0.28);
  border-radius: 1rem;
  border-bottom-right-radius: 0.375rem;
  background: rgba(31, 200, 219, 0.14);
}

.help-chat__bubble a {
  color: var(--profile2-text);
  font-weight: 600;
  text-decoration: underline;
}

.help-chat__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.help-chat__chips[hidden],
.help-chat__form[hidden],
.help-chat__guest[hidden],
.help-chat__open[hidden] {
  display: none;
}

.help-chat button.help-chat__chip {
  height: auto;
  margin: 0;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--profile2-border);
  border-radius: 999px;
  background: var(--profile2-card);
  color: var(--profile2-text);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.help-chat__chip:hover {
  background: var(--profile2-bg);
  border-color: #d1d5db;
  color: var(--profile2-text);
}

/* Composer: one pill holding the field and a round send button. Selectors are
   doubled up to win over the base form styles (skeleton.css). */
.help-chat form.help-chat__form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.375rem 0.375rem 0.375rem 1.25rem;
  border: 1px solid var(--profile2-border);
  border-radius: 999px;
  background: var(--profile2-card);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.help-chat form.help-chat__form:focus-within {
  border-color: var(--profile2-text);
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

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

.help-chat input.help-chat__input,
.help-chat input.help-chat__input:focus {
  flex: 1 1 auto;
  min-width: 0;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
  color: var(--profile2-text);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
}

.help-chat input.help-chat__input::placeholder {
  color: var(--profile2-muted);
  opacity: 1;
}

.help-chat button.help-chat__send {
  flex: 0 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--profile2-text);
  color: #fff;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.help-chat button.help-chat__send svg {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
}

.help-chat button.help-chat__send:hover,
.help-chat button.help-chat__send:focus {
  background: #000;
  color: #fff;
}

.help-chat button.help-chat__send:disabled {
  opacity: 0.4;
  cursor: default;
}

.help-chat__guest {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.help-chat__guest p {
  margin: 0;
  color: var(--profile2-muted);
}

/* Common questions */

.help-faq__group {
  margin: 1.5rem 0 0.25rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--profile2-muted);
}

.help-faq__item {
  border-bottom: 1px solid var(--profile2-border);
}

.help-faq__list .help-faq__item:last-child {
  border-bottom: 0;
}

.help-faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9375rem 0;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--profile2-text);
  list-style: none;
  cursor: pointer;
}

.help-faq__item summary::-webkit-details-marker {
  display: none;
}

.help-faq__item summary::after {
  content: "";
  flex: 0 0 0.5rem;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.25rem;
  border-right: 2px solid var(--profile2-muted);
  border-bottom: 2px solid var(--profile2-muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.help-faq__item[open] summary::after {
  transform: rotate(-135deg);
}

.help-faq__item summary:hover {
  color: var(--profile2-accent);
}

.help-faq__item p {
  margin: 0;
  padding: 0 1.5rem 1.125rem 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--profile2-muted);
}

.help-faq__item a {
  color: var(--profile2-text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.help-faq__item a:hover {
  color: var(--profile2-accent);
}

/* Contact */

.help-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.help-contact__text {
  max-width: 26rem;
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--profile2-muted);
}

@media (max-width: 480px) {
  .help-card {
    padding: 1.125rem;
  }

  .help-chat__open {
    display: none;
  }

}
