/* Publiek serviceformulier -- zie serviceformulier.html. Kleuren met de hand
   overgenomen uit de UI-tokens van app.js (Zendesk Garden-subset); geen
   gedeeld bestand, want deze pagina draait volledig los van de app. */
:root {
  --sf-blue: #1f73b7;
  --sf-blue-dark: #144a75;
  --sf-blue-tint: rgba(31, 115, 183, 0.08);
  --sf-blue-tint-strong: rgba(31, 115, 183, 0.14);
  --sf-text: #2f3941;
  --sf-text-sub: #5b6472;
  --sf-border: #d8dcde;
  --sf-input-border: rgb(176, 184, 190);
  --sf-surface: #f5f6f8;
  --sf-danger: #c0262d;
  --sf-invalid: #d93f4c;
  --sf-ok: #038153;
  --sf-radius: 8px;
  --sf-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--sf-surface); color: var(--sf-text);
  font-family: var(--sf-font); font-size: 15px; line-height: 1.45;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
/* Ingesloten in een Shopify-pagina: transparant, zodat de achtergrond van de
   webshop doorloopt, en geen eigen kop (de webshop heeft er al een). */
html.sf-embedded, html.sf-embedded body { background: transparent; }
html.sf-embedded #sf-header-logo { display: none; }
[hidden] { display: none !important; }
.sf-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#sf-app { max-width: 620px; margin: 0 auto; padding: 0 16px 40px; }
#sf-header { display: flex; align-items: center; gap: 12px; padding: 20px 0 14px; padding-top: max(20px, env(safe-area-inset-top)); }
#sf-header-logo { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; }
#sf-header-titles { flex: 1; min-width: 0; }
#sf-header-title { font-size: 20px; font-weight: 700; margin: 0; }
#sf-header-sub { margin: 2px 0 0; color: var(--sf-text-sub); font-size: 14px; }
#sf-lang-select {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--sf-text-sub);
  border: 1px solid var(--sf-border); border-radius: 999px; padding: 5px 10px; background: #fff; cursor: pointer;
}

#sf-steps { list-style: none; display: flex; align-items: center; gap: 8px; margin: 4px 0 16px; padding: 0; }
.sf-step { display: flex; align-items: center; gap: 6px; color: var(--sf-text-sub); font-size: 13px; font-weight: 600; }
.sf-step-dot {
  width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--sf-input-border); font-size: 12px; background: #fff;
}
.sf-step-line { flex: 1; height: 1.5px; background: var(--sf-border); min-width: 12px; }
.sf-step.sf-step--active { color: var(--sf-blue); }
.sf-step.sf-step--active .sf-step-dot { border-color: var(--sf-blue); background: var(--sf-blue); color: #fff; }
.sf-step.sf-step--done .sf-step-dot { border-color: var(--sf-blue); color: var(--sf-blue); }

.sf-panel {
  background: #fff; border: 1px solid var(--sf-border); border-radius: 12px; padding: 20px;
  animation: sf-panel-in 220ms cubic-bezier(0.23, 1, 0.32, 1);
}
@keyframes sf-panel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sf-panel { animation: none; } }
.sf-panel-title { font-size: 17px; font-weight: 700; margin: 0 0 4px; }
.sf-panel-intro { margin: 0 0 14px; color: var(--sf-text-sub); font-size: 14px; }

.sf-field { margin-bottom: 14px; flex: 1; min-width: 0; }
.sf-field-grow { flex: 2; }
.sf-row { display: flex; gap: 12px; align-items: flex-start; }
/* Op een smal scherm onder elkaar, op volle breedte: zonder stretch/flex:none
   krimpt een veld tot zijn inhoud (een datumveld werd een smal strookje). */
