/* --- Стили для первого Pop-up --- */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.popup.is-active,
.popup.active {
  display: flex;
}
.popup__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--popup-bg);
  opacity: 0;
  transition: opacity var(--transition);
}
.popup.is-active .popup__overlay,
.active .popup__overlay {
  opacity: 1;
}
.popup__dialog {
  position: relative;
  background: var(--dialog-bg);
  border-radius: var(--radius);
  width: 90%;
  max-width: 400px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transform: translateY(-20px);
  opacity: 0;
  transition: transform var(--transition), opacity var(--transition);
}
.popup.is-active .popup__dialog,
.active .popup__dialog {
  transform: translateY(0);
  opacity: 1;
}
.popup__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.popup__title {
  font-size: 1.25rem;
  color: var(--text-color);
  margin: 0;
}
.popup__close {
  background: transparent;
  border: none;
  cursor: pointer;
  line-height: 0;
  padding: 4px;
  transition: transform var(--transition);
}
.popup__close:hover {
  transform: rotate(90deg);
}
@media (max-width: 480px) {
  .popup__dialog {
    padding: 16px;
  }
}

/* --- Стили для второго Pop-up (выбор города) --- */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.popup-overlay.active {
  display: flex;
}
.popup-content {
  background: white;
  border-radius: 1rem;
  max-width: 600px;
  width: 90%;
  padding: 1.5rem 2rem;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  text-align: center;
  position: relative;
  overflow-y: auto;
  max-height: 90vh;
}
.popup-content h3 {
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: #333;
}
.popup-city-name {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: #0077cc;
  font-weight: 700;
}
.popup-image {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}
.popup-details {
  text-align: left;
  font-size: 0.95rem;
  color: #444;
  line-height: 1.4;
}
.popup-details p {
  margin: 0.5rem 0;
  font-weight: 700;
  font-size: 0.9rem;
}
.close-popup {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 2.5rem;
  width: 3rem;
  height: 3rem;
  line-height: 2.5rem;
  cursor: pointer;
  color: #555;
  transition: color 0.3s ease
}
.close-popup:hover,
.close-popup:focus {
  color: #0077cc;
  outline: none;
}

button.popup__close {
  width: 2rem;
  height: 2rem;
  font-size: 2rem;
}

/* Отличить цветом заголовка */
.popup--measurer .popup__title {
  color: #40513B; /* более тёмный зелёный */
}
/* Можно чуть увеличить ширину под форму выезда */
.popup--measurer .popup__dialog {
  max-width: 550px;
}

.modal-close,
.close-popup {
  padding: 0.5rem;      /* расширяем активную область */
}
