/* CityBoard Map — marker popup card */

.cb-map-popup {
  position: relative;
  width: min(300px, calc(100vw - 32px));
  border-radius: var(--cb-map-radius-lg);
  background: #fff;
  box-shadow: var(--cb-map-shadow);
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.cb-map-popup.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.cb-map-popup[hidden] {
  display: none !important;
}

.cb-map-popup__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--cb-map-text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--cb-map-shadow-sm);
  transition: background var(--cb-map-transition);
}

.cb-map-popup__close:hover {
  background: #fff;
}

.cb-map-popup__media {
  aspect-ratio: 16 / 10;
  background: #f1f5f9;
  overflow: hidden;
}

.cb-map-popup__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cb-map-popup__body {
  padding: 14px 16px 16px;
}

.cb-map-popup__price {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  color: var(--cb-map-text);
  letter-spacing: -0.02em;
}

.cb-map-popup__title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--cb-map-text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cb-map-popup__address {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--cb-map-text-muted);
  line-height: 1.4;
}

.cb-map-popup__approx {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--cb-map-amber-light);
  color: var(--cb-map-amber);
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
}

.cb-map-popup__action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: var(--cb-map-radius);
  background: var(--cb-map-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--cb-map-transition);
}

.cb-map-popup__action:hover {
  background: var(--cb-map-blue-dark);
  color: #fff;
}

/* Catalog / RE popup containers */
.cb-catalog-map-popup,
.re-map-popup.cb-map-popup {
  position: relative;
  width: min(300px, calc(100vw - 32px));
  border-radius: var(--cb-map-radius-lg);
  background: #fff;
  box-shadow: var(--cb-map-shadow);
  overflow: hidden;
}

.cb-catalog-map-popup__close,
.re-map-popup .cb-map-popup__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
}
