.ue-keyword-filter {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-family: inherit;
}

.ue-kf-inputwrap {
  display: none; // -- geändert auf unsichtbar - sonst display: flex
  gap: 0.5rem;
  align-items: center;
}

.ue-kf-inputwrap input#ue-kf-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #d0d0d0;
  font-size: 0.95rem;
  line-height: 1.4;
}

.ue-kf-inputwrap input#ue-kf-input:focus {
  outline: none;
  border-color: #111827;
  box-shadow: 0 0 0 1px #1118270d;
}

.ue-kf-clear {
  border: none;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  cursor: pointer;
  background-color: #f3f4f6;
  color: #111827;
  line-height: 1;
}

.ue-kf-clear:hover {
  background-color: #e5e7eb;
}

.ue-kf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ue-kf-chips select.uc-select-filter__select.drop_filter {
  min-width: 290px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background-color: #ffffff;
  line-height: 1.4;
  cursor: pointer;
}

.ue-kf-chips select.uc-select-filter__select.drop_filter:focus {
  outline: none;
  border-color: #111827;
}


.ue-kf-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #6b7280;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ue-kf-count
{
	font-size: 12px;
}


.ue-kf-reset {
  border: none;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  margin-top: 20px;
  font-weight: 600;
  cursor: pointer;
  background-color: #111827;
  color: #ffffff;
  white-space: nowrap;
}

.ue-kf-reset:hover {
	background-color: white;
	color: black;
}

.ue-kf-reset:hover {
  opacity: 0.9;
}

.ue-kf-count {
  font-variant-numeric: tabular-nums;
}

.ue-kf-empty {
  font-size: 0.85rem;
  color: #9ca3af;
}

.uc-hidden-by-kf {
  display: none !important;
}

@media (max-width: 768px) {
  .ue-kf-chips {
    flex-direction: column;
    align-items: flex-start;
  }

  .ue-kf-chips select.uc-select-filter__select.drop_filter {
    width: 100%;
  }
}

/* Grid-Wrapper mit Verlauf */
.training-grid-wrapper {
  position: relative;
  --collapsed-height: 1400px;
  max-height: var(--collapsed-height);
  overflow: hidden;
  transition: max-height 0.5s ease;
}

/* Wenn aufgeklappt: kein Limit mehr */
.training-grid-wrapper.is-expanded {
  max-height: 99999px;
}

/* Verlauf, der zeigt: "es geht weiter" */
.training-grid-wrapper::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px; /* ggf. anpassen */
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: linear-gradient(
    to bottom,
    rgba(243,244,244,0) 0%,
    rgba(243,244,244,0.9) 60%,
    rgba(243,244,244,1) 100%
  );
}

/* Verlauf nur anzeigen, wenn es mehr gibt UND eingeklappt ist */
.training-grid-wrapper.has-more:not(.is-expanded)::after {
  opacity: 1;
}

/* "Alle anzeigen"-Button – mittig unter dem Grid */
.training-grid-toggle.grid-read-more {
  margin: 1.5rem auto 0 auto;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  background: var( --e-global-color-f5748dd );
  color: #000;
}

.training-grid-toggle.grid-read-more:hover {
  background: #e5e7eb;
}

/* Sticky-Button unten rechts – bleibt im Widget */
.ue-keyword-filter .training-grid-sticky {
  position: fixed;
  left: calc(50vw - 85px);
  bottom: 16px;
  z-index: 9999;
  display: none;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  color: #111827;
}

.elementor-widget-ucaddon_ue_listing_grid {
  position: relative; /* wichtig für sauberes Verhalten */
}

.elementor-widget-ucaddon_ue_listing_grid .training-grid-sticky {
  position: sticky;
  top: 20px;          /* Abstand zum oberen Rand (Header berücksichtigen) */
  z-index: 999;
  left: calc(50vw - 85px);
  bottom: 16px;
}


.ue-keyword-filter .training-grid-sticky:hover {
  filter: brightness(0.96);
}

@media (max-width: 768px) {
  .ue-keyword-filter .training-grid-sticky {
    right: 12px;
    bottom: 12px;
  }
}