/* ============================================================
   Frequently Questions - front/faq_v2.blade.php, when
   CommonHelper::FAQ_V2 is on. The old page and its rules are untouched.

   One column, because it is one column of reading. Each question is its own
   card: a closed one is white, the open one takes the brand tint and its
   answer sits on white behind a yellow edge, so the two read as a question
   and an answer rather than as one block of text. Everything is scoped
   to .faq-v2.
   ============================================================ */
.faq-v2{
  --brand:#ffcc2a;
  --brand-dark:#e6b415;
  --ink:#1a1a1a;
  --ink-2:#3f4550;
  --muted:#6b7280;
  --line:#e6e8ec;
  --line-2:#f0f1f4;
  --bg:#f4f5f7;
  --r:10px;
  --shadow:0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);

  font-family:"Montserrat",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  color:var(--ink);
  background:#fff;
  /* .nav-top-fixed stands over the top of the page; this is the room it needs */
  padding:150px 0 60px;
}
.faq-v2 *{box-sizing:border-box}
.faq-v2 h1,.faq-v2 h4{margin:0;font-weight:700;letter-spacing:-.01em}

.faq-v2 .faq-wrap{max-width:1240px;margin:0 auto;padding:0 20px}
.faq-v2 .faq-shell{max-width:840px;margin:0 auto}
.faq-v2 .faq-head{text-align:center;margin:0 0 26px}
.faq-v2 .faq-head h1{font-size:26px;line-height:1.3}
/* separator-yellow, centred under the heading as the old page had it */
.faq-v2 .faq-head h1::after{content:"";display:block;width:56px;height:3px;border-radius:2px;background:var(--brand);margin:14px auto 16px}
.faq-v2 .faq-head .sub{margin:0;font-size:14px;line-height:1.85;color:var(--ink-2)}

/* ------------------------------------------------------------
   the search, sitting above the list it searches
   ------------------------------------------------------------ */
