@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Work+Sans:wght@400;500;600&display=swap');

:root {
  /* Warme, papierachtige basis (denk: slagerspapier) gecombineerd met het
     koele grijs uit de koe-illustratie van het logo, zodat de site aansluit
     bij zowel het ambachtelijke karakter als het merk van Vandycke. */
  --paper: #F4EFE6;
  --card: #FDFBF7;
  --ink: #23282B;
  --ink-soft: #5A6166;
  --line: #DBD9D3;

  /* Merkkleuren, gehaald uit het logo:
     - Primair  #004B66 — het diepe petrolblauw van het "VANDYCKE" wordmark.
       Gebruikt voor knoppen, links, geselecteerde staten en CTA's.
     - Secundair #8F97A0 — een contrastvriendelijke, iets verdonkerde
       afgeleide van het koe-grijs (#C6C6C6) uit het logo. Gebruikt
       ondersteunend: achtergronden, hover-states, kleine accenten. */
  --accent: #004B66;
  --accent-dark: #00344A;
  --secondary: #8F97A0;
  --secondary-soft: #ECEBE7;
}

* { box-sizing: border-box; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  width: 100%;
  font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background-color: var(--paper);
  /* Enkel een subtiele papierkorrel over de effen linnen kleur — geen
     radiale glow-vlekken meer, die vielen op sommige schermformaten net
     achter de knoppen/menu's in de top-bar en gaven daar een storende,
     niet-egale plek achter het "kies bedrijf"-menu. */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-attachment: fixed;
}

#app-root {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 48px;
}

.top-bar {
  width: 100%;
  max-width: 420px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 22px;
  gap: 12px;
}

.demo-select-wrap {
  position: relative;
}
.demo-select-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 4px;
}
.demo-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--card);
  background-image: none;
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: 'Work Sans', sans-serif;
  font-size: 13px;
  padding: 8px 30px 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  max-width: 190px;
  outline: none;
}
.demo-select::-ms-expand {
  display: none; /* verbergt het native pijltje in oudere Edge/IE */
}
.demo-select:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 116, 58, 0.2);
}
.demo-select-icon {
  position: absolute;
  right: 9px;
  bottom: 10px;
  pointer-events: none;
  color: var(--ink-soft);
}

.lang-switch {
  display: flex;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  flex-shrink: 0;
}
.lang-btn {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-family: 'Work Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.lang-btn.active {
  background: var(--accent);
  color: #fff;
}

.brand-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 26px;
  text-align: center;
}
.brand-logo {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(155deg, var(--accent), var(--accent-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 20px -8px rgba(0,0,0,0.35);
  margin-bottom: 14px;
  overflow: hidden;
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }

/* Variant voor merken met een liggend wordmark-logo (zoals Vandycke) i.p.v.
   een vierkant beeldmerk: geen cirkel/achtergrond, gewoon het logo op ware
   verhouding tonen, "contain" binnen een vaste breedte. */
.brand-logo.brand-logo--image {
  width: auto;
  max-width: 230px;
  height: auto;
  background: none;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}
.brand-logo.brand-logo--image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.brand-name {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 1.2;
  margin: 0;
}
.brand-divider {
  width: 40px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 14px;
  opacity: 0.7;
}

.flow-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: 20px;
  box-shadow: 0 24px 48px -24px rgba(44, 36, 24, 0.35), 0 2px 8px rgba(44,36,24,0.06);
  border: 1px solid rgba(44,36,24,0.06);
  position: relative;
  overflow: hidden;
}
.flow-card-inner {
  padding: 34px 26px 30px;
  min-height: 300px;
  display: flex;
  align-items: stretch;
}
.torn-edge {
  width: 100%;
  height: 16px;
  line-height: 0;
  margin-top: -1px;
}
.torn-edge svg { width: 100%; height: 16px; display: block; }
.torn-edge polygon { fill: var(--paper); }

.pane {
  width: 100%;
  animation: rise 0.42s cubic-bezier(.22,1,.36,1);
}
.pane-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .pane { animation: none; }
}

.prompt {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 21px;
  margin: 0 0 22px;
  text-align: center;
}
.hint {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 18px 0 0;
  text-align: center;
}

.star-row {
  display: flex;
  justify-content: center;
  gap: 2px;
}
.star-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  transition: transform 0.18s ease, color 0.22s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.star-btn svg { width: 44px; height: 44px; }
.star-btn:hover, .star-btn:focus-visible { transform: translateY(-2px) scale(1.06); }
.star-btn.filled { color: var(--accent); }
.star-btn:active { transform: scale(0.94); }
.star-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.mini-stars {
  display: flex;
  gap: 3px;
  color: var(--accent);
  margin-bottom: 18px;
  justify-content: center;
}
.mini-stars svg { width: 16px; height: 16px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--ink-soft);
  font-family: 'Work Sans', sans-serif;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  margin-bottom: 18px;
}
.back-link:hover { color: var(--ink); }
.back-link svg { width: 16px; height: 16px; }
.back-link--center {
  margin: 14px auto 0;
  justify-content: center;
}

