/* Layout des Promo-Grafik-Generators: Eingaben links, Banner-Vorschau rechts. */

.promo {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  padding: 16px;
  max-width: 1400px;
  margin: 0 auto;
}

.sidebar { display: flex; flex-direction: column; gap: 12px; }

.hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 0 0 10px;
}

/* Eingabefelder */
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  flex: 1;
}

.field:last-child { margin-bottom: 0; }

.field-row { display: flex; gap: 10px; }

/* Droplet (Bookmarklet) zum Ziehen in die Lesezeichenleiste */
.droplet {
  width: 100%;
  cursor: grab;
  border-style: dashed;
  border-color: var(--accent-2);
  color: var(--accent-2);
  font-weight: 600;
  user-select: none;
}
.droplet:hover { background: rgb(34 211 165 / 0.10); border-color: var(--accent-2); }
.droplet:active { cursor: grabbing; }

.field .bullet-input { margin-bottom: 6px; }
.field .bullet-input:last-child { margin-bottom: 0; }

textarea {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  resize: vertical;
}

textarea:focus { outline: none; border-color: var(--accent); }

input[type="color"] {
  width: 100%;
  height: 34px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
}

/* Modell-Liste mit Fortschritt (wie im Hintergrund-Entferner) */
.model-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.model-list li {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.model-list .model-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.model-list .state { font-family: var(--mono); white-space: nowrap; }
.model-list li.ready .state { color: var(--accent-2); }

.model-list .bar {
  height: 3px;
  margin-top: 3px;
  border-radius: 2px;
  background: var(--surface-2);
  overflow: hidden;
}

.model-list .bar > div {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.2s;
}

.status {
  font-size: 0.85rem;
  margin: 0 0 10px;
  min-height: 1.4em;
}

.status.working { color: var(--accent); }
.status.error { color: var(--danger); }

/* Vorschau */
.preview-area { align-self: start; }

.pane {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.pane figcaption {
  padding: 8px 14px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}

/* Format-Umschalter über der Vorschau */
.format-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.format-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.fl-label {
  align-self: center;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-right: 4px;
  min-width: 48px;
}

.format-option:hover { border-color: var(--accent); }
.format-option.active { border-color: var(--accent); background: rgb(79 140 255 / 0.12); }
.format-option .name { font-size: 0.8rem; }
.format-option .dim { font-size: 0.68rem; color: var(--text-dim); font-family: var(--mono); }

.pane-body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--surface-2);
  min-height: 360px;
}

#banner {
  display: block;
  max-width: 100%;
  max-height: 74vh;
  width: auto;
  height: auto;
  box-shadow: var(--shadow);
}

/* Fortschritt während der Freistellung (überlagert die Vorschau) */
.work-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgb(11 14 20 / 0.72);
}

.work-overlay[hidden] { display: none; }

.work-track {
  width: min(320px, 70%);
  height: 6px;
  border-radius: 3px;
  background: var(--surface-2);
  overflow: hidden;
}

.work-fill {
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.15s linear;
}

.work-label {
  font-size: 0.85rem;
  color: var(--text);
}

@media (max-width: 1000px) {
  .promo { grid-template-columns: 1fr; }
}
