/**
 * AUK FAQs — styles for [auk_faqs] shortcode rendered output.
 * Enqueued sitewide by auk-faqs.php (only loads when the file exists).
 *
 * Visual goals:
 *   - Match the existing auk-page-hero pattern (navy strip at top of page)
 *   - Centred search box (max-width 520px) — mirrors the cosmetic fix
 *   - Clean accordion using <details>/<summary> HTML5 semantics
 *   - Category section headings in navy with subtle separation
 *   - Mobile-friendly: stacks at small viewports, generous tap targets
 */

/* -------------------- Outer wrapper -------------------- */
/* Constrained max-width + auto-centred + clamped horizontal padding.
   !important wins over any theme-level page-content full-width rule
   (some themes apply max-width: 100% on .entry-content or similar). */

.auk-faqs {
  max-width: 1000px !important;
  margin: 0 auto !important;
  padding: 32px clamp(20px, 4vw, 40px) 64px !important;
  box-sizing: border-box;
}

/* -------------------- Search input -------------------- */

.auk-faqs__search {
  max-width: 520px;
  margin: 0 auto 32px;
}

.auk-faqs__search-input {
  width: 100%;
  padding: 12px 18px;
  font-size: 16px;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16,48,96,0.06);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auk-faqs__search-input:focus {
  border-color: #103060;
  box-shadow: 0 0 0 3px rgba(16,48,96,0.12);
}

/* -------------------- Category section -------------------- */
/* Two-column grid for FAQ items within each category. The category H2
   spans both columns via grid-column: 1 / -1. Mobile collapses to one
   column at 768px. */

.auk-faqs__category {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  margin: 0 0 40px;
  align-items: start;
}

.auk-faqs__category-title {
  grid-column: 1 / -1;
  color: #103060;
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #103060;
}

@media (max-width: 768px) {
  .auk-faqs__category { grid-template-columns: 1fr; }
}

/* -------------------- Accordion item -------------------- */

.auk-faqs__item {
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  margin: 0;
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}

.auk-faqs__item:hover {
  box-shadow: 0 1px 6px rgba(16,48,96,0.08);
}

.auk-faqs__item[open] {
  border-color: #103060;
}

.auk-faqs__question {
  cursor: pointer;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 600;
  color: #103060;
  list-style: none;
  position: relative;
  padding-right: 48px;
  user-select: none;
}

/* Remove default disclosure triangle on browsers that show it (Safari, Firefox) */
.auk-faqs__question::-webkit-details-marker { display: none; }
.auk-faqs__question::marker { content: ''; }

/* Custom +/- indicator */
.auk-faqs__question::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 400;
  color: #103060;
  transition: transform 0.2s ease;
  line-height: 1;
}

.auk-faqs__item[open] .auk-faqs__question::after {
  content: '−';
}

.auk-faqs__question:hover {
  background: #f5f7fa;
}

.auk-faqs__question:focus-visible {
  outline: 2px solid #103060;
  outline-offset: -2px;
}

/* -------------------- Answer body -------------------- */

.auk-faqs__answer {
  padding: 0 20px 20px;
  font-size: 15px;
  line-height: 1.6;
  color: #333;
}

.auk-faqs__answer p { margin: 0 0 12px; }
.auk-faqs__answer p:last-child { margin-bottom: 0; }
.auk-faqs__answer ul, .auk-faqs__answer ol { margin: 8px 0 12px 20px; }
.auk-faqs__answer li { margin: 0 0 6px; }
.auk-faqs__answer a { color: #103060; text-decoration: underline; }

/* -------------------- Empty state -------------------- */

.auk-faqs-empty {
  text-align: center;
  padding: 40px 20px;
  color: #6a7280;
  font-size: 16px;
}

/* -------------------- Mobile -------------------- */

@media (max-width: 600px) {
  .auk-faqs { padding: 24px 12px 48px; }
  .auk-faqs__question { padding: 14px 16px; padding-right: 44px; font-size: 15px; }
  .auk-faqs__answer { padding: 0 16px 16px; }
}
