/* ── Tauchschule Formulare – Frontend CSS ──────────────────────────────────── */

.dcmf-wrap {
  max-width: 820px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  color: #1a202c;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.dcmf-header {
  text-align: center;
  padding: 24px 0 16px;
  border-bottom: 3px solid #003366;
  margin-bottom: 24px;
}
.dcmf-header-badges { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.dcmf-badge { font-size: 11px; font-weight: 700; border: 1px solid #aaa; padding: 2px 8px; border-radius: 3px; color: #555; letter-spacing: .5px; }
.dcmf-title { font-size: 24px; font-weight: 800; color: #003366; margin: 0 0 4px; }
.dcmf-subtitle { font-size: 13px; color: #666; margin: 0; }

/* ── Intro ───────────────────────────────────────────────────────────────── */
.dcmf-intro {
  background: #eef3fb;
  border-left: 4px solid #003366;
  padding: 16px 20px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.6;
}
.dcmf-intro p + p { margin-top: 8px; }
.dcmf-note { background: #fff8e1; border-left: 4px solid #f0a500; padding: 8px 12px; margin-top: 10px !important; border-radius: 0 4px 4px 0; }

/* ── Sections ────────────────────────────────────────────────────────────── */
.dcmf-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.dcmf-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #003366;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}
.dcmf-box-title { border-left: 4px solid #e84c4c; padding-left: 10px; border-bottom: none; padding-bottom: 0; }
.dcmf-box { border-left: 4px solid #e84c4c; }
.dcmf-hint { font-size: 13px; color: #666; margin: -8px 0 14px; }

/* ── Grid ────────────────────────────────────────────────────────────────── */
.dcmf-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .dcmf-grid-2 { grid-template-columns: 1fr; } }

/* ── Fields ──────────────────────────────────────────────────────────────── */
.dcmf-field { display: flex; flex-direction: column; gap: 5px; }
.dcmf-field label { font-size: 13px; font-weight: 600; color: #374151; }
.dcmf-field input[type="text"],
.dcmf-field input[type="email"],
.dcmf-field input[type="date"] {
  border: 1.5px solid #d1d5db;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 14px;
  color: #1a202c;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  background: #fff;
}
.dcmf-field input:focus {
  border-color: #003366;
  box-shadow: 0 0 0 3px rgba(0,51,102,.12);
}
.dcmf-req { color: #dc3545; }

/* ── Question rows ───────────────────────────────────────────────────────── */
.dcmf-questions { display: flex; flex-direction: column; gap: 2px; }

.dcmf-question-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 6px;
  background: #f9fafb;
  border: 1px solid transparent;
  transition: border-color .15s, background .15s;
}
.dcmf-question-row:hover { background: #f0f4f8; }
.dcmf-question-row.dcmf-answered-yes { background: #fff5f5; border-color: #fca5a5; }
.dcmf-question-row.dcmf-answered-no  { background: #f0fdf4; border-color: #86efac; }

.dcmf-subq { background: #fafbff; }
.dcmf-subq:hover { background: #f3f4fb; }

.dcmf-q-nr { font-weight: 800; color: #003366; font-size: 14px; text-align: center; }
.dcmf-q-dot { color: #e84c4c; font-size: 18px; }
.dcmf-q-text { font-size: 14px; line-height: 1.5; color: #374151; }
.dcmf-kasten { display: inline-block; font-size: 11px; font-weight: 700; background: #003366; color: #fff; border-radius: 3px; padding: 0 5px; margin-left: 4px; vertical-align: middle; }
.dcmf-star { color: #dc3545; font-size: 11px; }
.dcmf-star-note { font-size: 12px; color: #666; margin-top: 10px; }

/* ── Yes/No radio buttons ────────────────────────────────────────────────── */
.dcmf-q-yn { display: flex; gap: 6px; white-space: nowrap; }
.dcmf-radio-label { cursor: pointer; }
.dcmf-radio-label input[type="radio"] { display: none; }
.dcmf-radio-btn {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid #d1d5db;
  background: #fff;
  color: #6b7280;
  transition: all .15s;
  user-select: none;
}
.dcmf-radio-label input:checked + .dcmf-radio-yes { background: #dc3545; border-color: #dc3545; color: #fff; }
.dcmf-radio-label input:checked + .dcmf-radio-no  { background: #16a34a; border-color: #16a34a; color: #fff; }
.dcmf-radio-btn:hover { border-color: #003366; }

@media (max-width: 600px) {
  .dcmf-question-row { grid-template-columns: 28px 1fr; gap: 8px; }
  .dcmf-q-yn { grid-column: 1 / -1; justify-content: flex-end; }
}

/* ── Declaration / Signature ─────────────────────────────────────────────── */
.dcmf-declaration { border-color: #003366; border-width: 2px; }

.dcmf-sig-label { font-size: 14px; font-weight: 700; display: block; margin-bottom: 4px; }
.dcmf-sig-canvas-wrap {
  position: relative;
  border: 2px solid #003366;
  border-radius: 8px;
  background: #fafbff;
  cursor: crosshair;
  overflow: hidden;
  margin: 10px 0 8px;
  width: 100%;
  box-sizing: border-box;
}
/* All signature canvases – explicit pixel height, 100% CSS width */
.dcmf-sig-canvas-wrap canvas {
  display: block;
  width: 100% !important;
  height: 160px !important;
  touch-action: none;
  cursor: crosshair;
}
.dcmf-sig-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  color: #c0c8d8;
  font-size: 15px;
  pointer-events: none;
  transition: opacity .2s;
}
.dcmf-sig-placeholder.hidden { opacity: 0; }

.dcmf-sig-controls { display: flex; align-items: center; gap: 12px; }
.dcmf-btn-secondary {
  background: none;
  border: 1.5px solid #d1d5db;
  border-radius: 6px;
  padding: 7px 16px;
  font-size: 13px;
  cursor: pointer;
  color: #374151;
  transition: border-color .15s, background .15s;
}
.dcmf-btn-secondary:hover { border-color: #003366; background: #f0f4f8; }
.dcmf-sig-status { font-size: 12px; color: #16a34a; font-weight: 600; }

/* ── Submit ──────────────────────────────────────────────────────────────── */
.dcmf-submit-row { text-align: center; margin-top: 8px; }
.dcmf-btn-primary {
  background: #003366;
  color: #fff;
  border: none;
  padding: 14px 40px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, transform .1s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dcmf-btn-primary:hover { background: #002244; }
.dcmf-btn-primary:active { transform: scale(.98); }
.dcmf-btn-primary:disabled { background: #9ca3af; cursor: not-allowed; }
.dcmf-privacy { font-size: 12px; color: #9ca3af; margin-top: 12px; }

/* ── Error / Success ─────────────────────────────────────────────────────── */
.dcmf-error {
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  color: #991b1b;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
  text-align: left;
}

.dcmf-success {
  text-align: center;
  padding: 40px 24px;
  background: #f0fdf4;
  border: 2px solid #86efac;
  border-radius: 12px;
  margin-top: 16px;
}
.dcmf-success-icon { font-size: 56px; color: #16a34a; margin-bottom: 12px; }
.dcmf-success h3 { font-size: 22px; color: #14532d; margin-bottom: 8px; }
.dcmf-success p { color: #166534; font-size: 15px; }

.dcmf-doctor-warning {
  background: #fff8e1;
  border: 2px solid #f0a500;
  border-radius: 8px;
  padding: 16px 20px;
  margin-top: 16px;
  text-align: left;
  color: #7a5200;
}
.dcmf-doctor-warning strong { display: block; margin-bottom: 6px; font-size: 15px; }

/* ── IDDA-specific additions ─────────────────────────────────────────────── */

/* Rules list (Try Scuba Practices) */
.dcmf-rules-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}
.dcmf-rules-list li {
  position: relative;
  padding: 8px 12px 8px 28px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
  line-height: 1.55;
  color: #374151;
}
.dcmf-rules-list li::before {
  content: '✦';
  position: absolute;
  left: 8px;
  top: 9px;
  color: #003366;
  font-size: 11px;
}
.dcmf-rules-list li:last-child { border-bottom: none; }

/* Legal text block */
.dcmf-legal-text {
  background: #f8fafd;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 16px;
  font-size: 13px;
  line-height: 1.65;
  color: #374151;
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 4px;
}
.dcmf-legal-text p + p { margin-top: 10px; }

/* Checkbox label */
.dcmf-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
  line-height: 1.5;
}
.dcmf-checkbox-label input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: #003366;
  cursor: pointer;
}
