

/* 1. Gesamte Seite nie scrollen lassen */
html, body {
  height: 100%;
  overflow: hidden !important;
  margin: 0;
  padding: 0;
}

/* 2. Hauptcontainer nimmt die ganze Höhe ein */
#main_content {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* 3. Navbar sticky-top übernimmt Bootstrap */

/* 4. Bereich unter der Navbar */
#main_content_topnav {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 5. Filter-Form nimmt so viel wie nötig */
#groupFilterForm {
  flex: 0 0 auto;
}

/* 6. Wrapper um Gruppen + Footer */
#group_list_wrapper {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

/* 7. Scrollbarer Gruppen-Content */
#group_list {
  flex: 1 1 auto;
  overflow-y: auto;
}

/* 8. Footer (Pagination) */
#group_list_footer {
  flex: 0 0 auto;
}




.group-tile {
  height: 200px;
  border: 1px solid #444;
  overflow: hidden;
}
.group-tile .card-title {
  margin-bottom: 0.5rem;
}

/* Fullscreen-Overlay */
#group_view_overlay {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 2000;
}
#group_view_overlay.d-none {
  display: none;
}
#group_view_close {
  top: 1rem;
  right: 1rem;
  z-index: 2000;          /* über allem */
  background-color: #fff; /* weiße Box */
  border: 1px solid #dee2e6; /* dezenter Rahmen */
  border-radius: .25rem;  /* abgerundete Ecken */
  width: 2rem;
  height: 2rem;
  padding: .25rem;        /* damit das X etwas Luft hat */
  box-shadow: 0 .125rem .25rem rgba(0,0,0,.075); /* leichter Schatten */
}

/* Standard btn-close (ohne .btn-close-white) bringt schwarzen Kreuz */
#group_view_close.btn-close::before {
  filter: none; /* Stelle sicher, dass das Icon nicht invertiert wird */
}


#group_view_content {
  position: absolute;
  top: calc(3rem + 1rem);
  left: 0;
  right: 0;
  bottom: 0;
  overflow: auto;
  background: #fff;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  /* KEIN z-index hier - sonst blockiert der stacking context die Modals */
}

.bubble-alert {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20000;
  max-width: 80%;
  text-align: center;
  transition: opacity 0.5s ease;
}
.bubble-confirm,
.bubble-alert {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 99999 !important;
}

/* Bootstrap Modals IMMER über dem Overlay (z-index 2000) */
.modal {
  z-index: 10000 !important;
}
.modal-backdrop {
  z-index: 9999 !important;
}
button.loading {
  position: relative;
  opacity: 0.7;
  pointer-events: none;
}
button.loading::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  width: 1rem;
  height: 1rem;
  margin-top: -0.5rem;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
