.maplibregl-popup.locator-map-preview-popup {
  z-index: 5;
  max-width: 320px !important;
}

.maplibregl-popup.locator-map-preview-popup .maplibregl-popup-content {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.maplibregl-popup.locator-map-preview-popup .maplibregl-popup-tip {
  display: none;
}

.locator-map-preview {
  width: 300px;
  max-width: calc(100vw - 2rem);
  border-radius: 1rem;
  overflow: hidden;
  background: var(--color-card);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  text-align: left;
  border: 1px solid var(--color-border);
}

.locator-map-preview:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.locator-map-preview__media {
  position: relative;
  background: #0f172a;
}

.locator-map-preview__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 4;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, background 0.15s ease;
}

.locator-map-preview__close:hover {
  transform: scale(1.06);
  background: #fff;
}

.locator-map-preview__placeholder {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bot-bubble);
  color: var(--color-text-secondary);
  font-size: 2.5rem;
}

.locator-map-preview__placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.locator-detail-gallery--map-preview {
  position: relative;
  margin-bottom: 0;
  border: 0;
  border-radius: 0;
}

.locator-detail-gallery--map-preview .locator-detail-gallery__viewport {
  height: 200px;
}

.locator-detail-gallery--map-preview .locator-detail-gallery__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.65rem;
  z-index: 3;
  justify-content: center;
  margin: 0;
  padding: 0;
  background: transparent;
}

.locator-detail-gallery--map-preview .locator-detail-gallery__dot {
  background: rgba(255, 255, 255, 0.55);
  border-color: transparent;
}

.locator-detail-gallery--map-preview .locator-detail-gallery__dot.is-active {
  background: #fff;
}

.locator-map-preview__body {
  padding: 0.75rem 0.85rem 0.85rem;
}

.locator-map-preview__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.locator-map-preview__title {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.locator-map-preview__rating {
  flex-shrink: 0;
  font-size: 0.75rem;
}

.locator-map-preview__rating .locator-result-card__rating {
  margin: 0;
  gap: 0.2rem;
}

.locator-map-preview__rating .locator-result-card__stars {
  font-size: 0.65rem;
}

.locator-map-preview__rating .locator-result-card__rating-num {
  font-size: 0.8125rem;
}

.locator-map-preview__subtitle {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin: 0 0 0.35rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.locator-map-preview__meta {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  margin: 0 0 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.locator-map-preview__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.locator-map-preview__badges .locator-result-card__icon {
  font-size: 0.6875rem;
}

[data-theme="dark"] .locator-map-preview {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .locator-map-preview__close {
  color: #111827;
}
