/*
 * Help Center — page-help.php + page-help-topic.php
 * Ported from the design prototype's Help.dc.html / HelpTopic.dc.html.
 * Breakpoint matches the rest of the site: 1024px (tablet and mobile share this breakpoint).
 */

.rpr-help {
  font-family: var(--rpr-font);
  color: var(--rpr-text);
  background: #fff;
}

/* ---------- Hero (landing) ---------- */

.rpr-help-hero {
  background: var(--rpr-navy);
  color: #fff;
  padding: 56px 28px 60px;
}

.rpr-help-hero-inner {
  max-width: 840px;
  margin: 0 auto;
  text-align: center;
}

.rpr-help-hero-title {
  margin: 0 0 12px;
  font-size: 38px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.rpr-help-hero-sub {
  margin: 0 0 26px;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
}

.rpr-help-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: var(--rpr-radius-pill);
  padding: 6px 6px 6px 18px;
  max-width: 560px;
  margin: 0 auto;
}

.rpr-help-search svg {
  flex: 0 0 auto;
}

.rpr-help-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  color: var(--rpr-text);
  background: transparent;
  padding: 10px 0;
}

.rpr-help-search input::placeholder {
  color: #9aa1ae;
}

/* ---------- Section title ---------- */

.rpr-help-section-title {
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 700;
}

/* ---------- Topic grid ---------- */

.rpr-help-topics-section {
  max-width: 1440px;
  margin: 0 auto;
  padding: 48px 28px 8px;
}

.rpr-help-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.rpr-help-topic-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  padding: 20px;
  border-radius: var(--rpr-radius-lg);
  cursor: pointer;
  font-family: inherit;
  background: #fff;
  border: 1px solid var(--rpr-border);
  text-decoration: none;
  transition:
    box-shadow 0.15s,
    border-color 0.15s;
}

.rpr-help-topic-card:hover {
  border-color: var(--rpr-navy);
  box-shadow: 0 6px 18px rgba(20, 30, 60, 0.09);
}

.rpr-help-topic-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--rpr-text);
}

.rpr-help-topic-blurb {
  font-size: 13px;
  color: var(--rpr-text-secondary);
  line-height: 1.5;
}

.rpr-help-topic-count {
  font-size: 12px;
  color: var(--rpr-text-faint);
}

/* ---------- FAQ landing list ---------- */

.rpr-help-faq-section {
  max-width: 1440px;
  margin: 0 auto;
  padding: 44px 28px 56px;
}

.rpr-help-faq-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.rpr-help-faq-header .rpr-help-section-title {
  margin-bottom: 0;
}

.rpr-help-clear-btn {
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--rpr-blue);
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  flex: 0 0 auto;
  white-space: nowrap;
}

.rpr-help-faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rpr-help-faq-item {
  border: 1px solid var(--rpr-border);
  border-radius: var(--rpr-radius-md);
  overflow: hidden;
}

.rpr-help-faq-item.is-hidden {
  display: none;
}

.rpr-help-faq-q {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  background: #fff;
  border: 0;
  padding: 18px 20px;
  cursor: pointer;
  font-family: inherit;
}

.rpr-help-faq-q:hover {
  background: var(--rpr-bg-hover-3);
}

.rpr-help-faq-q-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rpr-help-faq-q-main {
  font-size: 15px;
  font-weight: 600;
  color: var(--rpr-text);
}

.rpr-help-faq-q-topic {
  font-size: 12px;
  color: var(--rpr-text-faint);
}

.rpr-help-faq-chevron {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  transition: transform 0.18s;
}

.rpr-help-faq-q[aria-expanded="true"] .rpr-help-faq-chevron {
  transform: rotate(180deg);
}

.rpr-help-faq-a {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rpr-help-answer-heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--rpr-text);
  margin-bottom: 4px;
}

.rpr-help-answer-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #4a5568;
  white-space: pre-line;
}

.rpr-help-empty {
  border: 1px dashed var(--rpr-border-strong);
  border-radius: var(--rpr-radius-md);
  padding: 36px;
  text-align: center;
  color: var(--rpr-text-secondary);
  font-size: 14px;
}

/* ---------- Contact channels ---------- */

.rpr-help-contact-section {
  border-top: 1px solid var(--rpr-border-faint);
  background: var(--rpr-bg-hover-3);
  scroll-margin-top: calc(var(--rpr-header-height) + 24px);
}

.rpr-help-channels {
  max-width: 1440px;
  margin: 0 auto;
  padding: 48px 28px 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  align-items: stretch;
}

.rpr-help-channels-heading {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

.rpr-help-channels-heading .rpr-help-section-title {
  margin-bottom: 6px;
}

.rpr-help-channels-sub {
  margin: 0;
  font-size: 14px;
  color: var(--rpr-text-secondary);
}

.rpr-help-channel-card {
  background: #fff;
  border: 1px solid var(--rpr-border);
  border-radius: var(--rpr-radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rpr-help-channel-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--rpr-text);
}

.rpr-help-channel-detail {
  font-size: 13px;
  line-height: 1.6;
  color: var(--rpr-text-secondary);
}

.rpr-help-channel-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--rpr-blue);
  margin-top: auto;
  padding-top: 10px;
}

