/* ============================================================
   Opdracht aanbieden — formulierpagina
   Bouwt voort op styles.css (tokens, nav, footer, .field, .btn)
   Accent op deze pagina = ZCS-groen.
   ============================================================ */

/* Groen accent scoped op deze pagina */
.opd-page {
  --accent: #4a7c59;
  --accent-deep: #3a6347;
  --accent-soft: color-mix(in oklch, var(--accent), white 86%);
  --accent-line: color-mix(in oklch, var(--accent), white 70%);
}

/* Stage-aanmeldformulier — eigen CollabSpace-kleur (blauw) ter onderscheid
   van het project-aanbiedformulier (groen). */
.opd-page-stage {
  --accent: #2E6F94;
  --accent-deep: #235877;
  --accent-soft: color-mix(in oklch, var(--accent), white 86%);
  --accent-line: color-mix(in oklch, var(--accent), white 70%);
}

/* ---------- Hero / intro ---------- */
.opd-hero {
  position: relative;
  padding: 150px 0 56px;
  background:
    linear-gradient(180deg,
      color-mix(in oklch, var(--accent), white 90%) 0%,
      color-mix(in oklch, var(--accent), white 95%) 45%,
      var(--paper) 100%);
  overflow: hidden;
}
.opd-hero-cloud {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 16% 28%, color-mix(in oklch, var(--accent), transparent 78%), transparent 46%),
    radial-gradient(circle at 82% 22%, color-mix(in oklch, var(--accent), transparent 84%), transparent 50%);
  pointer-events: none;
}
.opd-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
}
.opd-hero-title {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.03;
  margin-top: 22px;
  text-wrap: balance;
}
.opd-hero-lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-700);
  margin-top: 22px;
  max-width: 680px;
}

/* Stappen / wat-gebeurt-er-na strip */
.opd-after {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
  max-width: 760px;
}
@media (max-width: 720px) {
  .opd-after { grid-template-columns: 1fr; gap: 12px; }
}
.opd-after-item {
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-md);
  padding: 18px 18px 18px 18px;
  backdrop-filter: blur(6px);
}
.opd-after-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 12px;
}
.opd-after-item h4 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 5px;
}
.opd-after-item p {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-500);
}

/* ---------- Form layout ---------- */
.opd-form-section {
  background: var(--paper);
  padding: 64px 0 110px;
}
.opd-form-wrap {
  max-width: 820px;
  margin: 0 auto;
}

.opd-form {
  background: white;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

/* Section block inside the form */
.opd-section {
  padding: 40px 48px;
  border-bottom: 1px solid var(--ink-100);
}
.opd-section:last-of-type { border-bottom: none; }
@media (max-width: 600px) {
  .opd-section { padding: 32px 22px; }
}
.opd-section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.opd-section-num {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
}
.opd-section-head h2 {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.opd-section-head p {
  font-size: 13.5px;
  color: var(--ink-500);
  margin-top: 2px;
}

/* ---------- Fields ---------- */
.opd-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 22px;
}
.opd-field:last-child { margin-bottom: 0; }
.opd-field > label,
.opd-fieldset > legend {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-800);
  letter-spacing: 0.01em;
  margin-bottom: 9px;
  padding: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.opd-req {
  color: var(--accent);
  font-weight: 800;
}
.opd-optional {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-400);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.opd-hint {
  font-size: 12.5px;
  color: var(--ink-500);
  margin-top: -3px;
  margin-bottom: 9px;
  line-height: 1.45;
}

/* Type opdracht — explainer */
.opd-typeinfo {
  margin: -4px 0 22px;
  padding: 18px 20px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-md);
}
.opd-typeinfo-lead {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-deep);
  margin: 0 0 12px;
}
.opd-typeinfo-list {
  display: grid;
  gap: 12px;
  margin: 0;
}
.opd-typeinfo-item dt {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 2px;
}
.opd-typeinfo-item dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-700);
}

.opd-field input[type="text"],
.opd-field input[type="email"],
.opd-field input[type="tel"],
.opd-field textarea,
.opd-field select {
  font-family: inherit;
  font-size: 15px;
  color: var(--ink-900);
  padding: 13px 15px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  background: var(--paper);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  width: 100%;
}
.opd-field input::placeholder,
.opd-field textarea::placeholder { color: var(--ink-400); }
.opd-field input:focus,
.opd-field textarea:focus,
.opd-field select:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.opd-field textarea { resize: vertical; min-height: 104px; line-height: 1.55; }
.opd-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235A6388' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.opd-field.invalid input,
.opd-field.invalid textarea,
.opd-field.invalid select {
  border-color: var(--c-red);
  background: color-mix(in oklch, var(--c-red), white 94%);
}
.opd-err {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--c-red);
  font-size: 12.5px;
  font-weight: 500;
  margin-top: 7px;
}
.opd-err::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--c-red);
  flex-shrink: 0;
}

.opd-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 560px) {
  .opd-row-2 { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- Choice cards (radio / checkbox) ---------- */
.opd-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 22px;
}
.opd-fieldset:last-child { margin-bottom: 0; }
.opd-choices {
  display: grid;
  gap: 10px;
}
.opd-choices.cols-2 { grid-template-columns: 1fr 1fr; }
.opd-choices.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) {
  .opd-choices.cols-2,
  .opd-choices.cols-3 { grid-template-columns: 1fr; }
}

.opd-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  background: var(--paper);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-800);
  line-height: 1.35;
}
.opd-choice:hover { border-color: var(--accent-line); background: white; }
.opd-choice input { position: absolute; opacity: 0; pointer-events: none; }