.step-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 20px;
  margin: 0 0 6px;
  text-align: center;
}
.step-subtitle {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 0 0 20px;
  text-align: center;
  line-height: 1.5;
}

.feedback-textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.5);
  border-radius: 14px;
  padding: 14px 16px;
  font-family: 'Work Sans', sans-serif;
  font-size: 15px;
  color: var(--ink);
  resize: vertical;
  min-height: 120px;
  margin-bottom: 18px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.feedback-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 116, 58, 0.2);
}
.feedback-textarea::placeholder { color: #767C7F; }

/* ---------------------------------------------------------------------------
   Feedback-categorieën — lijstvormige selectievragen (getoond bij 1-3
   sterren). Elk item is een grote, duidelijk klikbare kaart met eigen
   hover/focus/checked-states, zodat nooit twijfel bestaat over wat
   aanklikbaar is.
   --------------------------------------------------------------------------- */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 6px;
}
.category-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: var(--secondary-soft);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.category-item:hover {
  border-color: var(--secondary);
  background: #fff;
}
.category-item.checked {
  border-color: var(--accent);
  background: rgba(0, 75, 102, 0.07);
}
.category-item:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.category-checkbox {
  /* Visueel verborgen maar toegankelijk: de .category-box hieronder is het
     zichtbare, gestileerde checkbox-icoon. */
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.category-box {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--ink-soft);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.category-box svg { width: 14px; height: 14px; }
.category-item.checked .category-box {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.category-label {
  font-size: 14.5px;
  line-height: 1.35;
  color: var(--ink);
}

.feedback-details {
  overflow: hidden;
  max-height: 260px;
  opacity: 1;
  transition: max-height 0.28s ease, opacity 0.22s ease, margin 0.28s ease;
  margin-top: 18px;
}
.feedback-details--hidden {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .feedback-details { transition: none; }
}

.field { margin-bottom: 16px; }
.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.field-label svg { width: 15px; height: 15px; }
.text-input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.5);
  border-radius: 12px;
  padding: 13px 14px;
  font-family: 'Work Sans', sans-serif;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.text-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 116, 58, 0.2);
}
.text-input::placeholder { color: #767C7F; }

.primary-btn {
  width: 100%;
  border: none;
  background: linear-gradient(155deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  font-size: 15.5px;
  padding: 16px 20px;
  border-radius: 14px;
  cursor: pointer;
  margin-top: 4px;
  box-shadow: 0 10px 22px -10px rgba(184, 116, 58, 0.7);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  min-height: 52px;
  touch-action: manipulation;
}
.primary-btn:hover { filter: brightness(1.05); }
.primary-btn:active { transform: scale(0.98); }
.primary-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.primary-btn:disabled { opacity: 0.65; cursor: default; }

.spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
  margin-bottom: 18px;
}
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: spin 1.6s linear infinite; }
}
@keyframes spin { to { transform: rotate(360deg); } }

.success-icon, .error-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.success-icon {
  background: rgba(0, 75, 102, 0.12);
  color: var(--accent-dark);
}
.success-icon svg { width: 30px; height: 30px; }
.error-icon {
  background: #F3E1DE;
  color: #A13F32;
}
.error-icon svg { width: 28px; height: 28px; }

.footer-note {
  margin-top: 26px;
  font-size: 11.5px;
  color: var(--ink-soft);
  opacity: 0.75;
  text-align: center;
  max-width: 320px;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

/* Small phones */
@media (max-width: 380px) {
  #app-root { padding: 24px 12px 40px; }
  .flow-card-inner { padding: 26px 16px 24px; }
  .brand-name { font-size: 19px; }
  .brand-logo { width: 58px; height: 58px; font-size: 19px; }
  .star-btn { width: 54px; height: 54px; }
  .star-btn svg { width: 38px; height: 38px; }
  .prompt { font-size: 19px; }
  .top-bar { flex-wrap: wrap; }
}

/* Tablets and up: a little more breathing room, slightly larger card */
@media (min-width: 640px) {
  #app-root { padding: 56px 16px 64px; }
  .flow-card { max-width: 440px; }
  .top-bar, .brand-block, .footer-note { max-width: 440px; }
  .brand-logo { width: 76px; height: 76px; font-size: 24px; }
  .brand-name { font-size: 24px; }
  .prompt { font-size: 23px; }
}

/* Larger screens: keep the layout centered and narrow — this is designed
   mobile-first for QR-code scans, not as a desktop-first layout. */
@media (min-width: 900px) {
  #app-root { padding-top: 72px; }
}
