/* ============================================================
   Help & FAQ page — /support.html
   Self-serve first, contact form second. Restrained palette,
   1px borders, generous whitespace. No gradient banners.
   ============================================================ */

.help {
  font-family: 'Inter', 'Roboto', Arial, sans-serif;
  color: #111827;
  max-width: 1200px;
  margin: 0 auto;
  /* Top padding clears the fixed .navigation (~80px tall) on top of
     .first-container's existing 3rem padding. */
  padding: 5rem 1.25rem 5rem;
}

/* ---------- Hero --------------------------------------------------- */
/* Asymmetric: text + meta on the left, "quick paths" panel on the right.
   Distinct from /search.html (which leads with a centered input).      */
.help-hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 1.5rem 0 1.75rem;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 2.25rem;
}

.help-hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2563eb;
  margin-bottom: 1rem;
}

.help-hero h1 {
  font-size: clamp(2rem, 3.6vw, 2.625rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.875rem;
  color: #0f172a;
  line-height: 1.1;
}

.help-hero-sub {
  font-size: 1.0625rem;
  color: #4b5563;
  max-width: 32rem;
  margin: 0 0 1.5rem;
  line-height: 1.55;
}

/* Live status / location line */
.help-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.875rem;
  color: #4b5563;
}

.help-hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.help-hero-meta-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.help-hero-meta-dot.is-closed {
  background: #9ca3af;
  box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.15);
}

/* Right column: quick paths card */
.help-hero-paths {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.875rem;
  padding: 1.5rem;
}

.help-hero-paths-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 0.875rem;
}

.help-hero-path {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 0.5rem;
  text-decoration: none;
  color: inherit;
  border-radius: 0.5rem;
  transition: background 0.15s ease;
}

.help-hero-path + .help-hero-path {
  border-top: 1px solid #e5e7eb;
}

.help-hero-path:hover { background: #fff; }

.help-hero-path-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: #eff6ff;
  color: #2563eb;
}

.help-hero-path-text { line-height: 1.35; flex: 1; }

.help-hero-path-title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
}

.help-hero-path-detail {
  display: block;
  font-size: 0.8125rem;
  color: #6b7280;
  margin-top: 0.125rem;
}

.help-hero-path-arrow {
  flex-shrink: 0;
  color: #9ca3af;
  transition: transform 0.15s ease, color 0.15s ease;
}

.help-hero-path:hover .help-hero-path-arrow {
  transform: translateX(2px);
  color: #2563eb;
}

/* ---------- Helpful resources strip (under hero) ------------------- */
.help-resources {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.625rem;
  margin: 0 0 3rem;
}

.help-resource {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.625rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.help-resource:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 18px -10px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

.help-resource-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.4rem;
}

