/*!
 * GDPR Q&A Search Module — styles.
 * Self-contained: the site design tokens are re-declared at the top so this
 * module renders correctly even when loaded without the main styles.css.
 * Visual language matches the GRPD site: ink #173451, red #ff684a,
 * paper #f5f3ee, Inter, rounded cards, eyebrow labels, pill chips.
 */

:root {
  --red: #ff684a;
  --red-dark: #e55036;
  --ink: #173451;
  --paper: #f5f3ee;
  --white: #fff;
  --muted: #6e7278;
  --line: #d8d5ce;
  --lime: #d8ff65;
  --max: 1280px;
  --pad: clamp(22px, 5vw, 72px);
}

.qa-search {
  max-width: var(--max);
  margin: 0 auto;
}

/* ---- Standalone section wrapper (used inside index.html) ---- */
.qa-section {
  background: #fff;
  padding: clamp(90px, 11vw, 140px) var(--pad);
}
.qa-section .section-heading {
  max-width: var(--max);
  margin: 0 auto 44px;
}
.qa-section .section-heading > p:last-child {
  margin-top: 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  max-width: 720px;
}
.qa-section-note {
  max-width: var(--max);
  margin: 28px auto 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

/* ---- Search box ---- */
.qa-form {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0;
}
.qa-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  display: inline-flex;
  pointer-events: none;
}
.qa-input {
  width: 100%;
  height: 58px;
  padding: 0 48px 0 50px;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(23, 52, 81, .04);
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}
.qa-input::placeholder { color: #9aa1a8; }
.qa-input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(255, 104, 74, .14);
}
.qa-input::-webkit-search-cancel-button { display: none; }
.qa-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: background .2s, color .2s;
}
.qa-clear:hover { background: rgba(23, 52, 81, .06); color: var(--red); }
.qa-clear:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ---- Topic filter chips ---- */
.qa-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 4px;
}
.qa-chip {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.qa-chip:hover { border-color: var(--red); color: var(--red); }
.qa-chip.is-active {
  background: rgba(255, 104, 74, .12);
  border-color: var(--red);
  color: var(--red-dark);
}
.qa-chip:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ---- Meta line ---- */
.qa-meta {
  font-size: 12.5px;
  color: var(--muted);
  margin: 18px 0 18px;
}
.qa-meta strong { color: var(--red); }

/* ---- Results grid ---- */
.qa-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr));
  gap: 22px;
}

/* ---- Result card ---- */
.qa-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  box-shadow: 0 1px 2px rgba(23, 52, 81, .04);
}
.qa-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 104, 74, .45);
  box-shadow: 0 12px 28px rgba(23, 52, 81, .09);
}
.qa-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.qa-topic {
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  letter-spacing: .02em;
}
.qa-risk {
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
}
.qa-risk--high { background: var(--red-dark); }
.qa-risk--med { background: #f0a830; color: #3a2a00; }
.qa-risk--low { background: #2f9e6b; }
.qa-risk--na { background: #b9b3a8; }
.qa-id {
  margin-left: auto;
  font: 11px Menlo, monospace;
  color: var(--muted);
  letter-spacing: .04em;
}
.qa-question {
  font-size: 19px;
  line-height: 1.38;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: 0 0 10px;
}
.qa-scene {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 16px;
  line-height: 1.6;
}
.qa-scene-label { color: var(--red); font-weight: 700; }
.qa-reply { margin: 0 0 14px; }
.qa-field-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--red);
  font-weight: 700;
  margin: 0 0 6px;
}
.qa-reply-body {
  font-size: 14px;
  line-height: 1.7;
  color: #2b3a47;
  margin: 0;
}

/* ---- Expandable details ---- */
.qa-details {
  border-top: 1px solid var(--line);
  margin-top: auto;
  padding-top: 14px;
}
.qa-details-summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
  padding: 2px 0;
  user-select: none;
}
.qa-details-summary::-webkit-details-marker { display: none; }
.qa-details-summary::before {
  content: "+";
  display: inline-block;
  margin-right: 8px;
  color: var(--red);
  font-weight: 900;
}
.qa-details[open] .qa-details-summary::before { content: "\2212"; }
.qa-details-body { margin: 12px 0; }
.qa-detail { margin-bottom: 12px; }
.qa-detail:last-child { margin-bottom: 0; }
.qa-detail-text { font-size: 13.5px; line-height: 1.65; color: #3a4a57; margin: 0; }
.qa-basis { font-size: 12.5px; color: var(--muted); margin: 0; }
.qa-basis-label { font-weight: 700; color: var(--ink); }
.qa-basis-value { color: var(--ink); }

/* ---- Empty state ---- */
.qa-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 52px 20px;
  color: var(--muted);
}
.qa-empty-title { font-size: 18px; font-weight: 700; color: var(--ink); margin: 0 0 8px; }
.qa-empty-sub { font-size: 13px; line-height: 1.65; max-width: 460px; margin: 0 auto; }

/* ---- Keyword highlight ---- */
.qa-results mark {
  background: rgba(255, 104, 74, .18);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
  font-weight: 600;
}

/* ---- Reveal animation (independent fallback) ---- */
.qa-search .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.qa-search .reveal.visible { opacity: 1; transform: none; }

@media (max-width: 650px) {
  .qa-results { grid-template-columns: 1fr; gap: 16px; }
  .qa-card { padding: 20px 18px; }
  .qa-question { font-size: 17px; }
  .qa-input { height: 54px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .qa-search .reveal { opacity: 1; transform: none; transition: none; }
  .qa-card, .qa-input, .qa-chip { transition: none; }
}
