/* ==========================================================================
   responsive.css - gemeinsame Handy- und Tablet-Regeln
   Wird auf allen Seiten NACH den Seitensheets geladen und zieht deshalb
   bei gleicher Spezifikaet. Bestehende Media-Queries der Einzeldateien
   bleiben gültig - hier werden nur Lücken gefüllt.
   ========================================================================== */

/* ---- Basis --------------------------------------------------------------- */

body {
  hyphens: none;
  -webkit-hyphens: none;
}

img,
svg,
video {
  max-width: 100%;
}

a,
button,
input,
select,
textarea,
.ticket-type-opt {
  -webkit-tap-highlight-color: transparent;
}

/* iOS-Zoom beim Fokus verhindern (mindestens 16px) */
.support-page input,
.support-page select,
.support-page textarea,
.modal-form input,
.modal-form select,
.modal-form textarea {
  font-size: 16px;
}

/* ---- Tablet (bis 1024px) ------------------------------------------------- */

@media (max-width: 1024px) {
  .modal-overlay {
    padding: 14px;
    align-items: flex-end;
  }

  .modal {
    max-width: 640px;
    max-height: 88vh;
  }

  .modal-lg {
    max-width: 720px;
  }

  /* Admin-Tabellen horizontal scrollbar statt überlauf */
  .adm-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
}

/* ---- Großes Handy / kleines Tablet (bis 760px) -------------------------- */

@media (max-width: 760px) {
  /* Modals randlos unten */
  .modal-overlay {
    padding: 0;
  }

  .modal,
  .modal-lg {
    max-width: none;
    width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
  }

  .modal-backdrop {
    background: rgba(0, 0, 0, 0.6);
  }

  /* Support: Ticket-Detail kompakter */
  .ticket-post {
    gap: 10px;
  }

  .ticket-status-row {
    flex-direction: column;
    align-items: stretch;
  }

  .ticket-status-row .btn,
  .ticket-status-row select {
    width: 100%;
    justify-content: center;
  }

  .ticket-danger-zone {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  .ticket-reply .btn {
    width: 100%;
    justify-content: center;
  }

  .ticket-toolbar select {
    min-width: 0;
    width: 100%;
  }

  /* Landing: Band und Section-Abstaende */
  .band .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .band .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ---- Kleines Handy (bis 560px) ------------------------------------------- */

@media (max-width: 560px) {
  /* Ticket-Liste: Status/Aktionen unter den Titel */
  .ticket-row {
    grid-template-columns: auto 1fr;
    gap: 8px 12px;
  }

  .ticket-row-side {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .ticket-row-meta {
    font-size: 12.5px;
  }

  .ticket-detail-title h3 {
    font-size: 19px;
  }

  .ticket-post-text {
    font-size: 15px;
  }

  /* Formulare & Modals: volle Breite, bequeme Fläche */
  .form-row {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-form .btn,
  .btn-block {
    width: 100%;
  }

  /* Admin: Kacheln und Modals schmal */
  .adm-cards {
    grid-template-columns: 1fr 1fr;
  }

  .adm-modal {
    max-width: none;
    width: 100%;
    max-height: 92vh;
    border-radius: 14px 14px 0 0;
  }

  .adm-modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .adm-modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .adm-modal-actions .adm-btn {
    width: 100%;
    justify-content: center;
  }

  .adm-modal-status {
    flex-direction: column;
    align-items: stretch;
  }

  .adm-modal-status .adm-btn {
    width: 100%;
    justify-content: center;
  }

  /* Rechtliches: ängere Zeilen */
  .legal-section p,
  .legal-section li {
    font-size: 15px;
    line-height: 1.7;
  }
}

/* ---- Sehr kleine Geraete (bis 400px) ------------------------------------- */

@media (max-width: 400px) {
  .ticket-nav {
    flex-direction: column;
  }

  .ticket-nav .btn {
    width: 100%;
    justify-content: center;
  }

  .ticket-post .avatar-small {
    display: none;
  }
}
