/* locations package styles
 * Extracted from streuobstland theme.css during package migration.
 * Loaded via VeloQuill BundleAssetProvider (/bundles/locations/css/locations.css).
 */

/* ========================================= */
/* Location Map                              */
/* ========================================= */

.vq-location-page__title {
  font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.2rem);
  font-weight: 800;
  color: var(--col-text-strong);
  margin-bottom: 1.75rem;
}

.vq-location-block__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--col-text-strong);
  margin-bottom: 1.25rem;
}

.vq-location-block__empty {
  color: var(--col-text-muted);
  font-style: italic;
}

/* Suchleiste */
.vq-location-search {
  margin-bottom: 1rem;
}

.vq-location-search__row {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}

.vq-location-search__input-wrap {
  position: relative;
  flex: 1 1 260px;
}

.vq-location-search__input-wrap .fa {
  position: absolute;
  left: .75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--col-text-muted);
  pointer-events: none;
}

.vq-location-search__input {
  width: 100%;
  padding: .55rem .75rem .55rem 2.2rem;
  border: 1px solid var(--col-border);
  border-radius: var(--bulma-control-radius);
  background: var(--col-surface-card);
  color: var(--col-text);
  font-size: .95rem;
}

.vq-location-search__input:focus {
  outline: none;
  border-color: var(--col-secondary);
  box-shadow: var(--bulma-input-focus-shadow-size) var(--col-secondary-soft);
}

.vq-location-search__cat {
  padding: .55rem .75rem;
  border: 1px solid var(--col-border);
  border-radius: var(--bulma-control-radius);
  background: var(--col-surface-card);
  color: var(--col-text);
  font-size: .95rem;
  min-width: 180px;
}

.vq-location-search__cat:focus {
  outline: none;
  border-color: var(--col-secondary);
  box-shadow: var(--bulma-input-focus-shadow-size) var(--col-secondary-soft);
}

.vq-location-search__count {
  font-size: .82rem;
  color: var(--col-text-muted);
  margin: .4rem 0 0;
}

/* Layout: Liste + Karte — äußerer Container ist die "Karte" */
.vq-location-body {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

/* Mit Liste: kein Gap, Schatten und Radius auf dem Container */
.vq-location-widget--with-list .vq-location-body {
  gap: 0;
  border-radius: var(--radius-md);
  box-shadow: var(--box-shadow-big);
  overflow: hidden;
}

/* below-Layout: Karte + Liste untereinander */
.vq-location-widget--list-below .vq-location-body {
  flex-direction: column;
  gap: 0;
}

.vq-location-list {
  width: 300px;
  flex-shrink: 0;
  max-height: 500px;
  overflow-y: auto;
  background: var(--col-surface-card);
  border-right: 1px solid var(--col-border);
}

/* Liste unterhalb: volle Breite, Trennlinie oben statt rechts */
.vq-location-list--below {
  width: 100%;
  max-height: 340px;
  border-right: none;
  border-top: 1px solid var(--col-border);
}

.vq-location-map {
  flex: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 300px;
  z-index: 0;
  box-shadow: var(--box-shadow-big);
}

/* Wenn Liste vorhanden: Schatten und Radius auf dem Body-Container, nicht auf der Karte */
.vq-location-widget--with-list .vq-location-map {
  border-radius: 0;
  box-shadow: none;
}

/* below: Karte hat keinen eigenen Radius/Schatten */
.vq-location-widget--list-below .vq-location-map {
  flex: none;
}

/* Listeneinträge */
.vq-location-list__item {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  padding: .75rem .8rem;
  border-bottom: 1px solid var(--col-border);
  cursor: pointer;
  transition: background .15s;
}

.vq-location-list__item:last-child {
  border-bottom: none;
}

.vq-location-list__item:hover,
.vq-location-list__item.is-active {
  background: var(--col-primary-soft);
}

.vq-location-list__item.is-active {
  border-left: 3px solid var(--col-primary);
}

.vq-location-list__img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.vq-location-list__img-ph {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--col-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--col-text-muted);
  flex-shrink: 0;
}

.vq-location-list__info {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
}

