/* Opmaak voor het Conscribo-formulier (hostedForm), ingeladen op onze eigen pagina.
   Conscribo zet inline stijlen (vaste breedtes, grijze tekst), daarom staat er op sommige plekken !important. */

:root {
  --accent: #e43c5c;
  --accent-dark: #c52a49;
  --text: #2b2d42;
  --muted: #6b7080;
  --line: #d9dce3;
  --bg: #f4f5f8;
  --card: #ffffff;
  --error: #c0182f;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e8e9ee;
    --muted: #9aa0b0;
    --line: #3a3e4d;
    --bg: #14151c;
    --card: #1e202b;
    --error: #ff6b80;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 24px 16px 48px; }

.brand {
  display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
  background: #1a1b26; color: #fff; padding: 16px 20px; border-radius: var(--radius);
}
.brand h1 { margin: 0; font-size: 1.75rem; line-height: 1.2; }
.brand p { margin: 2px 0 0; color: #b8bccb; font-size: .9rem; }
.brand a { color: #ff8da1; text-decoration: none; }
.brand a:hover { text-decoration: underline; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 2px 14px rgba(0, 0, 0, .08);
  padding: 24px;
}

/* ---------- Conscribo-formulier ---------- */

#hostedForm .grid-container { display: block; }

/* Dubbele groepslabels en scheidingslijnen verbergen; elk veld heeft al een eigen label */
#hostedForm .inputLabel.first,
#hostedForm .hr { display: none; }

#hostedForm .textDiv { color: var(--muted); font-size: .95rem; margin-bottom: 16px; }
#hostedForm .textDiv p { margin: 0 0 .5rem; }

#hostedForm .element-group-container {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 12px;
  margin-bottom: 14px;
}
#hostedForm .element-group { flex: 1 1 160px; min-width: 0; }

#hostedForm .inputLabel.second { font-size: .875rem; font-weight: 600; margin-bottom: 4px; }

#hostedForm input[type=text],
#hostedForm input:not([type]),
#hostedForm select {
  width: 100% !important;
  padding: 11px 12px;
  font: inherit;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color .15s, box-shadow .15s;
}
#hostedForm input:focus,
#hostedForm select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(228, 60, 92, .2);
}
#hostedForm input.invalidValue,
#hostedForm select.invalidValue { border-color: var(--error); }
#hostedForm .invalidLabel { color: var(--error); font-size: .825rem; margin-top: 4px; }

/* Bankrekening: tabel omzetten naar label + veld onder elkaar */
#hostedForm .accountTable,
#hostedForm .accountTable tbody { display: block; width: 100%; }
#hostedForm .accountTable tr {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 10px;
}
#hostedForm .accountTable td { display: block; padding: 0; font-size: .875rem; font-weight: 600; }
#hostedForm .accountTable td:has(input) { font-weight: 400; }

/* Machtiging: vinkvak voor de tekst */
#hostedForm .element-group:has(input[type=checkbox]) {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 12px;
  flex-basis: 100%;
}
#hostedForm input[type=checkbox] { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--accent); }
#hostedForm .element-group:has(input[type=checkbox]) .inputLabel { font-weight: 400; }
#hostedForm .inputLabel p { display: block !important; margin: 0 0 .5rem; }
#hostedForm .inputLabel span { font-size: .9rem !important; color: var(--muted) !important; line-height: 1.5 !important; }
#hostedForm .inputLabel p { font-size: .9rem !important; line-height: 1.5 !important; color: var(--muted) !important; }
#hostedForm .inputLabel p:last-child { display: none !important; }

/* Kalender van het datumveld */
#hostedForm .calendarHeaderTable,
#hostedForm .calendarTable { font-size: .85rem; background: var(--card); box-shadow: 0 4px 16px rgba(0, 0, 0, .2); }
#hostedForm .calendarHeaderButton { cursor: pointer; }

#hostedForm .submitButton {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}
#hostedForm .submitButton:hover { background: var(--accent-dark); }
#hostedForm .submitButton:disabled { opacity: .6; cursor: wait; }

@media (max-width: 480px) {
  .card { padding: 18px 16px; }
  .brand h1 { font-size: 1.4rem; }
  #hostedForm .element-group { flex-basis: 100%; }
}