/* =========================================================
   Single topic view (page-help-topic.php)
   ========================================================= */

.rpr-help-topic-hero {
  background: var(--rpr-navy);
  color: #fff;
  padding: 44px 28px 48px;
}

.rpr-help-topic-hero-inner {
  max-width: 1440px;
  margin: 0 auto;
}

.rpr-help-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 16px;
}

.rpr-help-breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.rpr-help-breadcrumb a:hover {
  color: #fff;
}

.rpr-help-breadcrumb-current {
  color: #fff;
}

.rpr-help-topic-title {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.rpr-help-topic-blurb-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  max-width: 60ch;
}

.rpr-help-topic-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 44px 28px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 44px;
  align-items: start;
}

.rpr-help-topic-trigger {
  display: none;
}

.rpr-help-topic-count-label {
  font-size: 13px;
  color: var(--rpr-text-faint);
  margin-bottom: 16px;
}

.rpr-help-articles {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.rpr-help-article {
  border-bottom: 1px solid var(--rpr-border-faint);
  padding-bottom: 24px;
}

.rpr-help-article-q {
  margin: 0 0 24px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
}

.rpr-help-article-blocks {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rpr-help-article-blocks .rpr-help-answer-heading {
  font-size: 15px;
}

.rpr-help-article-blocks .rpr-help-answer-text {
  font-size: 15px;
  line-height: 1.75;
  color: #4a5568;
}

.rpr-help-cta-row {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--rpr-border);
  border-radius: var(--rpr-radius-lg);
  padding: 20px 22px;
  background: var(--rpr-bg-hover-3);
}

.rpr-help-cta-row span {
  font-size: 14px;
  color: #4a5568;
  flex: 1;
}

.rpr-help-cta-row a {
  font-size: 14px;
  font-weight: 700;
  color: var(--rpr-blue);
  text-decoration: none;
  white-space: nowrap;
}

.rpr-help-cta-row a:hover {
  color: var(--rpr-blue-dark);
}

/* Sidebar (desktop) */

.rpr-help-aside {
  position: sticky;
  top: calc(var(--rpr-header-height) + 24px);
  border: 1px solid var(--rpr-border);
  border-radius: var(--rpr-radius-lg);
  padding: 18px;
}

.rpr-help-aside-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rpr-text-faint);
  margin-bottom: 12px;
}

.rpr-help-aside-nav,
.rpr-help-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rpr-help-topic-nav-link {
  padding: 9px 11px;
  border-radius: var(--rpr-radius-sm);
  font-size: 14px;
  text-decoration: none;
  background: transparent;
  color: #4a5568;
  font-weight: 500;
}

.rpr-help-topic-nav-link:hover {
  background: var(--rpr-bg-hover-2);
}

.rpr-help-topic-nav-link.is-active {
  background: var(--rpr-bg-selected);
  color: var(--rpr-navy);
  font-weight: 700;
}

/* Mobile drawer */

.rpr-help-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(10, 12, 20, 0.5);
}

.rpr-help-drawer-overlay[hidden] {
  display: none;
}

.rpr-help-drawer {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(300px, 84vw);
  background: #fff;
  box-shadow: 8px 0 24px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  padding: 20px;
  padding-top: calc(20px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  box-sizing: border-box;
}

.rpr-help-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.rpr-help-drawer-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--rpr-text);
}

.rpr-help-drawer-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: var(--rpr-bg-hover-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
  padding: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .rpr-help-hero {
    padding: 40px 18px 40px;
  }

  .rpr-help-hero-title {
    font-size: 28px;
  }

  .rpr-help-topics-section {
    padding: 40px 18px 8px;
  }

  .rpr-help-faq-section {
    padding: 40px 18px 48px;
  }

  .rpr-help-channels {
    padding: 40px 18px 48px;
    /* 400px tiles force a single column well before desktop width
		   runs out (two tiles + gap don't fit under ~968px of content),
		   leaving tablet widths looking sparse; a smaller tile lets the
		   grid keep 2 columns down through the tablet range. */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .rpr-help-topic-hero {
    padding: 34px 18px 36px;
  }

  .rpr-help-topic-title {
    font-size: 26px;
  }

  .rpr-help-topic-main {
    grid-template-columns: minmax(0, 1fr);
    padding: 36px 18px 48px;
  }

  .rpr-help-aside {
    display: none;
  }

  .rpr-help-topic-trigger {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    border: 1px solid var(--rpr-border-strong);
    border-radius: var(--rpr-radius-md);
    padding: 12px 14px;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    margin-bottom: 20px;
  }

  .rpr-help-topic-trigger-label {
    flex: 1;
    text-align: left;
    font-size: 13px;
    color: var(--rpr-text-faint);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .rpr-help-topic-trigger-current {
    font-size: 15px;
    font-weight: 700;
    color: var(--rpr-text);
  }

  .rpr-help-faq-q-text {
    gap: 3px;
  }
}
