/* ═══════════════════════════════════════════════════
   Eckiger Tisch – Orte Karte
   Colores fieles al original: pills rosa/magenta,
   tabs azul marino, marcadores y contador teal.
═══════════════════════════════════════════════════ */

.et-orte {
  --et-magenta: #c9266d;
  --et-rosa: #fce7f1;
  --et-navy: #1d3557;
  --et-teal: #14b8a6;
  --et-text: #1a2733;
  font-size: 16px;
  color: var(--et-text);
}

/* ─── Topbar: Filter ───────────────────────────── */
.et-orte-topbar {
  margin-bottom: 18px;
}

.et-orte-filter-label {
  font-weight: 700;
  margin: 0 0 8px;
}

.et-orte-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.et-orte-pill {
  border: none;
  cursor: pointer;
  padding: 10px 22px;
  border-radius: 6px;
  background: var(--et-rosa);
  color: var(--et-navy);
  font-size: 16px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.et-orte-pill:hover {
  background: #f7c9de;
}

.et-orte-pill.is-active {
  background: var(--et-magenta);
  color: #fff;
}

/* ─── Tabs ─────────────────────────────────────── */
.et-orte-tabs {
  display: flex;
  gap: 6px;
}

.et-orte-tab {
  border: 1px solid #e3e8ee;
  border-bottom: none;
  cursor: pointer;
  padding: 12px 28px;
  border-radius: 8px 8px 0 0;
  background: #fff;
  color: var(--et-navy);
  font-size: 17px;
  font-weight: 700;
}

.et-orte-tab.is-active {
  background: var(--et-navy);
  color: #fff;
}

/* ─── Panels ───────────────────────────────────── */
.et-orte-panel {
  display: none;
  border: 1px solid #e3e8ee;
  border-radius: 0 8px 8px 8px;
  background: #fff;
  padding: 14px;
}

.et-orte-panel.is-active {
  display: block;
}

/* ─── Mapa ─────────────────────────────────────── */
.et-orte-map-wrap {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e3e8ee;
}

.et-orte-map {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
}

/* ─── Tabs (izq) + Titular (der, sobre la orilla del mapa) ── */
.et-orte-tabsbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.et-orte .et-orte-headline {
  margin: 0;
  padding: 0 4px 10px 0;   /* pequeño respiro sobre la orilla del mapa */
  align-self: flex-end;
  /* Escala fluida: ~1.15rem en pantallas pequeñas → 1.70rem en desktop.
     clamp evita el desbordamiento porque nunca supera 1.70rem y el texto
     puede partirse (overflow-wrap) si el contenedor se estrecha. */
  font-size: clamp(1.15rem, 0.9rem + 1.2vw, 1.70rem) !important;
  font-weight: 800;
  line-height: 1.25;
  color: var(--et-navy);
  text-align: right;
  flex: 1 1 280px;
  min-width: 0;              /* permite encoger dentro del flex sin overflow */
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Contador flotante (esquina superior derecha del mapa) */
.et-orte-count {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 800;
  min-width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 50%;
  background: var(--et-teal);
  color: #04332d;
  font-size: 1.2rem;
  font-weight: 800;
  border: 2px solid #0d8d80;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

/* Marker (divIcon) */
.et-orte-marker {
  background: transparent;
  border: none;
}

.et-orte-marker svg {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

/* Popup estilo caja celeste del original */
.et-orte-leaflet-popup .leaflet-popup-content-wrapper {
  background: #bfe3ea;
  color: var(--et-text);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.et-orte-leaflet-popup .leaflet-popup-tip {
  background: #bfe3ea;
}

.et-orte-popup {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 2px;
  font-size: 15px;
  line-height: 1.45;
}

.et-orte-popup-label {
  margin-top: 8px;
  font-size: 13px;
  color: #355560;
}

.et-orte-popup-label:first-child {
  margin-top: 0;
}

.et-orte-popup-name {
  font-size: 16px;
}

/* ─── Liste ────────────────────────────────────── */
.et-orte-suche-label {
  display: block;
  font-size: 15px;
  margin: 6px 4px 18px;
}

.et-orte-suche {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1px solid #d4dde5;
  border-radius: 8px;
  font-size: 16px;
}

.et-orte-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 4px;
  border-top: 1px solid #e3e8ee;
}

.et-orte-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.et-orte-card-label {
  margin-top: 8px;
  font-size: 13px;
  color: #5b6b78;
}

.et-orte-card-label:first-child {
  margin-top: 0;
}

.et-orte-card-name {
  font-size: 17px;
}

.et-orte-zur-karte {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 10px 22px;
  border: 2px solid var(--et-navy);
  border-radius: 999px;
  background: #fff;
  color: var(--et-navy);
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.et-orte-zur-karte:hover {
  background: var(--et-navy);
  color: #fff;
}

.et-orte-leer {
  padding: 18px 4px;
  color: #5b6b78;
}

/* ─── Responsive ───────────────────────────────── */
/* El tamaño del título lo gobierna clamp() en la regla base, así que aquí
   solo se ajusta el layout (no el font-size), para no romper la escala fluida. */
@media (max-width: 600px) {
  .et-orte-pill {
    padding: 9px 16px;
    font-size: 15px;
  }

  .et-orte-tab {
    padding: 10px 20px;
    font-size: 15px;
  }

  .et-orte-map-wrap {
    height: 440px !important;
  }

  .et-orte-topbar {
    margin-bottom: 14px;
  }

  .et-orte-tabsbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .et-orte .et-orte-headline {
    text-align: left;
    flex-basis: auto;
    align-self: flex-start;
    padding: 0 0 6px;
  }

  .et-orte-count {
    min-width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  .et-orte-card {
    flex-direction: column;
    gap: 12px;
  }

  .et-orte-zur-karte {
    align-self: flex-start;
  }
}