.vq-location-list__info strong {
  font-size: .9rem;
  font-weight: 600;
  color: var(--col-text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vq-location-list__cat {
  font-size: .75rem;
  color: var(--col-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.vq-location-list__addr {
  font-size: .78rem;
  color: var(--col-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vq-location-list__addr .fa {
  font-size: .7rem;
}

/* Umkreissuche */
.vq-location-proximity {
  margin-top: .5rem;
}

.vq-location-proximity__row {
  display: flex;
  gap: .5rem;
  flex-wrap: nowrap;
  align-items: center;
}

/* Input-Wrap: wächst, gibt bei zu wenig Platz nach */
.vq-location-proximity__input-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.vq-location-proximity__input-wrap .fa {
  position: absolute;
  left: .75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--col-text-muted);
  pointer-events: none;
}

.vq-location-proximity__input {
  width: 100%;
  padding: .55rem .75rem .55rem 2.2rem;
  border: 1px solid var(--col-border);
  border-radius: var(--bulma-control-radius);
  background: var(--col-surface-card);
  color: var(--col-text);
  font-size: .95rem;
}

.vq-location-proximity__input:focus {
  outline: none;
  border-color: var(--col-secondary);
  box-shadow: var(--bulma-input-focus-shadow-size) var(--col-secondary-soft);
}

/* Controls-Gruppe bleibt kompakt und bricht nicht um */
.vq-location-proximity__controls {
  display: flex;
  gap: .4rem;
  align-items: center;
  flex-shrink: 0;
}

.vq-location-proximity__radius {
  padding: .55rem .75rem;
  border: 1px solid var(--col-border);
  border-radius: var(--bulma-control-radius);
  background: var(--col-surface-card);
  color: var(--col-text);
  font-size: .9rem;
  min-width: 90px;
}

.vq-location-proximity__radius:focus {
  outline: none;
  border-color: var(--col-secondary);
  box-shadow: var(--bulma-input-focus-shadow-size) var(--col-secondary-soft);
}

.vq-location-proximity__gps,
.vq-location-proximity__clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-md);
  background: var(--col-surface-card);
  cursor: pointer;
  transition: background .15s, color .15s;
}

.vq-location-proximity__gps {
  color: var(--col-primary);
}

.vq-location-proximity__gps:hover {
  background: var(--col-primary);
  color: var(--col-white);
  border-color: var(--col-primary);
}

.vq-location-proximity__clear {
  color: var(--col-text-muted);
}

.vq-location-proximity__clear:hover {
  background: oklch(from var(--col-danger) 95% 0.04 h);
  color: var(--col-danger);
  border-color: oklch(from var(--col-danger) 75% 0.1 h);
}

.vq-location-proximity__status {
  font-size: .8rem;
  color: var(--col-text-muted);
  margin: .3rem 0 0;
  min-height: 1.1em;
}

/* Distanz-Badge in der Liste */
.vq-location-list__distance {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--col-primary);
  background: var(--col-primary-soft);
  border-radius: 999px;
  padding: .1rem .45rem;
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
  align-self: center;
}

.vq-location-list__item {
  gap: .6rem;
}

/* Leaflet Marker (div-Icon) */
.vq-location-marker {
  width: 20px !important;
  height: 20px !important;
  border-radius: 50%;
  border: 3px solid;
  box-shadow: 0 2px 6px oklch(0% 0 0deg / 30%);
  transition: transform .15s, background .15s;
}

.vq-location-marker span {
  display: block;
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  margin: 4px auto 0;
}

.vq-location-marker.is-active {
  transform: scale(1.35);
  box-shadow: 0 3px 10px oklch(0% 0 0deg / 40%);
}

/* Leaflet Popup */
.vq-loc-popup {
  min-width: 200px;
}

.vq-loc-popup__img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: .5rem;
}

.vq-loc-popup__name {
  display: block;
  font-size: .95rem;
  font-weight: 700;
  color: var(--col-text-strong);
  margin-bottom: .2rem;
}

.vq-loc-popup__cat {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--col-primary);
  margin-bottom: .35rem;
}

.vq-loc-popup__dist {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--col-primary);
  background: var(--col-primary-soft);
  border-radius: 999px;
  padding: .1rem .45rem;
  margin-bottom: .35rem;
}

.vq-loc-popup__addr,
.vq-loc-popup__hours {
  font-size: .82rem;
  color: var(--col-text-muted);
  margin: .2rem 0;
}

.vq-loc-popup__links {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  margin-top: .5rem;
  padding-top: .5rem;
  border-top: 1px solid var(--col-border);
}

.vq-loc-popup__links a {
  font-size: .82rem;
  color: var(--col-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .35rem;
}

.vq-loc-popup__links a:hover {
  color: var(--col-primary-dark);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .vq-location-body {
    flex-direction: column;
  }

  .vq-location-list {
    width: 100%;
    max-height: 220px;
    border-right: none;
    border-bottom: 1px solid var(--col-border);
  }

  /* Explicit height overrides the inline style on mobile so Leaflet
     always has a rendered dimension to initialize against. */
  .vq-location-map {
    height: 350px !important;
    min-height: 350px;
    width: 100%;
  }

  /* below: Liste max-height reduzieren */
  .vq-location-list--below {
    max-height: 220px;
    border-bottom: none;
  }

  /* Proximity row: allow wrap on very narrow screens */
  .vq-location-proximity__row {
    flex-wrap: wrap;
  }

  .vq-location-proximity__controls {
    flex-shrink: 0;
  }
}