/* ODS Dijital Onam Formu — Frontend CSS v2 */

#ods-form-wrap {
  --ods-primary: #1a56db;
  --ods-primary-hover: #1648c0;
  --ods-radius: 8px;
  --ods-border: #d1d5db;
  --ods-bg: #f9fafb;
  --ods-error: #dc2626;
  --ods-success: #059669;
  max-width: 680px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  color: #1f2937;
}

.ods-form-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 18px;
  color: #111827;
}

/* ── ADIM GÖSTERGESİ ── */
.ods-steps {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  gap: 0;
}
.ods-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
.ods-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s;
}
.ods-step-lbl {
  font-size: 10px;
  color: #9ca3af;
  font-weight: 500;
  white-space: nowrap;
}
.ods-step.active .ods-step-num {
  background: var(--ods-primary);
  color: #fff;
}
.ods-step.active .ods-step-lbl { color: var(--ods-primary); font-weight: 600; }
.ods-step.done .ods-step-num { background: var(--ods-success); color: #fff; }
.ods-step.done .ods-step-lbl { color: var(--ods-success); }
.ods-step-line {
  flex: 1;
  height: 2px;
  background: #e5e7eb;
  margin-bottom: 14px;
}

/* ── FIELDSET ── */
.ods-fieldset {
  border: 1px solid var(--ods-border);
  border-radius: var(--ods-radius);
  padding: 14px 16px;
  margin: 0 0 14px;
  background: #fff;
}
.ods-fieldset legend {
  font-size: 13px;
  font-weight: 600;
  color: var(--ods-primary);
  padding: 0 6px;
}

/* ── GRID ── */
.ods-row { margin-bottom: 12px; }
.ods-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ods-row-3 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 500px) {
  .ods-row-2, .ods-row-3 { grid-template-columns: 1fr; }
}

/* ── ALAN ── */
.ods-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 4px;
  color: #374151;
}

.ods-field input[type="text"],
.ods-field input[type="email"],
.ods-field input[type="tel"],
.ods-field input[type="number"],
.ods-field select,
.ods-field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--ods-border);
  border-radius: 6px;
  font-size: 13px;
  color: #1f2937;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}

.ods-field input:focus,
.ods-field select:focus,
.ods-field textarea:focus {
  outline: none;
  border-color: var(--ods-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ods-primary) 12%, transparent);
}

.ods-input-error { border-color: var(--ods-error) !important; }
.ods-req { color: var(--ods-error); margin-left: 2px; }
.ods-hint { font-size: 12px; color: #6b7280; margin: -2px 0 10px; }

.ods-error {
  display: none;
  font-size: 11px;
  color: var(--ods-error);
  margin-top: 3px;
}

/* ── DOĞUM TARİHİ ── */
.ods-dob-row {
  display: flex;
  gap: 8px;
}
.ods-dob-sel {
  flex: 1;
  padding: 8px 6px;
  border: 1px solid var(--ods-border);
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  color: #1f2937;
  box-sizing: border-box;
}
.ods-dob-yil {
  width: 88px;
  flex: 0 0 88px;
  padding: 8px 8px;
  border: 1px solid var(--ods-border);
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  color: #1f2937;
  box-sizing: border-box;
}
.ods-dob-sel:focus, .ods-dob-yil:focus {
  outline: none;
  border-color: var(--ods-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ods-primary) 12%, transparent);
}

/* ── KİMLİK TİPİ RADYO ── */
.ods-id-type-row {
  display: flex;
  gap: 20px;
  margin-top: 4px;
}
.ods-radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

