/* Default Form.io theme applied when no CustomCss exists */
.formio-default-theme .formio-form {
  --fd-primary: #0ea5e9;
  --fd-primary-strong: #0284c7;
  --fd-bg: #f8fafc;
  --fd-surface: #ffffff;
  --fd-text: #0f172a;
  --fd-muted: #64748b;
  --fd-border: #dbeafe;
  --fd-danger: #dc2626;
  width: 100%;
  max-width: 100%;
  padding: 14px;
  border: 1px solid var(--fd-border);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, var(--fd-bg) 100%);
  color: var(--fd-text);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
}

.formio-default-theme .formio-form .formio-component {
  margin-bottom: 12px;
}

.formio-default-theme .formio-form label.control-label,
.formio-default-theme .formio-form label.col-form-label {
  color: var(--fd-text);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
}

.formio-default-theme .formio-form .form-control,
.formio-default-theme .formio-form .choices__inner,
.formio-default-theme .formio-form input.form-control,
.formio-default-theme .formio-form select.form-control,
.formio-default-theme .formio-form textarea.form-control {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  min-height: 42px;
  background: var(--fd-surface);
  color: var(--fd-text);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
}

.formio-default-theme .formio-form .form-control:focus,
.formio-default-theme .formio-form .choices__inner:focus,
.formio-default-theme .formio-form .form-control.is-focus,
.formio-default-theme .formio-form .choices__inner.is-focused {
  border-color: var(--fd-primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
  outline: none;
}

.formio-default-theme .formio-form textarea.form-control {
  min-height: 120px;
}

.formio-default-theme .formio-form .btn-primary,
.formio-default-theme .formio-form .formio-component-button .btn {
  background: linear-gradient(135deg, var(--fd-primary) 0%, var(--fd-primary-strong) 100%);
  border-color: var(--fd-primary-strong);
  border-radius: 10px;
  font-weight: 700;
  min-height: 42px;
  padding: 8px 20px;
}

.formio-default-theme .formio-form .btn-primary:hover,
.formio-default-theme .formio-form .formio-component-button .btn:hover {
  filter: brightness(0.98);
}

.formio-default-theme .formio-form .btn-secondary,
.formio-default-theme .formio-form .btn-light {
  border-radius: 10px;
}

.formio-default-theme .formio-form .formio-component-panel > .card,
.formio-default-theme .formio-form .card {
  border: 1px solid #dbeafe;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.formio-default-theme .formio-form .formio-component-panel > .card > .card-header,
.formio-default-theme .formio-form .card > .card-header {
  background: #eff6ff;
  border-bottom: 1px solid #dbeafe;
  color: #1e3a8a;
  font-weight: 700;
}

.formio-default-theme .formio-form .help-block {
  color: var(--fd-muted);
  font-size: 12px;
}

.formio-default-theme .formio-form .formio-errors,
.formio-default-theme .formio-form .text-danger {
  color: var(--fd-danger);
}

.formio-default-theme .formio-form .formio-component-file .fileSelector,
.formio-default-theme .formio-form .formio-component-file .fileDrop {
  border: 1px dashed #93c5fd;
  border-radius: 10px;
  background: #f0f9ff;
  color: #0c4a6e;
}

.formio-default-theme .formio-form .formio-component-table table,
.formio-default-theme .formio-form .formio-component-datagrid table {
  border: 1px solid #dbeafe;
  border-radius: 10px;
  overflow: hidden;
}

.formio-default-theme .formio-form .formio-component-table table th,
.formio-default-theme .formio-form .formio-component-datagrid table th {
  background: #f8fafc;
  border-bottom: 1px solid #dbeafe;
  color: #1e293b;
}

.formio-default-theme .formio-form .formio-component-signature canvas {
  border-radius: 10px;
}

.formio-default-theme[dir="rtl"] .formio-form {
  direction: rtl;
}

.formio-default-theme[dir="ltr"] .formio-form {
  direction: ltr;
}

@media (max-width: 768px) {
  .formio-default-theme .formio-form {
    padding: 10px;
    border-radius: 10px;
  }
}
