/* ─────────────────────────────────────────────────────
   KMS Smart Forms — Public Form Styles
   Compatible with ProbCentre V2 dark/light theme
   ───────────────────────────────────────────────────── */

.ksf-form-wrap { max-width: 720px; margin: 0 auto; }

.ksf-form { display: flex; flex-direction: column; gap: 20px; }

/* Field wrapper */
.ksf-field-wrap { display: flex; flex-direction: column; gap: 6px; }
.ksf-field-label {
  font-size: 14px; font-weight: 600;
  color: var(--t, #1e293b);
}
.ksf-req { color: #ef4444; }

/* Input base */
.ksf-form .ksf-input,
.ksf-form .ksf-select,
.ksf-form .ksf-textarea {
  width: 100%; box-sizing: border-box;
  padding: 11px 14px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 9px;
  font-size: 14px;
  background: rgba(255,255,255,.07);
  color: var(--t, #1e293b);
  transition: border-color .2s, box-shadow .2s;
}
[data-theme="light"] .ksf-form .ksf-input,
[data-theme="light"] .ksf-form .ksf-select,
[data-theme="light"] .ksf-form .ksf-textarea {
  background: #fff;
  border-color: #e2e8f0;
  color: #1e293b;
}
.ksf-form .ksf-input:focus,
.ksf-form .ksf-select:focus,
.ksf-form .ksf-textarea:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14,165,233,.2);
}
.ksf-form .ksf-textarea { min-height: 100px; resize: vertical; }

/* Section heading */
.ksf-section-heading {
  font-size: 16px; font-weight: 700;
  color: var(--t, #1e293b);
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(255,255,255,.1);
  margin-top: 8px;
}
[data-theme="light"] .ksf-section-heading { border-color: #e2e8f0; }
.ksf-section-desc { font-size: 13px; color: var(--muted, #94a3b8); margin: 0; }
.ksf-divider { border: none; border-top: 1px solid rgba(255,255,255,.08); margin: 4px 0; }
[data-theme="light"] .ksf-divider { border-color: #e2e8f0; }

/* Radio & Checkbox groups */
.ksf-radio-group, .ksf-checkbox-group { display: flex; flex-direction: column; gap: 8px; }
.ksf-radio-label, .ksf-checkbox-label {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; font-size: 14px; color: var(--t, #1e293b);
  padding: 8px 12px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  transition: background .15s, border-color .15s;
}
.ksf-radio-label:hover, .ksf-checkbox-label:hover {
  background: rgba(14,165,233,.08);
  border-color: rgba(14,165,233,.4);
}
[data-theme="light"] .ksf-radio-label,
[data-theme="light"] .ksf-checkbox-label {
  background: #f8fafc; border-color: #e2e8f0; color: #1e293b;
}
.ksf-checkbox-single { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: var(--t, #1e293b); }

/* File upload */
.ksf-file-wrap { position: relative; }
.ksf-file-input { position: absolute; opacity: 0; width: 0.1px; height: 0.1px; }
.ksf-file-label {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 24px 20px; border-radius: 10px; cursor: pointer;
  border: 2px dashed rgba(255,255,255,.2);
  background: rgba(255,255,255,.04);
  color: var(--muted, #94a3b8); font-size: 14px;
  transition: border-color .2s, background .2s;
}
.ksf-file-label:hover { border-color: #0ea5e9; background: rgba(14,165,233,.05); }
[data-theme="light"] .ksf-file-label { border-color: #e2e8f0; background: #f8fafc; color: #64748b; }
.ksf-file-icon { font-size: 28px; }
.ksf-file-name { font-size: 12px; color: #0ea5e9; font-weight: 600; }

/* Field description & error */
.ksf-field-desc { font-size: 12px; color: var(--muted, #94a3b8); }
.ksf-field-error { font-size: 12px; color: #ef4444; min-height: 16px; display: none; }
.ksf-field-error.visible { display: block; }
.ksf-field-wrap.has-error .ksf-input,
.ksf-field-wrap.has-error .ksf-select,
.ksf-field-wrap.has-error .ksf-textarea { border-color: #ef4444; }

/* Submit button */
.ksf-form-footer { margin-top: 4px; }
.ksf-submit-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 32px; border-radius: 10px;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff; font-size: 15px; font-weight: 600;
  border: none; cursor: pointer; transition: opacity .2s, transform .1s;
}
.ksf-submit-btn:hover { opacity: .9; }
.ksf-submit-btn:active { transform: scale(.98); }
.ksf-submit-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Error summary */
.ksf-form-errors {
  margin-top: 12px; padding: 12px 16px;
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3);
  border-radius: 8px; color: #ef4444; font-size: 13px;
}

/* Success state */
.ksf-form-success {
  text-align: center; padding: 48px 24px;
  background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.2);
  border-radius: 12px;
}
.ksf-success-icon { font-size: 48px; margin-bottom: 16px; }
.ksf-success-msg { font-size: 16px; color: #10b981; font-weight: 600; }

/* Login notice */
.ksf-login-notice {
  padding: 20px 24px; text-align: center;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; font-size: 14px; color: var(--t, #1e293b);
}
.ksf-login-notice a { color: #0ea5e9; }

/* Hint text */
.ksf-hint { font-size: 11px; color: var(--muted, #94a3b8); }

@media (max-width: 600px) {
  .ksf-radio-group, .ksf-checkbox-group { gap: 6px; }
  .ksf-submit-btn { width: 100%; justify-content: center; }
}