/* ── MOD SEÇİCİ ── */
.ods-mod-buttons {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}
.ods-mod-btn {
  flex: 1;
  padding: 10px 12px;
  border: 2px solid var(--ods-border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ods-mod-btn.active {
  border-color: var(--ods-primary);
  background: color-mix(in srgb, var(--ods-primary) 6%, white);
}
.ods-mod-icon { font-size: 18px; }
.ods-mod-label { font-size: 13px; font-weight: 600; color: #111827; }
.ods-mod-desc { font-size: 11px; color: #6b7280; }

/* ── TC DURUM ── */
.ods-input-with-status { position: relative; }
.ods-input-with-status input { padding-right: 28px; }
.ods-tc-status {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 13px; font-weight: 700;
}
.ods-tc-ok    { color: var(--ods-success); }
.ods-tc-err   { color: var(--ods-error); }
.ods-tc-checking { color: #f59e0b; font-size: 11px; }

/* ── CHECKBOX ── */
.ods-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}
.ods-checkbox-label input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--ods-primary);
}

/* ── FOTOĞRAF ── */
.ods-photo-area { display: flex; flex-direction: column; gap: 10px; }
#ods-camera-video { width: 100%; max-width: 340px; border-radius: 6px; }
#ods-photo-preview { max-width: 160px; border-radius: 6px; border: 1px solid var(--ods-border); }
.ods-photo-buttons { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── İMZA ── */
.ods-signature-wrap {
  border: 1px solid var(--ods-border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
#ods-signature-canvas { width: 100%; display: block; }
.ods-sig-buttons { padding: 6px 10px; background: #f9fafb; border-top: 1px solid #f3f4f6; }

/* ── ONAYLAR ── */
.ods-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.ods-link-btn {
  background: none;
  border: none;
  color: var(--ods-primary);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── OTP ── */
.ods-row-otp {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.ods-otp-status { font-size: 12px; color: #6b7280; }
.ods-verified-badge {
  color: var(--ods-success);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 12px;
  background: #ecfdf5;
  border-radius: 6px;
  display: inline-block;
}

/* ── BUTONLAR ── */
.ods-btn {
  padding: 8px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .15s, transform .1s;
  line-height: 1.4;
}
.ods-btn:active { transform: scale(0.98); }
.ods-btn-primary {
  background: var(--ods-primary);
  color: #fff;
  border: 1px solid var(--ods-primary);
}
.ods-btn-primary:hover { background: var(--ods-primary-hover); }
.ods-btn-primary:disabled { background: #93c5fd; border-color: #93c5fd; cursor: not-allowed; }
.ods-btn-outline {
  background: #fff;
  color: #374151;
  border: 1px solid var(--ods-border);
}
.ods-btn-outline:hover { background: #f9fafb; border-color: #9ca3af; }
.ods-btn-large { padding: 10px 24px; font-size: 14px; }

/* ── ADIM NAV ── */
.ods-step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  gap: 10px;
}
.ods-step-nav-right { justify-content: flex-end; }

.ods-submit-hint { font-size: 12px; color: #9ca3af; margin-top: 8px; text-align: center; }

/* ── ALERT ── */
.ods-alert {
  padding: 10px 14px;
  border-radius: 7px;
  font-size: 13px;
  margin-bottom: 14px;
}
.ods-alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.ods-alert-success { background: #ecfdf5; border: 1px solid #bbf7d0; color: #065f46; }

/* ── BAŞARI ── */
.ods-success-box {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: var(--ods-radius);
  padding: 28px 20px;
  text-align: center;
}
.ods-success-icon {
  font-size: 42px;
  color: var(--ods-success);
  margin-bottom: 12px;
}
.ods-success-box h3 { font-size: 18px; color: #065f46; margin: 0 0 8px; }

/* ── POPUP ── */
#ods-popup-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
#ods-popup {
  background: #fff;
  border-radius: 10px;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
#ods-popup-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--ods-border);
  position: sticky; top: 0; background: #fff;
}
#ods-popup-header h3 { margin: 0; font-size: 15px; }
#ods-popup-close {
  background: none; border: none; font-size: 18px; cursor: pointer; color: #6b7280;
  width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
#ods-popup-close:hover { background: #f3f4f6; }
#ods-popup-body { padding: 16px 18px; font-size: 13px; line-height: 1.6; color: #374151; }
