/*  weegclub v2 — design-tokens + scoped styles for the redesigned search page.
    Loaded only where the template opts in via <link rel="stylesheet">, so these
    rules never leak onto legacy pages. Every selector is scoped under .wcv2
    on purpose — the v2 tokens are meant to be reused by future pages as we
    refresh the site, and the scope guard keeps that roll-out incremental. */

/*  Self-hosted web fonts (Fraunces + Lato, SIL OFL) served from /fonts/ — no
    Google Fonts CDN. Kept in sync with the @font-face block in
    src/css/tailwind.entry.css (which covers pages that load app.css). */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/fraunces.woff2') format('woff2');
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/lato-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/lato-700.woff2') format('woff2');
}

.wcv2 {
  --wcv2-accent:        #107377;
  --wcv2-accent-hover:  #0b5559;
  --wcv2-warm:          #d97742;
  --wcv2-highlight-bg:  #fdf3c6;
  --wcv2-highlight-ink: #4a3b00;
  --wcv2-paper:         #fafaf6;
  --wcv2-ink:           #1f2321;
  --wcv2-mute:          #6a6e6b;
  --wcv2-rule:          #e5e3db;

  --wcv2-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --wcv2-sans:  "Lato", "Segoe UI", system-ui, -apple-system, sans-serif;

  max-width: 720px;
  margin: 0 auto;
  padding: 36px 0 72px;

  font-family: var(--wcv2-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--wcv2-ink);
  background: var(--wcv2-paper);

  /* The rest of the page inherits the site bg; the v2 column gets its own
     warm paper colour. Extend a little past the kolom2 content-box with a
     subtle soft edge so the reading column doesn't look clipped. */
  border-radius: 2px;
  box-shadow: 0 0 0 24px var(--wcv2-paper);
}

/* The legacy main.min.css has a universal `*{font-family:Arial,...}` rule
   (specificity 0,0,0,0). We stamp var(--wcv2-sans) explicitly on every
   descendant of the v2 root (specificity 0,0,1,1) so Lato wins. Headings
   and titles get their own serif via higher-specificity overrides below. */
.wcv2,
.wcv2 * {
  font-family: var(--wcv2-sans);
}

.wcv2 a {
  color: var(--wcv2-accent);
  text-decoration: none;
  transition: color 120ms ease-out;
}
.wcv2 a:hover,
.wcv2 a:focus-visible {
  color: var(--wcv2-accent-hover);
}

.wcv2 ::selection {
  background: var(--wcv2-highlight-bg);
  color: var(--wcv2-highlight-ink);
}

/* ---------- Head: title + search form ------------------------------------ */

.wcv2-head {
  margin-bottom: 28px;
}

.wcv2 .wcv2-title {
  margin: 0 0 24px;
  font-family: var(--wcv2-serif);
  font-weight: 450;
  font-size: 40px;
  font-variation-settings: "opsz" 72, "SOFT" 30;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--wcv2-ink);
  text-align: left;
}

.wcv2-form {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.wcv2-form__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 14px 20px;
  font: 16px/1.3 var(--wcv2-sans);
  color: var(--wcv2-ink);
  background: #fff;
  border: 1.5px solid var(--wcv2-rule);
  border-radius: 999px;
  outline: none;
  transition: border-color 140ms ease-out, box-shadow 140ms ease-out;
}
.wcv2-form__input::placeholder {
  color: var(--wcv2-mute);
}
.wcv2-form__input:focus {
  border-color: var(--wcv2-accent);
  box-shadow: 0 0 0 4px rgba(16, 115, 119, 0.14);
}

.wcv2-form__submit {
  flex: 0 0 auto;
  padding: 0 22px;
  font: 600 13px/1 var(--wcv2-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--wcv2-accent);
  border: 1.5px solid var(--wcv2-accent);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 140ms ease-out, border-color 140ms ease-out;
}
.wcv2-form__submit:hover,
.wcv2-form__submit:focus-visible {
  background: var(--wcv2-accent-hover);
  border-color: var(--wcv2-accent-hover);
}

/* ---------- Summary line ------------------------------------------------- */

