/**
 * Directories Pro 2.x – Listenoptik wie mit 1.14
 *
 * Mit dem Update 1.14 → 2.2 (Roadmap 2.2d) hat sich die Optik der Listen
 * geändert. Daten und Reihenfolge sind gleich, nur das Aussehen nicht.
 * Diese Datei holt das bisherige Aussehen zurück. Werte stammen aus dem
 * CSS von Directories 1.14 (directories/assets/css/main.css und
 * bootstrap-main.css), gemessen an den Screenshots vom 2026-11-03.
 *
 * Geladen über functions.php, nach den Directories-Styles (Abhängigkeit
 * „drts-custom-var“), also nur auf Seiten mit Verzeichnis-Inhalt.
 */

/* ==========================================================================
   1. Karten: heller Rahmen statt Sekundärfarbe
   2.x setzt drts-bs-border-secondary, und uploads/drts/style.css färbt die
   Sekundärfarbe mit !important dunkelgrau (#8b8887). 1.14: #eef3f6,
   beim Überfahren #dde4e9.
   ========================================================================== */

.drts .drts-view-entities .drts-display--summary.drts-bs-border {
  border-color: #eef3f6 !important;
  transition: border-color 0.15s ease-in-out;
}

.drts .drts-view-entities .drts-display--summary.drts-bs-border:hover {
  border-color: #dde4e9 !important;
}

/* ==========================================================================
   2. Abstand zwischen den Karten in der Listenansicht: 10 px (2.x: 20 px)
   ========================================================================== */

.drts
  .drts-view-entities-list-row
  > .drts-row.drts-y-gutter
  > .drts-view-entity-container {
  margin-bottom: 10px;
}

/* ==========================================================================
   3. Mobil: Bild neben dem Text (2.x stapelt unter 576 px Bild über Text)
   Nur in der Listenansicht; die Kachelansicht bleibt, wie sie ist.
   ========================================================================== */

@media (max-width: 575.98px) {
  .drts
    .drts-view-entities-list-row
    .drts-display--summary
    > .drts-display-element-columns-1
    > .drts-row {
    flex-wrap: nowrap;
  }

  .drts
    .drts-view-entities-list-row
    .drts-display--summary
    > .drts-display-element-columns-1
    > .drts-row
    > .drts-display-element-column-1 {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
  }

  .drts
    .drts-view-entities-list-row
    .drts-display--summary
    > .drts-display-element-columns-1
    > .drts-row
    > .drts-display-element-column-2 {
    flex: 0 0 66.6667%;
    max-width: 66.6667%;
    min-width: 0;
    overflow-wrap: break-word;
  }
}

/* ==========================================================================
   4. Lesezeichen-Herz auf dem Bild: schlichtes Symbol wie in 1.14
   2.x gibt dem Symbol die Klasse drts-icon (weißer Kreis mit Schatten).
   ========================================================================== */

.drts .drts-display-element-buttons-overlay .drts-voting-button i.drts-icon {
  width: auto;
  height: auto;
  padding: 0;
  font-size: 16px;
  color: inherit;
  background-color: transparent;
  border-radius: 0;
  box-shadow: none !important;
}

/* ==========================================================================
   5. Labels (Open Now, Featured, New): Farben wie in 1.14
   2.2 wertet die gespeicherte Farbe {type: success|warning|danger} nicht aus
   (LabelsHelper::_renderLabel erwartet „name“) und gibt das Badge ohne
   Hintergrund aus → weiße Schrift auf hellem Bild, unsichtbar.
   ========================================================================== */

.drts .drts-display-element-labels .drts-bs-badge {
  padding: 0.25em 0.4em;
  font-size: 75%;
  border-radius: 0.25rem;
}

.drts .drts-bs-badge[data-label-name^="directory_open_now"] {
  color: #fff;
  background-color: #5eba00;
}

.drts .drts-bs-badge[data-label-name^="entity_featured"] {
  color: #212529;
  background-color: #f1c40f;
}

.drts .drts-bs-badge[data-label-name^="entity_new"] {
  color: #fff;
  background-color: #cd201f;
}

/* ==========================================================================
   6. Suchknopf in Großbuchstaben (1.14: „SUCHE“)
   ========================================================================== */

.drts .drts-search-form-submit {
  text-transform: uppercase;
}

/* Höhe wie das Suchfeld (45 px aus uploads/drts/style.css). In 2.x steht der
   Knopf nicht mehr in .drts-search-form-field, und
   „.drts-search-form button { height: 38px !important }“ gewinnt. */
.drts .drts-search-form .drts-search-form-submit {
	height: 45px !important;
}

/* ==========================================================================
   7. Abstände um die Liste wie in 1.14
   ========================================================================== */

/* Zeile „Zeige 1 – 20 von …“ bis zur ersten Karte: 16 px (2.x: 24 px) */
.drts .drts-view-entities-header.drts-bs-mb-4 {
	margin-bottom: 16px !important;
}

/* Liste ↔ Karte (Kartenhinweis rechts): 8 px (2.x: 16 px), Karten werden
   dadurch so breit wie vorher */
@media (min-width: 576px) {
	.drts .drts-location-entities.drts-bs-pe-sm-3 {
		padding-right: 8px !important;
	}
}