.help-resource[data-resource="terms"]      .help-resource-icon { background: #f5f3ff; color: #7c3aed; }
.help-resource[data-resource="brochures"]  .help-resource-icon { background: #ecfeff; color: #0891b2; }
.help-resource[data-resource="sds"]        .help-resource-icon { background: #fef2f2; color: #dc2626; }
.help-resource[data-resource="procedures"] .help-resource-icon { background: #f0fdf4; color: #16a34a; }

.help-resource-label {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.3;
  min-width: 0;
}

.help-resource-arrow {
  flex-shrink: 0;
  color: #9ca3af;
  transition: transform 0.15s ease, color 0.15s ease;
}

.help-resource:hover .help-resource-arrow {
  transform: translateX(2px);
  color: #2563eb;
}

@media (max-width: 880px) {
  .help-resources { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .help-resources { grid-template-columns: 1fr; }
}

/* ---------- FAQ toolbar (filter + tabs) ---------------------------- */
.help-faq-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}

.help-faq-search {
  position: relative;
  width: 100%;
  max-width: 22rem;
}

.help-faq-search-icon {
  position: absolute;
  top: 50%;
  left: 0.875rem;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

.help-faq-search input {
  width: 100%;
  /* right padding leaves room for the "Clear" text button when visible */
  padding: 0.625rem 4.25rem 0.625rem 2.5rem;
  font-size: 0.9375rem;
  font-family: inherit;
  color: #0f172a;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.help-faq-search input::placeholder { color: #9ca3af; }

/* Suppress the native browser search-cancel "x" so it doesn't render
   alongside (or instead of) our custom button. */
.help-faq-search input::-webkit-search-cancel-button,
.help-faq-search input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.help-faq-search input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Page-specific clear button: text "Clear" inside the input's right gutter.
   The site's global `button` rule applies min-height: 44px, padding: 0.75rem
   1.5rem, and border-radius: 9999px to every <button>. We override ALL of
   those so this button can sit inside the search field at its intended size. */
.help-faq-search-clear {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  box-sizing: border-box;
  height: 1.625rem;
  min-height: 0;                /* override global button min-height: 44px */
  padding: 0 0.5rem;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
  color: #6b7280;
  background: transparent;
  border: 0;
  border-radius: 4px;           /* override global pill radius */
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.help-faq-search-clear:hover { color: #111827; background: #f3f4f6; }

.help-faq-search-clear:focus-visible {
  outline: none;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
}

.help-faq-search.has-value .help-faq-search-clear { display: inline-flex; }

/* ---------- Section primitives ------------------------------------- */
.help-section { margin: 0 0 4rem; scroll-margin-top: 6rem; }

.help-section-header {
  margin-bottom: 1.75rem;
}

.help-section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.375rem;
  color: #0f172a;
}

.help-section-header p {
  margin: 0;
  font-size: 0.9375rem;
  color: #4b5563;
}

/* ---------- FAQ — category pills + accordion ---------------------- */
.help-faq-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.help-faq-tab {
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.5rem 0.875rem;
  background: #fff;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.help-faq-tab:hover { border-color: #d1d5db; background: #f9fafb; }

.help-faq-tab[aria-pressed="true"] {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.help-faq-list {
  border-top: 1px solid #e5e7eb;
}

.help-faq-item {
  border-bottom: 1px solid #e5e7eb;
}

/* native <details> styling */
.help-faq-item > summary {
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
}

.help-faq-item > summary::-webkit-details-marker { display: none; }
.help-faq-item > summary::marker { display: none; }

.help-faq-item > summary:hover { color: #2563eb; }

.help-faq-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  margin-top: 0.125rem;
  transition: transform 0.2s ease, color 0.15s ease;
}

.help-faq-item[open] > summary .help-faq-icon {
  transform: rotate(45deg);
  color: #2563eb;
}

.help-faq-answer {
  padding: 0 0.5rem 1.5rem;
  color: #4b5563;
  line-height: 1.65;
  font-size: 0.9375rem;
  max-width: 52rem;
}

.help-faq-answer p { margin: 0 0 0.75rem; }
.help-faq-answer p:last-child { margin-bottom: 0; }

.help-faq-answer a {
  color: #2563eb;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.help-faq-answer a:hover { color: #1d4ed8; }

.help-faq-empty {
  display: none;
  padding: 2.5rem 1rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.9375rem;
}

.help-faq.is-empty .help-faq-empty { display: block; }
.help-faq.is-empty .help-faq-list { display: none; }

/* hidden state when filtered out */
.help-faq-item[hidden] { display: none; }

/* ---------- Contact section (form + direct) ----------------------- */
.help-contact {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 2.5rem;
}

.help-contact-header {
  text-align: center;
  margin-bottom: 2rem;
}

.help-contact-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.help-contact-header p {
  margin: 0;
  color: #4b5563;
  font-size: 0.9375rem;
}

.help-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 2rem;
}

/* Direct channels (left column) */
.help-contact-direct {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.help-contact-channel {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.125rem 1.25rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.625rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

.help-contact-channel:hover { border-color: #2563eb; }

.help-contact-channel-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: #eff6ff;
  color: #2563eb;
}

.help-contact-channel-text { line-height: 1.4; }

.help-contact-channel-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.help-contact-channel-value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
  word-break: break-word;
}

.help-contact-channel-detail {
  display: block;
  font-size: 0.8125rem;
  color: #6b7280;
  font-weight: 400;
  margin-top: 0.125rem;
}

/* Form (right column) */
.help-contact-form {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 2rem;
}

.help-contact-form-header {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #f1f5f9;
}

.help-contact-form-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: #0f172a;
}

.help-contact-form-header p {
  margin: 0;
  font-size: 0.875rem;
  color: #4b5563;
}

/* Quiet HubSpot form so it inherits the page style */
.help-contact-form .hs-form-frame,
.help-contact-form form { margin: 0 !important; }

/* ---------- Responsive ------------------------------------------- */
@media (max-width: 960px) {
  .help-hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.25rem 0 1.5rem;
  }
  .help-contact-grid { grid-template-columns: 1fr; }
  .help-faq-toolbar { flex-direction: column; align-items: stretch; }
  .help-faq-search { max-width: none; }
}

@media (max-width: 640px) {
  .help { padding: 4rem 1rem 4rem; }
  .help-hero { padding: 1rem 0 1.25rem; margin-bottom: 1.75rem; }
  .help-hero h1 { font-size: 1.875rem; }
  .help-hero-sub { font-size: 1rem; }
  .help-hero-paths { padding: 1.25rem; }
  .help-section { margin-bottom: 3rem; }
  .help-contact { padding: 1.5rem; }
  .help-contact-form { padding: 1.5rem; }
  .help-faq-item > summary { font-size: 0.9375rem; padding: 1rem 0.25rem; }
  .help-faq-answer { padding: 0 0.25rem 1.25rem; font-size: 0.9375rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .help-faq-icon,
  .help-hero-path-arrow { transition: none !important; }
  .help-hero-path:hover .help-hero-path-arrow { transform: none; }
}