.wcv2-summary {
  margin: 0 0 18px;
  padding-bottom: 14px;
  font-size: 13px;
  color: var(--wcv2-mute);
  border-bottom: 1px solid var(--wcv2-rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}
.wcv2-summary b {
  font-weight: 600;
  color: var(--wcv2-ink);
}
.wcv2-sort {
  font-size: 13px;
  color: var(--wcv2-mute);
}
.wcv2-sort a       { color: var(--wcv2-accent); text-decoration: none; }
.wcv2-sort a:hover { color: var(--wcv2-accent-hover); text-decoration: underline; }
.wcv2-sort strong  { color: var(--wcv2-ink); font-weight: 600; }

/* ---------- Results list ------------------------------------------------- */

.wcv2-results {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wcv2-result {
  padding: 22px 0;
  border-bottom: 1px solid var(--wcv2-rule);
  opacity: 0;
  transform: translateY(6px);
  animation: wcv2-fade-in 320ms ease-out forwards;
}
.wcv2-result:last-child {
  border-bottom: none;
}

/* Stagger the first handful of cards so the page "develops" rather than
   snapping in all at once. Beyond row 8 we drop the delay to keep the tail
   of the list snappy. */
.wcv2-result:nth-child(1)  { animation-delay:   0ms; }
.wcv2-result:nth-child(2)  { animation-delay:  20ms; }
.wcv2-result:nth-child(3)  { animation-delay:  40ms; }
.wcv2-result:nth-child(4)  { animation-delay:  60ms; }
.wcv2-result:nth-child(5)  { animation-delay:  80ms; }
.wcv2-result:nth-child(6)  { animation-delay: 100ms; }
.wcv2-result:nth-child(7)  { animation-delay: 120ms; }
.wcv2-result:nth-child(8)  { animation-delay: 140ms; }

@keyframes wcv2-fade-in {
  to { opacity: 1; transform: none; }
}

.wcv2-result__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wcv2-mute);
}
.wcv2-result__meta a {
  color: var(--wcv2-mute);
  border-bottom: 1px dotted transparent;
  transition: border-color 120ms ease-out, color 120ms ease-out;
}
.wcv2-result__meta a:hover {
  color: var(--wcv2-ink);
  border-bottom-color: var(--wcv2-mute);
}
.wcv2-result__dot {
  opacity: 0.5;
}

.wcv2 .wcv2-result__title {
  margin: 2px 0 8px;
  font-family: var(--wcv2-serif);
  font-weight: 500;
  font-variation-settings: "opsz" 40;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.wcv2-result__title a {
  /* Underline grows from the left on hover. Uses a background-image
     gradient so the underline inherits the link colour transition. */
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1.5px;
  padding-bottom: 2px;
  transition: background-size 220ms ease-out, color 120ms ease-out;
}
.wcv2-result__title a:hover,
.wcv2-result__title a:focus-visible {
  background-size: 100% 1.5px;
}

.wcv2-result__snippet {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--wcv2-ink);
  word-break: break-word;
  overflow-wrap: anywhere;
}
.wcv2-result__snippet b {
  /* Google-style match highlight, warmer tone. box-decoration-break keeps
     the chip looking right when the bolded span wraps over two lines. */
  background: var(--wcv2-highlight-bg);
  color: var(--wcv2-highlight-ink);
  padding: 0.06em 0.22em;
  border-radius: 2px;
  font-weight: 600;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.wcv2-result__foot {
  margin-top: 10px;
  font-size: 12px;
  color: var(--wcv2-mute);
}
.wcv2-result__foot time {
  cursor: help;
  border-bottom: 1px dotted var(--wcv2-rule);
}

/* ---------- Empty states ------------------------------------------------- */

.wcv2-empty {
  margin: 24px 0;
  padding: 40px 24px 44px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--wcv2-rule);
  border-radius: 4px;
}
.wcv2 .wcv2-empty__mark {
  display: block;
  font-family: var(--wcv2-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 72px;
  line-height: 0.9;
  color: var(--wcv2-warm);
  opacity: 0.75;
}
.wcv2-empty p {
  margin: 8px 0 0;
  color: var(--wcv2-ink);
  font-size: 15px;
}
.wcv2-empty strong {
  color: var(--wcv2-accent);
  font-weight: 600;
}

/* ---------- Pager -------------------------------------------------------- */

.wcv2-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--wcv2-rule);
}
.wcv2-pager__state {
  font-size: 13px;
  color: var(--wcv2-mute);
  letter-spacing: 0.02em;
}
.wcv2-pager__btn {
  padding: 9px 18px;
  font: 600 13px/1 var(--wcv2-sans);
  letter-spacing: 0.02em;
  color: var(--wcv2-accent);
  background: transparent;
  border: 1.5px solid var(--wcv2-rule);
  border-radius: 999px;
  transition: border-color 140ms ease-out, color 140ms ease-out, background-color 140ms ease-out;
}
.wcv2-pager__btn:hover,
.wcv2-pager__btn:focus-visible {
  color: #fff;
  background: var(--wcv2-accent);
  border-color: var(--wcv2-accent);
}

/* When a pager slot has no prev/next link, the opposite side still balances
   visually thanks to the space-between layout + the centre state label. */

/* ---------- Responsiveness ---------------------------------------------- */

/* The surrounding kolom2 is a hard-coded 970px on the forum index; we're
   inside that. Keep the reading column centred and add a small safety pad
   when the viewport is narrower than 720 + the site chrome. */
@media (max-width: 760px) {
  .wcv2 {
    padding: 24px 14px 56px;
    box-shadow: none;
  }
  .wcv2-title { font-size: 32px; }
  .wcv2-result__title { font-size: 20px; }
  .wcv2-form { flex-direction: column; }
  .wcv2-form__submit { padding: 12px 22px; }
  .wcv2-pager { flex-wrap: wrap; justify-content: center; }
}

