/* ==========================================================================
   Oslo AI — Sainer demo formulier
   ========================================================================== */

.osd {
  --osd-text:    #1e3c3f;
  --osd-muted:   #6b8285;
  --osd-border:  #e0e0e0;
  --osd-bg:      #f7f7f8;
  --osd-accent:  #2E7E80;
  --osd-accent2: #4AACAA;
  --osd-error:   #c0392b;
  font-family: 'DM Sans', sans-serif;
  color: var(--osd-text);
  width: 100%;
}

.osd [hidden] { display: none !important; }

/* Velden --------------------------------------------------------------- */
.osd-form { display: flex; flex-direction: column; gap: 16px; }

.osd-field { display: flex; flex-direction: column; gap: 6px; }

.osd-field label {
  font-size: 14px;
  font-weight: 500;
  color: var(--osd-text);
}

.osd-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 14px;
  background: var(--osd-bg);
  border: 1px solid var(--osd-border);
  border-radius: 10px;
  color: var(--osd-text);
  font-size: 16px; /* 16px voorkomt inzoomen op iOS */
  font-family: inherit;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.osd-field input::placeholder { color: #a0a0a0; }

.osd-field input:focus {
  outline: none;
  background: #fff;
  border-color: var(--osd-accent);
  box-shadow: 0 0 0 3px rgba(46, 126, 128, .15);
}

.osd .is-invalid,
.osd-field input.is-invalid {
  border-color: var(--osd-error) !important;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, .12);
}

/* Honeypot: buiten beeld, niet display:none (sommige bots slaan dat over) */
.osd-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Toestemming ------------------------------------------------------------ */
.osd-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--osd-muted);
  cursor: pointer;
}

.osd-consent input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--osd-accent);
  cursor: pointer;
}

.osd-consent input.is-invalid { outline: 2px solid var(--osd-error); outline-offset: 2px; }

.osd a { color: var(--osd-accent); text-decoration: underline; }

/* Knop ------------------------------------------------------------------- */
.osd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
  padding: 15px 24px;
  border: 0;
  border-radius: 50px;
  background: linear-gradient(60deg, #2E7E80 0%, #4AACAA 100%);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .25s ease, opacity .2s ease;
}

.osd-btn::after {
  content: "→";
  transition: transform .28s ease;
}

.osd-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(46, 126, 128, .30); }
.osd-btn:hover::after { transform: translateX(5px); }
.osd-btn:disabled { opacity: .75; cursor: wait; transform: none; box-shadow: none; }

.osd-btn--ghost {
  background: transparent;
  color: var(--osd-accent);
  border: 1px solid rgba(46, 126, 128, .55);
}
.osd-btn--ghost:hover { box-shadow: none; background: rgba(46, 126, 128, .06); }

/* Meldingen -------------------------------------------------------------- */
.osd-msg {
  margin: 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(192, 57, 43, .08);
  color: var(--osd-error);
  font-size: 14px;
}

/* Turnstile-check: neemt alleen ruimte in als Cloudflare een check toont */
.osd-captcha:empty { display: none; }
.osd-captcha iframe { max-width: 100%; }

/* Voortgang -------------------------------------------------------------- */
.osd-progress { padding: 8px 0 4px; }

.osd-progress__head {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
}

.osd-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid rgba(46, 126, 128, .2);
  border-top-color: var(--osd-accent);
  animation: osd-spin .9s linear infinite;
}

@keyframes osd-spin { to { transform: rotate(360deg); } }

.osd-bar {
  height: 6px;
  margin: 20px 0 14px;
  border-radius: 6px;
  background: #edf2f2;
  overflow: hidden;
}

.osd-bar__fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2E7E80 0%, #4AACAA 35%, #E8973A 70%, #C9566B 100%);
  transition: width .5s ease;
}

.osd-status {
  min-height: 1.4em;
  margin: 0;
  font-size: 15px;
  color: var(--osd-text);
}

.osd-hint {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--osd-muted);
}

/* Resultaat -------------------------------------------------------------- */
.osd-done,
.osd-fail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
}

.osd-done strong,
.osd-fail strong { font-size: 20px; }

.osd-done p,
.osd-fail p { margin: 0; font-size: 15px; line-height: 1.5; color: #265156; }

.osd-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 26px 26px;
}

.osd-icon--ok {
  background-color: rgba(46, 126, 128, .12);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E7E80' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1.9.4 1.8.7 2.7a2 2 0 0 1-.5 2.1L8 9.8a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.7.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E");
  animation: osd-ring 1.2s ease-in-out infinite;
}

.osd-icon--err {
  background-color: rgba(192, 57, 43, .10);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c0392b' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 8v5M12 16.5v.5'/%3E%3C/svg%3E");
}

.osd-fail .osd-btn { width: auto; margin-top: 6px; }

@keyframes osd-ring {
  0%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(-12deg); }
  20%, 40% { transform: rotate(12deg); }
  50%      { transform: rotate(0); }
}

@media (prefers-reduced-motion: reduce) {
  .osd-spinner, .osd-icon--ok { animation: none; }
  .osd-bar__fill, .osd-btn, .osd-btn::after { transition: none; }
}
