/* Retter-Portal v1.3.51
   Mobile Tabellenlisten global vereinheitlicht:
   keine zusätzliche Listen-/Tabellenhülle mehr, nur eine Karte pro Datensatz.
   Gilt unter anderem für Lehrgangsbedarf, Einsätze, Dienste, Personal, Fahrzeuge,
   Prüfungen, Wasserversorgung, Inventar und vergleichbare responsive Tabellen. */

@media (max-width:760px){
  /*
   * Alle reinen Tabellenkarten ohne eigenen Kartenkopf werden mobil aus dem
   * Box-Layout entfernt. Damit kann keine zweite große Hülle um die einzelnen
   * Datensatzkarten entstehen – unabhängig davon, ob der Wrapper ein DIV,
   * SECTION oder ARTICLE ist und unabhängig von der Modulseite.
   */
  html body .app-shell .main section.content
  :is(section,div,article).card.table-wrap:has(> table.responsive-table):not(:has(> .card-head)),
  html body .app-shell .main section.content
  :is(section,div,article).table-wrap:has(> table.responsive-table):not(:has(> .card-head)),
  html body .app-shell .main section.content
  :is(section,div,article).data-table-card:has(> table.responsive-table):not(:has(> .card-head)),
  html body .app-shell .main section.content
  :is(section,div,article).checks-table-wrap:has(> table.responsive-table):not(:has(> .card-head)),
  html body .app-shell .main section.content .live-results >
  :is(section,div,article):has(> table.responsive-table):not(:has(> .card-head)){
    display:contents!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    outline:0!important;
    background:transparent!important;
    background-image:none!important;
    box-shadow:none!important;
    filter:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    overflow:visible!important;
  }

  html body .app-shell .main section.content
  :is(section,div,article):has(> table.responsive-table):not(:has(> .card-head))::before,
  html body .app-shell .main section.content
  :is(section,div,article):has(> table.responsive-table):not(:has(> .card-head))::after{
    display:none!important;
    content:none!important;
  }

  /* Tabelle und tbody besitzen global keinerlei eigene Karte oder Umrandung. */
  html body .app-shell .main section.content table.responsive-table,
  html body .app-shell .main section.content table.responsive-table > tbody{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    outline:0!important;
    background:transparent!important;
    background-image:none!important;
    box-shadow:none!important;
    filter:none!important;
    overflow:visible!important;
  }

  html body .app-shell .main section.content table.responsive-table > tbody{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:12px!important;
  }

  html body .app-shell .main section.content table.responsive-table::before,
  html body .app-shell .main section.content table.responsive-table::after,
  html body .app-shell .main section.content table.responsive-table > tbody::before,
  html body .app-shell .main section.content table.responsive-table > tbody::after{
    display:none!important;
    content:none!important;
  }

  /*
   * Aktionszellen mit Buttons, Formularen, Selects oder Eingaben erzeugen
   * ebenfalls keine zweite Fläche innerhalb der Datensatzkarte.
   * Das deckt auch den Status-Editor im Lehrgangsbedarf ab.
   */
  html body .app-shell .main section.content table.responsive-table > tbody > tr >
  td:is(.actions,.table-actions,.mobile-action-cell,.training-action-cell):has(:is(.btn,button,form,select,input,textarea)){
    display:contents!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    outline:0!important;
    background:transparent!important;
    background-image:none!important;
    box-shadow:none!important;
    filter:none!important;
  }

  html body .app-shell .main section.content table.responsive-table > tbody > tr >
  td:is(.actions,.table-actions,.mobile-action-cell,.training-action-cell):has(:is(.btn,button,form,select,input,textarea))::before,
  html body .app-shell .main section.content table.responsive-table > tbody > tr >
  td:is(.actions,.table-actions,.mobile-action-cell,.training-action-cell):has(:is(.btn,button,form,select,input,textarea))::after{
    display:none!important;
    content:none!important;
  }

  /* Direkte Buttons bleiben als einziges Bedienelement erhalten. */
  html body .app-shell .main section.content table.responsive-table > tbody > tr >
  td:is(.actions,.table-actions,.mobile-action-cell,.training-action-cell) > :is(a.btn,button.btn){
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    max-width:100%!important;
    min-height:44px!important;
    margin:12px 0 0!important;
    padding:10px 14px!important;
  }

  /* Formulare in Aktionszellen sind rahmenlose Steuerelementgruppen. */
  html body .app-shell .main section.content table.responsive-table > tbody > tr >
  td:is(.actions,.table-actions,.mobile-action-cell,.training-action-cell) >
  :is(form,.form-actions,.billing-invoice-actions,.training-status-autosave){
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:8px!important;
    width:100%!important;
    max-width:100%!important;
    margin:12px 0 0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    outline:0!important;
    background:transparent!important;
    background-image:none!important;
    box-shadow:none!important;
    filter:none!important;
  }

  html body .app-shell .main section.content table.responsive-table > tbody > tr >
  td:is(.actions,.table-actions,.mobile-action-cell,.training-action-cell)
  :is(form,.form-actions,.billing-invoice-actions,.training-status-autosave) >
  :is(.btn,button,select,input,textarea){
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
  }

  /* Autosave-Hinweise bleiben lesbar, aber ohne eigene Karte. */
  html body .app-shell .main section.content table.responsive-table
  .training-status-autosave .autosave-state{
    display:block!important;
    width:100%!important;
    margin:0!important;
    padding:2px 0 0!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
}
