/* @override 
	https://lufo.cdworks.de/wp-content/plugins/ajax-projectdb-filter/assets/ajax-projectdb-filter.css?* */

.ajax-projectdb-filter {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(0, 3fr);
    gap: 0 42px;
    align-items: start;
}

#apdb-results {
    grid-column: 2;
    min-width: 0;
    margin-top: 0;
}

#apdb-results a {
    text-decoration: none;
    color: black;
}
#apdb-form {
  grid-column: 1;
  min-width: 0;
  position: sticky;
  top: 24px;
	padding-bottom: 20px;
	border-bottom: 0;
	border-right: 1px solid #333;
	padding-right: 28px;
}

#apdb-load-more {
    grid-column: 2;
    justify-self: start;
    margin-top: 20px;
}

/* Kachel – Masonry ordnet sie automatisch */
.apdb-tile {
  width: calc((100% - 60px) / 4); /* 4 Spalten */
  width: calc((100% - 40px) / 3); /* 3 Spalten */
  width: calc((100% - 20px) / 2); /* 2 Spalten */
  margin-bottom: 20px;
  background: #fff;
  border: 1px solid #ddd;
  padding: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease-in-out;
  display: block;
}

.apdb-tile {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Wenn Kachel sichtbar ist */
.apdb-tile.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* Hover */
.apdb-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Bild */
.apdb-image img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 10px;
    border-radius: 4px;
}

/* Titel und Text */
.apdb-tile h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
}
.apdb-tile p {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* Responsiv */
@media (max-width: 1024px) {
    .apdb-tile {
        width: calc((100% - 20px) / 2); /* 2 Spalten */
    }
}
@media (max-width: 600px) {
    .apdb-tile {
        width: 100%;
    }
}

/* Highlighting */
.apdb-tile mark {
    background: yellow;
}

/* Suchleiste */
.apdb-searchbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 24px;
}

.apdb-searchbar input[type="text"] {
    flex: 1;
    padding: 8px;
    color: #000;
    font-size: 15px;
    border: 1px solid #000;
    border-radius: 0px;
}

.apdb-searchbar button {
    color: #000;
    padding: 8px 12px;
    background: #f5f5f5;
    border: 1px solid #000;
    border-radius: 0px;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
}

.apdb-searchbar button:hover {
    color: #fff;
    background: #000;
}
.apdb-filter {
  display: block;
}

.apdb-categories,
.apdb-tags {
  min-width: 0;
}

.apdb-tags {
  margin-top: 30px;
}

.apdb-filter-title {
  margin-bottom: 12px;
}

.apdb-category-groups {
  display: block;
  margin-top: 14px;
}

.apdb-category-group {
  min-width: 0;
  margin-bottom: 22px;
}

.apdb-category-group:last-child {
  margin-bottom: 0;
}

.apdb-category-group-title {
  font-weight: 700;
  margin-bottom: 10px;
}

/* Kategorien: echte EINSPALTIGE Liste */
.apdb-filter-categories {
  display: flex;
  flex-direction: column; /* statt wrap */
  gap: 9px;
}

/* Tags: dürfen umbrechen und nebeneinander laufen */
.apdb-filter-tags {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 10px;
}

/* “Alle …”-Zeile unter dem Titel etwas Abstand */
.apdb-filter label.apdb-all-terms {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

/* Checkbox + Text zusammenhalten und schön ausrichten */
.apdb-filter-categories label,
.apdb-filter-tags label {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.25;
}

.apdb-text-muted {
  font-size: 12px;
  color: #666;
  margin-top: 15px;
}

.apdb-filter input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: 0.15em;
}

@media (max-width: 768px) {
  .ajax-projectdb-filter {
    display: block;
  }
  #apdb-form {
    position: static;
    border-right: 0;
    border-bottom: 1px solid #333;
    padding-right: 0;
    margin-bottom: 24px;
  }
  #apdb-results {
    margin-top: 20px;
  }
  .apdb-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0 28px;
    align-items: start;
  }
  .apdb-tags {
    margin-top: 0;
  }
}

@media (max-width: 600px) {
  .apdb-filter {
    display: block;
  }
  .apdb-categories {
    margin-bottom: 20px;
  }
  .apdb-tags {
    margin-top: 30px;
  }
  .apdb-category-group {
    margin-bottom: 16px;
  }
  .apdb-tags {
    margin-bottom: 30px;
  }
}
