/* ====== GF Checkbox List (SRB) =========== */

.srb_list_divider_mobile {
  margin: 0 !important;
  padding: 0 !important;
}

@media (min-width: 768px) {
  .srb_list_divider_mobile {
    display: none!important;
  }
}

/* Header Spalte 1 & 2 ausblenden */
.srb_list_element .gfield_header_item:nth-child(2),
.srb_list_element .gfield_header_item:nth-child(3) {
  display: none;
}

.srb_list_element .gfield_list_icons {
  display: none;
}

.srb_list_element .gfield_list_groups {
  margin-top: -30px;
}

.srb_list_element .gfield_list_groups .gfield_list_cell:nth-of-type(2) input,
.srb_list_element .gfield_list_groups .gfield_list_cell:nth-of-type(3) input {
  max-inline-size: 5%;
  float: right;
}

.srb_list_element_first {
  margin-top: 30px !important;
}

@media (max-width: 768px) {

  /* =====================================================
     GRAVITY FORMS LIST FIELD – MOBILE FIX
     Spalten: 55% | 22.5% | 22.5%
     ===================================================== */

  .srb_list_element .gfield_list_group {
    display: grid !important;
    grid-template-columns: 55% 22.5% 22.5% !important;
    align-items: center;
    column-gap: 8px;
    width: 100%;
  }

  .srb_list_element .gfield_list_group .gfield_list_cell {
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: block !important;
  }

  .srb_list_element .gfield_list_group .gfield_list_cell:nth-of-type(1) {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .srb_list_element .gfield_list_group .gfield_list_cell:nth-of-type(1) input {
    display: none !important;
  }

  .srb_list_element .gfield_list_group .gfield_list_cell:nth-of-type(2),
  .srb_list_element .gfield_list_group .gfield_list_cell:nth-of-type(3) {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
  }

  .srb_list_element .gfield_list_group .gfield_list_cell:nth-of-type(2) input[type="checkbox"],
  .srb_list_element .gfield_list_group .gfield_list_cell:nth-of-type(3) input[type="checkbox"] {
    width: auto !important;
    inline-size: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
  }

  /* Mobile-"Stack Labels" von GF (aus data-label) ausblenden */
  .srb_list_element .gfield_list_group .gfield_list_cell:nth-of-type(2)::before,
  .srb_list_element .gfield_list_group .gfield_list_cell:nth-of-type(3)::before {
    content: none !important;
    display: none !important;
  }

  .srb_list_element .gfield_list_header,
  .srb_list_element .gfield_list_headers {
    display: none !important;
  }

  .srb_list_element .gfield_list_icons {
    display: none !important;
  }
}

/* =====================================================
   HEADER-LISTE (oben): NUR Spaltenüberschriften zeigen
   ===================================================== */

.srb_list_header .gfield_list_groups,
.srb_list_header .gfield_list_icons {
  display: none !important;
}

.srb_list_header .gfield_list_header {
  display: grid !important;
  grid-template-columns: 55% 22.5% 22.5% !important;
  align-items: end;
  column-gap: 8px;
  width: 100%;
  margin: 0 !important;
}

.srb_list_header .gfield_list_header .gfield_header_item {
  display: block !important;
  width: auto !important;
  margin: 0 !important;
}

.srb_list_header .gfield_list_header .gfield_header_item:nth-child(1) {
  visibility: hidden;
}

.srb_list_header .gfield_list_header .gfield_header_item:nth-child(2),
.srb_list_header .gfield_list_header .gfield_header_item:nth-child(3) {
  text-align: center;
  font-weight: 600;
}

/* =====================================================
   DATEN-LISTE (unten): Zeilen als Grid, keine Mobile ::before Labels
   ===================================================== */

.srb_list_element .gfield_list_header,
.srb_list_element .gfield_list_icons {
  display: none !important;
}

.srb_list_element .gfield_list_group {
  display: grid !important;
  grid-template-columns: 55% 22.5% 22.5% !important;
  align-items: center;
  column-gap: 8px;
  width: 100%;
}

.srb_list_element .gfield_list_group .gfield_list_cell {
  width: auto !important;
  min-width: 0 !important;
}

.srb_list_element .gfield_list_group .gfield_list_cell:nth-of-type(1) input {
  display: none !important;
}

.srb_list_element .gfield_list_group .gfield_list_cell:nth-of-type(1) {
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.srb_list_element .gfield_list_group .gfield_list_cell:nth-of-type(2)::before,
.srb_list_element .gfield_list_group .gfield_list_cell:nth-of-type(3)::before {
  content: none !important;
  display: none !important;
}

.srb_list_element .gfield_list_group .gfield_list_cell:nth-of-type(2),
.srb_list_element .gfield_list_group .gfield_list_cell:nth-of-type(3) {
  display: flex !important;
  justify-content: center;
  align-items: center !important;
}

.srb_list_element .gfield_list_group .gfield_list_cell:nth-of-type(2) input[type="checkbox"],
.srb_list_element .gfield_list_group .gfield_list_cell:nth-of-type(3) input[type="checkbox"] {
  width: auto !important;
  inline-size: auto !important;
  max-width: none !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
}

@media (min-width: 769px) {
  .srb_list_element .gfield_list_header {
    display: grid !important;
    grid-template-columns: 55% 22.5% 22.5% !important;
    align-items: end;
    column-gap: 8px;
    width: 100%;
  }

  .srb_list_element .gfield_list_header .gfield_header_item {
    display: block !important;
    width: auto !important;
    margin-top: -15px !important;
  }

  .srb_list_element .gfield_list_header .gfield_header_item:nth-child(2),
  .srb_list_element .gfield_list_header .gfield_header_item:nth-child(3) {
    display: none !important;
  }
}
