/* Prompt-Schmiede. Baut auf style.css auf (Variablen, Navigation,
   Fußzeile) und bringt nur die Stile der Seite selbst mit. Zwei Spalten
   ab 900 px, darunter untereinander. */

.ps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 24px 0 36px;
}

.ps-panel {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 3px solid var(--color-border-light, #e0e0e0);
  border-radius: 16px;
  background: var(--color-bg-primary, #fff);
}

.ps-label {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-primary, #800000);
  margin-bottom: 10px;
}

.ps-textarea {
  width: 100%;
  flex: 1;
  min-height: 220px;
  margin: 0;
  padding: 14px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text-primary, #0a2b59);
  background: var(--color-bg-secondary, #f8f9fa);
  border: 2px solid var(--color-border, #dee2e6);
  border-bottom: 2px solid var(--color-border, #dee2e6);
  border-radius: 10px;
  resize: vertical;
}

.ps-textarea:focus {
  outline: none;
  border: 2px solid var(--color-primary, #800000);
  box-shadow: 0 0 0 3px rgba(128, 0, 0, 0.12);
}

.ps-limit {
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: var(--color-warning-hover, #e65100);
}

.ps-limit[hidden] {
  display: none;
}

.ps-controls {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.ps-modell {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ps-modell legend {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted, #6c757d);
  margin-bottom: 8px;
  padding: 0;
}

.ps-modell-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  font-size: 0.9rem;
  color: var(--color-text-secondary, #495057);
  background: var(--color-bg-secondary, #f8f9fa);
  border: 2px solid var(--color-border, #dee2e6);
  border-radius: 10px;
  cursor: pointer;
}

.ps-modell-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.ps-modell-option strong {
  color: var(--color-text-primary, #0a2b59);
  margin-right: 6px;
}

.ps-modell-option:has(input:checked) {
  border-color: var(--color-primary, #800000);
  background: var(--color-primary-light, #fdf5f5);
}

.ps-modell-option:has(input:focus-visible) {
  outline: 2px solid var(--color-primary, #800000);
  outline-offset: 2px;
}

.ps-btn {
  margin: 0;
  min-height: 48px;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: var(--color-primary, #800000);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.ps-btn:hover:not(:disabled) {
  background: var(--color-primary-hover, #a60000);
}

.ps-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ps-btn.laeuft {
  opacity: 0.85;
}

.ps-btn-zweit {
  color: var(--color-primary, #800000);
  background: #fff;
  border: 2px solid var(--color-primary, #800000);
  min-height: 44px;
}

.ps-btn-zweit:hover:not(:disabled) {
  color: #fff;
  background: var(--color-primary, #800000);
}

.ps-btn-zweit.kopiert {
  color: #fff;
  background: var(--color-safe, #2e7d32);
  border-color: var(--color-safe, #2e7d32);
}

.ps-hint {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted, #6c757d);
}

.ps-hint kbd {
  font-family: inherit;
  font-size: 0.8rem;
  padding: 1px 6px;
  border: 1px solid var(--color-border, #dee2e6);
  border-radius: 5px;
  background: var(--color-bg-secondary, #f8f9fa);
}

.ps-ausgabe-kopf {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.ps-status {
  font-size: 0.85rem;
  color: var(--color-text-muted, #6c757d);
  margin-bottom: 10px;
}

.ps-status.fehler {
  color: var(--color-danger, #c62828);
}

.ps-output {
  flex: 1;
  min-height: 220px;
  max-height: 60vh;
  overflow: auto;
  margin: 0;
  padding: 14px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-primary, #0a2b59);
  background: var(--color-bg-secondary, #f8f9fa);
  border: 2px solid var(--color-border, #dee2e6);
  border-radius: 10px;
  white-space: pre-wrap;
  word-wrap: break-word;
  user-select: text;
}

.ps-output.leer {
  color: var(--color-text-muted, #6c757d);
}

.ps-output.fehler {
  color: var(--color-danger, #c62828);
  background: var(--color-danger-light, #ffebee);
  border-color: var(--color-danger-border, #ef9a9a);
}

.ps-output[aria-busy="true"]::after {
  content: '▍';
  color: var(--color-primary, #800000);
  animation: psBlink 1s steps(2) infinite;
}

@keyframes psBlink {
  to { opacity: 0; }
}

.ps-ausgabe-fuss {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.ps-schritte {
  padding-left: 22px;
  line-height: 1.6;
}

.ps-schritte li {
  margin-bottom: 8px;
}

.ps-hinweis {
  padding: 14px 18px;
  border-left: 4px solid var(--color-primary, #800000);
  background: var(--color-primary-light, #fdf5f5);
  border-radius: 0 8px 8px 0;
  line-height: 1.5;
}

.ps-rot {
  color: #800000;
}

.logo-link {
  text-decoration: none;
}

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

@media (max-width: 600px) {
  .ps-panel {
    padding: 18px;
  }

  .ps-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .ps-btn {
    width: 100%;
  }

  .ps-output {
    max-height: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ps-output[aria-busy="true"]::after {
    animation: none;
  }
}