.faq-v2 .faq-search{display:flex;align-items:center;gap:12px;margin-bottom:14px;flex-wrap:wrap}
.faq-v2 .faq-field{position:relative;display:flex;align-items:center;flex:1;min-width:240px;margin:0}
.faq-v2 .faq-field > svg{position:absolute;left:12px;width:15px;height:15px;color:#9aa1ad;fill:none;stroke:currentColor;pointer-events:none}
.faq-v2 .faq-field input{
  width:100%;height:42px;border:1px solid var(--line);border-radius:8px;padding:0 12px 0 36px;background:#fff;
  font-family:inherit;font-size:13.5px;color:var(--ink);
}
.faq-v2 .faq-field input:focus{outline:2px solid #ffe89a;outline-offset:-1px;border-color:var(--brand-dark)}
.faq-v2 .faq-count{font-size:12px;font-weight:600;color:var(--muted);white-space:nowrap}

/* ------------------------------------------------------------
   the questions: a stack of cards, not one panel with lines
   drawn across it
   ------------------------------------------------------------ */
.faq-v2 .faq-list{display:flex;flex-direction:column;gap:10px}
.faq-v2 .faq-item{background:#fff;border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);overflow:hidden}
.faq-v2 .faq-q{
  display:flex;align-items:flex-start;gap:12px;width:100%;text-align:left;
  background:#fff;border:0;padding:15px 18px;cursor:pointer;
  font-family:inherit;font-size:13.5px;font-weight:700;line-height:1.5;color:var(--ink);
  transition:background .14s;
}
.faq-v2 .faq-q:hover{background:#f6f7fa}
.faq-v2 .faq-q:focus{outline:none}
.faq-v2 .faq-q:focus-visible{outline:2px solid var(--brand-dark);outline-offset:-2px}
/* the brand tint marks the one being read */
.faq-v2 .faq-item.is-open .faq-q{background:#fff3c9}
.faq-v2 .faq-q > span{flex:1}
.faq-v2 .faq-chev{width:15px;height:15px;flex:none;margin-top:3px;color:var(--muted);fill:none;stroke:currentColor;transition:transform .16s}
.faq-v2 .faq-item.is-open .faq-chev{transform:rotate(180deg);color:var(--ink)}

/* the answer: white, under the bar rather than continuing it, with the brand
   line down its edge tying it to the question above */
.faq-v2 .faq-a{display:none;background:#fff;border-top:1px solid var(--line);border-left:3px solid var(--brand);padding:16px 18px 18px;font-size:13px;line-height:1.8;color:var(--ink-2)}
.faq-v2 .faq-item.is-open .faq-a{display:block}
.faq-v2 .faq-a p:last-child{margin-bottom:0}
/* the answer is whatever the admin pasted, sizes and colours and all */
.faq-v2 .faq-a,
.faq-v2 .faq-a *{font-size:13px !important;line-height:1.8 !important;color:var(--ink-2) !important}
.faq-v2 .faq-a a{color:#1c4f9c !important;text-decoration:underline}

/* ------------------------------------------------------------
   Waiting on a search or on View More
   ------------------------------------------------------------ */
/* the questions being replaced, while their replacements are on their way */
.faq-v2 .faq-list.is-busy{opacity:.4;pointer-events:none}

/* and the spinner, under them, saying the wait is on purpose */
.faq-v2 .faq-spin{display:flex;justify-content:center;padding:28px 0}
.faq-v2 .faq-spin[hidden]{display:none}
.faq-v2 .faq-spin > span{
  width:26px;height:26px;border-radius:50%;
  border:3px solid var(--line);border-top-color:var(--brand-dark);
  animation:faq-v2-spin .7s linear infinite;
}
@keyframes faq-v2-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){
  .faq-v2 .faq-spin > span{animation-duration:2.4s}
}

/* ------------------------------------------------------------
   View More, in place of the old page's endless scroll
   ------------------------------------------------------------ */
.faq-v2 .faq-more{display:flex;justify-content:center;margin-top:16px}
/* the flex above outranks the browser's own [hidden] rule, so say it here */
.faq-v2 .faq-more[hidden]{display:none}

/* the same flat button the rest of the redesigned front carries */
.faq-v2 .faq-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:12px 22px;
  background:var(--brand);border:1px solid var(--brand-dark);border-radius:8px;color:var(--ink);
  font-family:inherit;font-size:13.5px;font-weight:600;line-height:1.3;white-space:nowrap;cursor:pointer;
  transition:background .12s;
}
.faq-v2 .faq-btn:hover{background:var(--brand-dark);color:var(--ink);text-decoration:none}
.faq-v2 .faq-btn:focus{outline:none;box-shadow:0 0 0 3px rgba(255,204,42,.45)}
/* the mockup's plain button size, for the one sitting in a line of text */
.faq-v2 .faq-btn.is-small{padding:9px 16px;font-size:13px}
/* View More is not the thing to press on this page, so it is the quiet one */
.faq-v2 .faq-btn.is-quiet{padding:9px 16px;font-size:13px;background:#fff;border-color:var(--line);color:var(--ink)}
.faq-v2 .faq-btn.is-quiet:hover{background:var(--bg);color:var(--ink)}
.faq-v2 .faq-btn[disabled]{opacity:.6;cursor:default}

/* ------------------------------------------------------------
   the closing line, and the panel when there is nothing to show
   ------------------------------------------------------------ */
.faq-v2 .faq-ask{margin-top:20px;background:#fff;border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);padding:20px;display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.faq-v2 .faq-ask p{margin:0;flex:1;min-width:250px;font-size:13px;line-height:1.7;color:var(--ink-2)}

.faq-v2 .faq-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center;padding:36px 24px;background:#fff;border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow)}
.faq-v2 .faq-empty-ic{width:52px;height:52px;border-radius:12px;background:#fff7dd;color:#8a6b00;display:grid;place-items:center}
.faq-v2 .faq-empty-ic svg{width:24px;height:24px;fill:none;stroke:currentColor}
.faq-v2 .faq-empty h4{font-size:14px}
.faq-v2 .faq-empty p{margin:0;max-width:330px;font-size:12.5px;color:var(--muted)}

@media (max-width:991px){
  .faq-v2{padding:132px 0 44px}
}
@media (max-width:575px){
  .faq-v2{padding:122px 0 36px}
  .faq-v2 .faq-wrap{padding:0 14px}
  .faq-v2 .faq-head h1{font-size:21px}
  .faq-v2 .faq-ask{padding:18px}
}