.opd-choice .opd-mark {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border: 2px solid var(--ink-300);
  background: white;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.18s, background 0.18s;
}
.opd-choice .opd-mark.radio { border-radius: 50%; }
.opd-choice .opd-mark.check { border-radius: 6px; }
.opd-choice .opd-mark svg { opacity: 0; transform: scale(0.6); transition: opacity 0.15s, transform 0.15s; }

.opd-choice.checked {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.opd-choice.checked .opd-mark {
  border-color: var(--accent);
  background: var(--accent);
}
.opd-choice.checked .opd-mark svg { opacity: 1; transform: scale(1); }
.opd-choice.checked { color: var(--accent-deep); font-weight: 600; }

.opd-fieldset.invalid .opd-choices {
  border-radius: var(--radius-md);
}
.opd-fieldset.invalid .opd-choice {
  border-color: color-mix(in oklch, var(--c-red), white 55%);
}

/* ---------- File upload ---------- */
.opd-upload {
  border: 1.5px dashed var(--ink-200);
  border-radius: var(--radius-md);
  background: var(--paper);
  padding: 26px 22px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.opd-upload:hover { border-color: var(--accent-line); background: white; }
.opd-upload input { display: none; }
.opd-upload-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.opd-upload strong {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink-800);
  margin-bottom: 4px;
}
.opd-upload span { font-size: 12.5px; color: var(--ink-500); }
.opd-filelist {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.opd-fileitem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--accent-deep);
}
.opd-fileitem .name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.opd-fileitem .size { color: var(--ink-500); font-size: 12px; }
.opd-fileitem button {
  margin-left: auto;
  color: var(--ink-500);
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.opd-fileitem button:hover { background: white; color: var(--c-red); }

/* ---------- Consent ---------- */
.opd-consent {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 18px 20px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  background: var(--paper);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}
.opd-consent:hover { border-color: var(--accent); background: var(--accent-soft); }
.opd-consent.checked { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.opd-consent.invalid {
  border-color: var(--c-red);
  background: color-mix(in oklch, var(--c-red), white 92%);
  box-shadow: inset 0 0 0 1px var(--c-red);
}
.opd-consent input { position: absolute; opacity: 0; pointer-events: none; }

/* Visible, prominent checkbox */
.opd-consent .opd-mark {
  flex-shrink: 0;
  width: 26px; height: 26px;
  margin-top: 1px;
  border: 2px solid var(--ink-400);
  border-radius: 7px;
  background: white;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  transition: border-color 0.18s, background 0.18s, transform 0.12s;
}
.opd-consent .opd-mark svg {
  width: 16px; height: 16px;
  opacity: 0; transform: scale(0.6);
  transition: opacity 0.15s, transform 0.15s;
}
.opd-consent:hover .opd-mark { border-color: var(--accent); }
.opd-consent.invalid .opd-mark { border-color: var(--c-red); }
.opd-consent.checked .opd-mark {
  border-color: var(--accent);
  background: var(--accent);
}
.opd-consent.checked .opd-mark svg { opacity: 1; transform: scale(1); color: white; }

.opd-consent p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-800);
  margin: 0;
}
.opd-consent.checked p { color: var(--accent-deep); }
.opd-consent a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }

/* "Verplicht" badge + instruction prompt */
.opd-consent-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 6px;
}
.opd-consent-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-red);
  background: color-mix(in oklch, var(--c-red), white 88%);
  border: 1px solid color-mix(in oklch, var(--c-red), white 60%);
  padding: 3px 9px;
  border-radius: 999px;
}
.opd-consent.checked .opd-consent-badge {
  color: var(--accent-deep);
  background: color-mix(in oklch, var(--accent), white 84%);
  border-color: var(--accent);
}
.opd-consent-prompt {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-600);
}
.opd-consent.checked .opd-consent-prompt { color: var(--accent-deep); }

/* ---------- Submit bar ---------- */
.opd-submit-bar {
  padding: 32px 48px 40px;
  background: var(--paper-2);
}
@media (max-width: 600px) {
  .opd-submit-bar { padding: 26px 22px 32px; }
}
.opd-submit-note {
  font-size: 12.5px;
  color: var(--ink-500);
  margin-bottom: 18px;
  line-height: 1.5;
}
.opd-submit {
  width: 100%;
  padding: 17px 24px;
  background: var(--accent);
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.opd-submit:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px color-mix(in oklch, var(--accent), transparent 60%);
}
.opd-submit svg { transition: transform 0.2s; }
.opd-submit:hover svg { transform: translateX(3px); }
.opd-submit:disabled {
  opacity: 0.65;
  cursor: progress;
  pointer-events: none;
}

.opd-error-summary {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  margin-bottom: 20px;
  background: color-mix(in oklch, var(--c-red), white 92%);
  border: 1px solid color-mix(in oklch, var(--c-red), white 70%);
  border-radius: var(--radius-md);
  color: color-mix(in oklch, var(--c-red), black 25%);
  font-size: 13.5px;
  line-height: 1.5;
}
.opd-error-summary svg { flex-shrink: 0; margin-top: 1px; }

/* ---------- Success screen ---------- */
.opd-success {
  background: white;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 56px 48px;
  text-align: center;
}
@media (max-width: 600px) { .opd-success { padding: 44px 24px; } }
.opd-success-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
}
.opd-success h2 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.opd-success p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-600, var(--ink-700));
  max-width: 520px;
  margin: 0 auto 12px;
}
.opd-success .opd-success-meta {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--ink-100);
  font-size: 13.5px;
  color: var(--ink-500);
}
.opd-success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}

/* Conditional reveal animation */
.opd-cond {
  animation: opdCondIn 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes opdCondIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