@media (max-width: 420px) { .sf-row { flex-direction: column; gap: 0; align-items: stretch; } .sf-row > .sf-field { flex: none; } }
.sf-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.sf-optional { font-weight: 400; color: var(--sf-text-sub); }
.sf-input, .sf-select, .sf-textarea {
  width: 100%; font: inherit; font-size: 16px; /* 16px: iOS zoomt anders in */
  color: var(--sf-text); background: #fff;
  border: 1px solid var(--sf-input-border); border-radius: 6px; padding: 10px 12px; outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.sf-textarea { resize: vertical; min-height: 80px; line-height: 1.4; }
.sf-select { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6472' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.sf-input:hover, .sf-select:hover, .sf-textarea:hover { border-color: var(--sf-blue); }
.sf-input:focus, .sf-select:focus, .sf-textarea:focus { border-color: var(--sf-blue); box-shadow: 0 0 0 3px var(--sf-blue-tint-strong); }
.sf-input.sf-invalid, .sf-select.sf-invalid, .sf-textarea.sf-invalid { border-color: var(--sf-invalid); }
.sf-input.sf-valid { border-color: var(--sf-ok); }
.sf-field-error { color: var(--sf-invalid); font-size: 13px; margin: 5px 0 0; }
.sf-hint { color: var(--sf-text-sub); font-size: 13px; margin: 5px 0 0; }
.sf-hint--ok { color: var(--sf-ok); }
.sf-error-banner { background: #fff0f1; border: 1px solid #f5c2c5; color: var(--sf-danger); border-radius: 6px; padding: 10px 12px; font-size: 14px; margin: 4px 0 12px; }
.sf-suggestion { border: 0; background: none; padding: 0; margin-top: 5px; color: var(--sf-blue); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.sf-suggestion:hover { text-decoration: underline; }

/* Apparaat kiezen */
#sf-device-filters { display: flex; gap: 8px; margin-bottom: 8px; }
.sf-filter { font-size: 14px; padding: 8px 30px 8px 10px; }
#sf-device-search-wrap { position: relative; }
.sf-search-icon { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--sf-text-sub); pointer-events: none; }
#sf-device-search { padding-left: 38px; }
#sf-device-results {
  list-style: none; margin: 6px 0 0; padding: 4px; border: 1px solid var(--sf-border); border-radius: var(--sf-radius);
  max-height: 340px; overflow-y: auto; background: #fff; box-shadow: 0 6px 18px rgba(47, 57, 65, 0.08);
}
.sf-device-option { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 6px; cursor: pointer; }
.sf-device-option:hover, .sf-device-option.sf-device-option--active { background: var(--sf-blue-tint); }
.sf-device-thumb {
  width: 44px; height: 44px; border-radius: 6px; background: var(--sf-surface); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; overflow: hidden; color: #b3bac2;
}
.sf-device-thumb img { width: 100%; height: 100%; object-fit: contain; }
.sf-device-thumb svg { width: 22px; height: 22px; }
.sf-device-option-text { min-width: 0; flex: 1; }
.sf-device-option-name { display: block; font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.sf-device-option-meta { display: block; color: var(--sf-text-sub); font-size: 13px; }
.sf-device-option-name mark { background: none; color: var(--sf-blue); font-weight: 700; }
.sf-device-option--other .sf-device-option-name { color: var(--sf-blue); }
.sf-device-results-empty { padding: 10px 8px; color: var(--sf-text-sub); font-size: 14px; }

.sf-device-card { border: 1px solid var(--sf-border); border-radius: var(--sf-radius); padding: 14px; margin-top: 12px; background: #fff; }
.sf-device-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sf-device-card-name { font-weight: 700; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sf-device-card-meta { color: var(--sf-text-sub); font-size: 13px; font-weight: 400; }
.sf-device-card-remove {
  width: 36px; height: 36px; border: 0; background: none; border-radius: 6px; cursor: pointer; color: var(--sf-text-sub);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sf-device-card-remove:hover { background: var(--sf-surface); color: var(--sf-danger); }
.sf-device-card-remove svg { width: 18px; height: 18px; }
.sf-device-card .sf-field:last-child { margin-bottom: 0; }

/* Overzicht bovenaan stap 2 */
#sf-details-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--sf-border); }
.sf-summary-chip { background: var(--sf-blue-tint); color: var(--sf-blue-dark); border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 600; }
.sf-summary-edit { border: 0; background: none; color: var(--sf-blue); font: inherit; font-size: 13px; cursor: pointer; padding: 4px; }
.sf-summary-edit:hover { text-decoration: underline; }

/* Knoppen */
.sf-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.sf-btn-primary, .sf-btn-secondary {
  font: inherit; font-size: 15px; font-weight: 600; border-radius: 6px; padding: 0 20px; min-height: 44px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background-color 120ms ease;
  white-space: nowrap;
}
.sf-btn-primary { background: var(--sf-blue); color: #fff; border: 1px solid var(--sf-blue); }
.sf-btn-primary:hover { background: var(--sf-blue-dark); border-color: var(--sf-blue-dark); }
.sf-btn-primary:disabled { opacity: 0.7; cursor: progress; }
.sf-btn-secondary { background: #fff; color: var(--sf-text); border: 1px solid var(--sf-input-border); }
.sf-btn-secondary:hover { border-color: var(--sf-blue); color: var(--sf-blue); }
.sf-btn-ghost {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 10px 0; margin-top: 6px;
  color: var(--sf-blue); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.sf-btn-ghost svg { width: 18px; height: 18px; }
.sf-btn-ghost:hover span { text-decoration: underline; }
@media (max-width: 420px) { .sf-actions > .sf-btn-primary { flex: 1; } }

.sf-spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.45); border-top-color: #fff; border-radius: 50%; animation: sf-spin 700ms linear infinite; }
.sf-btn-primary.sf-busy .sf-spinner { display: inline-block; }
@keyframes sf-spin { to { transform: rotate(360deg); } }

#sf-hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
#sf-turnstile { margin: 6px 0 4px; }

/* Klaar */
#sf-step-done { text-align: center; padding: 32px 20px; }
#sf-done-icon { width: 56px; height: 56px; border-radius: 50%; background: #e6f4ee; color: var(--sf-ok); margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; }
#sf-done-icon svg { width: 30px; height: 30px; }
#sf-done-ticket { font-size: 14px; color: var(--sf-text-sub); margin: 0 0 20px; }
#sf-done-ticket strong { color: var(--sf-text); }

/* Bijlagen */
.sf-file-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sf-file-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--sf-border); border-radius: 6px; padding: 6px 6px 6px 8px; background: #fff; }
.sf-file-thumb { width: 40px; height: 40px; border-radius: 4px; background: var(--sf-surface); flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--sf-text-sub); }
.sf-file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sf-file-thumb svg { width: 20px; height: 20px; }
.sf-file-text { flex: 1; min-width: 0; }
.sf-file-name { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-file-size { display: block; font-size: 12px; color: var(--sf-text-sub); }
.sf-file-remove { width: 36px; height: 36px; border: 0; background: none; border-radius: 6px; cursor: pointer; color: var(--sf-text-sub); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sf-file-remove:hover { background: var(--sf-surface); color: var(--sf-danger); }
.sf-file-remove svg { width: 16px; height: 16px; }
.sf-file-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 12px;
  border: 1.5px dashed var(--sf-input-border); border-radius: 6px; color: var(--sf-blue); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.sf-file-btn:hover { border-color: var(--sf-blue); background: var(--sf-blue-tint); }
.sf-file-btn:focus-within { border-color: var(--sf-blue); box-shadow: 0 0 0 3px var(--sf-blue-tint-strong); }
.sf-file-btn svg { width: 18px; height: 18px; }
#sf-upload-progress { margin: 4px 0 8px; }
#sf-upload-progress-text { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
#sf-upload-progress-track { height: 8px; background: var(--sf-surface); border-radius: 999px; overflow: hidden; }
#sf-upload-progress-bar { height: 100%; width: 0; background: var(--sf-blue); border-radius: 999px; transition: width 200ms ease; }
#sf-done-upload-warning { text-align: left; margin-bottom: 18px; }

/* ⓘ-knopje met uitlegballon (zie infoButtonHtml) */
.sf-label-row { position: relative; display: flex; align-items: center; gap: 2px; margin-bottom: 5px; }
.sf-label-row .sf-label { margin-bottom: 0; }
.sf-info-btn {
  width: 28px; height: 28px; margin: -6px 0; border: 0; background: none; border-radius: 50%; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; color: var(--sf-text-sub); cursor: pointer;
}
.sf-info-btn svg { width: 17px; height: 17px; }
.sf-info-btn:hover, .sf-info-btn[aria-expanded="true"] { color: var(--sf-blue); background: var(--sf-blue-tint); }
.sf-info-btn:focus-visible { outline: 2px solid var(--sf-blue); outline-offset: 1px; }
.sf-info-tip {
  display: none; position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; max-width: 340px;
  background: var(--sf-text); color: #fff; font-size: 13px; font-weight: 400; line-height: 1.45;
  padding: 9px 11px; border-radius: 6px; box-shadow: 0 6px 18px rgba(47, 57, 65, 0.18);
}
.sf-info-tip--open { display: block; }
@media (hover: hover) { .sf-info-btn:hover + .sf-info-tip { display: block; } }
/* Link naar /handleidingen op een apparaatkaart (alleen als er documenten zijn). */
.sf-device-docs-slot:empty { display: none; }
.sf-device-docs-slot { margin: -4px 0 12px; }
.sf-device-docs-link { display: inline-flex; align-items: center; gap: 6px; color: var(--sf-blue); font-size: 14px; text-decoration: none; }
.sf-device-docs-link:hover { text-decoration: underline; }
.sf-device-docs-link svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Terug naar de Service & Support-pagina (niet als de pagina ingesloten is:
   dan staat de webshop er al omheen). */
#sf-back-to-support {
  display: inline-flex; align-items: center; gap: 4px; margin-top: max(12px, env(safe-area-inset-top)); color: var(--sf-blue);
  font-size: 14px; font-weight: 600; text-decoration: none;
}
#sf-back-to-support svg { width: 18px; height: 18px; }
#sf-back-to-support:hover span { text-decoration: underline; }
html.sf-embedded #sf-back-to-support { display: none; }
#sf-back-to-support + #sf-header { padding-top: 8px; }

/* Taalkeuze: zichtbaar label "Language" (bewust niet vertaald -- wie de taal
   niet leest, herkent het Engelse woord wel). */
#sf-lang-wrap { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
#sf-lang-label { font-size: 12px; font-weight: 600; color: var(--sf-text-sub); }

/* Verklaring vooraf */
#sf-disclaimer-text { font-size: 14px; line-height: 1.55; color: var(--sf-text); }
#sf-disclaimer-text p { margin: 0 0 10px; }
#sf-disclaimer-text a { color: var(--sf-blue); }
#sf-disclaimer-check-row {
  display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 4px; padding: 12px;
  border: 1px solid var(--sf-border); border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 600;
}
#sf-disclaimer-check { width: 18px; height: 18px; margin: 1px 0 0; flex-shrink: 0; cursor: pointer; }
#sf-disclaimer-next-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Dealermodus */
#sf-dealer-banner {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px 12px;
  background: #edf7ff; border: 1px solid #c2e0f7; border-radius: 6px; font-size: 14px; color: var(--sf-text);
}
#sf-dealer-banner svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--sf-blue); }
#sf-dealer-shop-row { margin: 0 0 14px; }
#sf-dealer-shop-select.sf-invalid { border-color: #d93f4c; }
#sf-dealer-login-link { margin-left: 6px; color: inherit; font-weight: 600; }

/* Ingang voor dealers: kleine knop in de kop, tussen de titel en de taalkeuze */
#sf-dealer-entry-btn {
  flex-shrink: 0; font-size: 13px; font-weight: 600; color: var(--sf-blue); text-decoration: none;
  border: 1px solid var(--sf-border); border-radius: 999px; padding: 5px 10px; background: #fff; white-space: nowrap;
}
#sf-dealer-entry-btn:hover { border-color: var(--sf-blue); }
/* Smal scherm: titel krijgt de hele eerste regel, dealerknop + taalkeuze
   rechts op de regel eronder (anders wordt de ondertitel woord voor woord geknepen). */
@media (max-width: 480px) {
  #sf-header:has(#sf-dealer-entry-btn:not([hidden])) { flex-wrap: wrap; row-gap: 8px; }
  #sf-header:has(#sf-dealer-entry-btn:not([hidden])) #sf-header-titles { flex: 1 1 calc(100% - 46px); }
  #sf-dealer-entry-btn { margin-left: auto; }
}
