/**
 * Fin CRM - Dialoge: Formular, Rueckfrage, Maengelanzeige.
 *
 * Eigene Datei, weil die Dialoge als EINZIGE ausserhalb von `.in-fc` haengen:
 * Sie werden an `document.body` gehaengt, damit kein Elternteil mit
 * `overflow` sie beschneidet. Die Farbtoken bekommen sie ueber
 * `.in-fc-hintergrund` (definiert in `fincrm-demo.css`) - ohne den Selektor
 * dort waeren hier alle `var(--fc-*)` ungueltig.
 */

/* ========================================
   DIALOG
   ======================================== */

.in-fc-hintergrund {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.45);
}

.in-fc-dialog {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  border-radius: 12px;
  background: var(--fc-karte, #ffffff);
  color: #1b181d;
  font-family: Roboto, 'Helvetica Neue', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.3);
}

.in-fc-dialog--schmal {
  width: min(440px, 100%);
}

.in-fc-dialog h2 {
  margin: 0 0 16px;
  font-family: inherit;
  font-size: 22px;
  font-weight: 600;
}

.in-fc-dialog p {
  margin: 0 0 16px;
  line-height: 1.6;
}

.in-fc-formraster {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.in-fc-feld {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.in-fc-feld--breit {
  grid-column: 1 / -1;
}

.in-fc-feld-label {
  font-size: 13px;
  color: #6b7280;
}

.in-fc-feld-hinweis {
  font-size: 12px;
  color: #6b7280;
}

.in-fc-feld input,
.in-fc-feld select,
.in-fc-feld textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: inherit;
  font: inherit;
}

.in-fc-feld textarea {
  min-height: 80px;
  resize: vertical;
}

.in-fc-feld input:focus,
.in-fc-feld select:focus,
.in-fc-feld textarea:focus {
  outline: 2px solid #455a64;
  outline-offset: 1px;
  border-color: #455a64;
}

.in-fc-maengel {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #f3c4c4;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
}

.in-fc-maengel ul {
  margin: 0;
  padding-left: 18px;
}

.in-fc-dialog-fuss {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.in-fc-dialog-knoepfe {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
