/* ID-Generator-Workbench (SPEC-0038) — 1:1-Port des Style-Blocks aus
 * IdGeneratorOverlay.vue (bereits im Bestand auf semantische Tokens
 * migriert), entscoped. Host-Element trägt .idgen-overlay. */

.idgen-overlay {
  width: 100%;
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(500px, 1.08fr);
  gap: var(--space-6);
  padding: var(--space-6);
  background: var(--surface);
  color: var(--text);
  overflow: auto;
}
.idgen-list-panel,
.idgen-detail-panel {
  min-width: 0;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}
.idgen-panel-head,
.idgen-detail-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6) var(--space-3);
}
.idgen-panel-head span,
.idgen-detail-head span,
.idgen-field span,
.idgen-preview span {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}
.idgen-panel-head h3,
.idgen-detail-head h3 {
  margin: var(--space-1) 0 0;
  font-size: 28px;
  line-height: 1.08;
  color: var(--text);
}
.idgen-head-actions {
  display: flex;
  gap: var(--space-2);
}
.idgen-next-btn:disabled { opacity: 0.5; cursor: default; }
.idgen-field {
  display: grid;
  gap: var(--space-2);
}
.idgen-field--full {
  grid-column: 1 / -1;
}
.idgen-field input,
.idgen-field select,
.idgen-field textarea {
  min-height: 42px;
  border: 1px solid var(--control-border, var(--border));
  border-radius: var(--radius-md);
  background: var(--control-bg, var(--surface));
  color: var(--control-text, var(--text));
  font: inherit;
  padding: 0 var(--space-3);
  outline: none;
}
.idgen-field textarea {
  padding-top: var(--space-3);
  resize: vertical;
}
/* SPEC-0646 — Klasse C: der Ring war da, stand aber auf `:focus`. Fuer ein
   Textfeld ist das verhaltensgleich (der Browser wertet Fokus in einem
   Eingabefeld immer als `:focus-visible`), benennt die Absicht aber falsch.
   `:focus-visible` ist die Form, die der Waechter als Gegenstueck zum
   `outline: none` oben erkennt. */
.idgen-field input:focus-visible,
.idgen-field select:focus-visible,
.idgen-field textarea:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.idgen-filter {
  margin: 0 var(--space-6) var(--space-4);
}
.idgen-list {
  display: grid;
  gap: var(--space-1);
  padding: 0 var(--space-4) var(--space-6);
  max-height: calc(100dvh - 260px);
  overflow: auto;
}
.idgen-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
  min-height: 72px;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  background: transparent;
  color: inherit;
  text-align: left;
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
}
.idgen-row:hover,
.idgen-row.active {
  background: var(--primary-soft);
  border-color: var(--primary);
}
.idgen-state {
  font-family: 'Material Icons';
  width: 30px;
  height: 30px;
  border-radius: var(--radius-pill);
  display: grid;
  place-items: center;
  background: var(--success);
  color: var(--text-inverse);
  font-size: 21px;
}
.idgen-state--in_process {
  background: var(--warning);
}
.idgen-state--archived {
  background: var(--text-soft);
}
.idgen-row-copy {
  display: grid;
  min-width: 0;
}
.idgen-row-copy strong {
  color: var(--text);
}
.idgen-row-copy small {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.idgen-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4) var(--space-5);
  padding: var(--space-2) var(--space-6) var(--space-6);
}
.idgen-component-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}
.idgen-component-picker label {
  min-height: 40px;
  display: flex;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.idgen-component-picker small {
  color: var(--text-muted);
}
.idgen-preview {
  margin: 0 var(--space-6) var(--space-6);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: var(--space-4) var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  background: var(--primary-soft);
}
.idgen-preview strong {
  display: block;
  color: var(--primary);
  font-size: 22px;
  line-height: 1.2;
}
.idgen-next-btn {
  min-height: 42px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--text-inverse);
  padding: 0 var(--space-4);
  font-weight: 800;
  cursor: pointer;
}
.idgen-message {
  margin: 0 var(--space-6) var(--space-3);
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--text);
  border: 1px solid var(--primary);
}
.idgen-message--success {
  background: var(--success-soft);
  color: var(--success);
  border-color: var(--success);
}
.idgen-message--error {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger);
}
.idgen-empty {
  padding: var(--space-5);
  color: var(--text-muted);
}
@media (max-width: 1180px) {
  .idgen-overlay {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .idgen-overlay {
    padding: 18px;
  }
  .idgen-form,
  .idgen-component-picker {
    grid-template-columns: 1fr;
  }
}

/* ====== SPEC-0646 — Windows-Kontrastmodus =============================== *
 * Edge/Chromium zeichnen unter `forced-colors: active` KEINEN `box-shadow`
 * und zwingen jede Rahmen- und Flaechenfarbe auf eine Systemfarbe. Damit
 * faellt jeder Fokusring dieses Blattes dort ersatzlos aus — der ring-lose
 * Rahmenwechsel ebenso, weil dann jeder Rahmen dieselbe Farbe traegt.
 * `outline` WIRD gezeichnet und ist das einzige Mittel, das dort traegt.
 * `Highlight` ist die Systemfarbe fuer Auswahl und hebt sich per Definition
 * vom `Canvas` des Nutzers ab; `outline-offset` haelt den Ring von der
 * eigenen Kante frei, die dort ebenfalls `CanvasText` traegt.
 * KEIN `forced-color-adjust: none` — das naehme dem Nutzer genau die
 * Farbwahl, um die es hier geht (SPEC-0646, Entscheidung E3).
 * ====================================================================== */
@media (forced-colors: active) {
  .idgen-field input:focus-visible,
  .idgen-field select:focus-visible,
  .idgen-field textarea:focus-visible {
    outline: 2px solid Highlight;
    outline-offset: 2px;
  }
}