/* ---------- Motion preferences ----------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .wcv2-result {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .wcv2-result__title a,
  .wcv2-form__input,
  .wcv2-form__submit,
  .wcv2-pager__btn,
  .wcv2 a {
    transition: none;
  }
}

/* =========================================================================
   Generic prose + form classes
   --------------------------------------------------------------------------
   Used by the password-reset pages (wachtwoord-vergeten / -instellen /
   -veranderd / forced-pending). Same .wcv2 column, same fonts, just adds
   the controls those pages need (banner, vertical-stacked form, helper
   text). Designed to be reused on future v2 pages.
   ========================================================================= */

/* ---------- Prose: paragraphs, headings, lists --------------------------- */

.wcv2-prose {
  /* The reading column itself is already constrained by .wcv2's max-width. */
}
.wcv2-prose p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--wcv2-ink);
}
.wcv2-prose p:last-child {
  margin-bottom: 0;
}
.wcv2-prose ul {
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--wcv2-ink);
}
.wcv2-prose ul li {
  margin: 4px 0;
  font-size: 15px;
  line-height: 1.55;
}
.wcv2-prose h2 {
  margin: 26px 0 10px;
  font-family: var(--wcv2-serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.005em;
  color: var(--wcv2-ink);
}
.wcv2-prose .wcv2-mute {
  color: var(--wcv2-mute);
  font-size: 13px;
  line-height: 1.5;
}

/* ---------- Banner: success / error / info inline notice ----------------- */

.wcv2-banner {
  margin: 4px 0 24px;
  padding: 14px 18px;
  border-radius: 6px;
  border: 1px solid var(--wcv2-rule);
  background: #fff;
  font-size: 14px;
  line-height: 1.5;
  color: var(--wcv2-ink);
}
.wcv2-banner strong {
  font-weight: 700;
}
.wcv2-banner--ok {
  /* success / "we sent the email", "password changed" */
  background: #f1f8f4;
  border-color: #c8e3d2;
}
.wcv2-banner--err {
  /* error / "wachtwoord moet minstens..." */
  background: #fdf3ed;
  border-color: #f0c8a8;
}
.wcv2-banner--info {
  background: #f6f4ec;
  border-color: var(--wcv2-rule);
}

/* ---------- Vertical-stacked form (label above input) ------------------- */

.wcv2-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 8px 0 24px;
}
.wcv2-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wcv2-field__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--wcv2-ink);
}
.wcv2-field__hint {
  font-size: 12px;
  color: var(--wcv2-mute);
  margin-top: -2px;
}
.wcv2-field__control {
  /* Rectangular variant of .wcv2-form__input — stacked with a label, no pill. */
  padding: 12px 14px;
  font: 15px/1.4 var(--wcv2-sans);
  color: var(--wcv2-ink);
  background: #fff;
  border: 1.5px solid var(--wcv2-rule);
  border-radius: 6px;
  outline: none;
  transition: border-color 140ms ease-out, box-shadow 140ms ease-out;
}
.wcv2-field__control:focus {
  border-color: var(--wcv2-accent);
  box-shadow: 0 0 0 4px rgba(16, 115, 119, 0.14);
}

/* ---------- Turnstile widget centering ----------------------------------- */

.wcv2-turnstile {
  display: flex;
  justify-content: center;
  margin: 8px 0 8px;
}

/* ---------- Action row (submit button at bottom) ------------------------- */

.wcv2-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}
.wcv2-actions__submit {
  flex: 0 1 auto;
  padding: 13px 24px;
  font: 600 14px/1 var(--wcv2-sans);
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--wcv2-accent);
  border: 1.5px solid var(--wcv2-accent);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 140ms ease-out, border-color 140ms ease-out;
}
.wcv2-actions__submit:hover,
.wcv2-actions__submit:focus-visible {
  background: var(--wcv2-accent-hover);
  border-color: var(--wcv2-accent-hover);
}
.wcv2-actions__link {
  align-self: center;
  font-size: 14px;
}

/* ---------- Subtle decorative quote-like banner for "klaar!" type pages -- */

.wcv2-celebrate {
  margin: 8px 0 20px;
  padding: 28px 22px;
  text-align: center;
  background: #f1f8f4;
  border: 1px solid #c8e3d2;
  border-radius: 8px;
}
.wcv2-celebrate__mark {
  display: block;
  font-family: var(--wcv2-serif);
  font-style: italic;
  font-size: 56px;
  line-height: 0.9;
  color: var(--wcv2-warm);
  opacity: 0.85;
  margin-bottom: 4px;
}
.wcv2-celebrate p {
  margin: 6px 0 0;
  font-size: 16px;
  color: var(--wcv2-ink);
}
.wcv2-celebrate strong {
  color: var(--wcv2-accent);
  font-weight: 600;
}

/* ---------- Mobile adjustments for the form rows ------------------------- */

@media (max-width: 640px) {
  .wcv2-fields { gap: 14px; }
  .wcv2-field__control { padding: 11px 12px; font-size: 16px; }
  .wcv2-actions { flex-direction: column; }
  .wcv2-actions__submit { padding: 14px 22px; }
}
