/* --- Responsive utilities for cards & prompts --- */

/* Sauberer Zeilenumbruch in allen Prompts / großen Textareas */
textarea.form-control {
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 220px;
}

/* Radios/Labels etwas kompakter auf Mobile */
@media (max-width: 576px) {
  .card .card-header h6,
  .card .card-header h5 { font-size: 1rem; }
  .form-check { margin-bottom: .35rem; }
}

/* Card-Footer: mobil gestapelt, ab md wie gehabt */
.responsive-card-footer {
  display: grid;
  gap: .5rem;
}
@media (min-width: 768px) {
  .responsive-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
}

/* Buttons: mobil vollbreit, ab md normal */
.btn-responsive {
  width: 100%;
}
@media (min-width: 768px) {
  .btn-responsive {
    width: auto;
  }
}

/* Schutz gegen horizontales Überlaufen von Karten-Inhalten */
.card-body {
  overflow-x: auto;
}

/* Textareas und Form-Controls bleiben innerhalb ihrer Container */
textarea.form-control,
.form-control {
  max-width: 100%;
}

/* Verhindert horizontales „Sprengen" der Main-Spalte durch lange Inhalte */
.card,
.card-body {
  max-width: 100%;
}

/* XS/SM: niemals fixed oder sticky erzwingen, alles stackt sauber */
@media (max-width: 767.98px) {
  .sidebar {
    position: static !important;
    width: auto !important;
  }
}
