body {
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  color: #1e293b;
}

::selection {
  background: rgb(16 185 129 / 0.25);
  color: #064e3b;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Header logo — floating gold £ signs */
.ph-logo-wrap {
  overflow: visible;
}

.ph-logo-pound {
  position: absolute;
  z-index: 2;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: #ca8a04;
  text-shadow: 0 1px 2px rgb(255 255 255 / 0.85);
  pointer-events: none;
  user-select: none;
  animation: ph-pound-float 2.8s ease-in-out infinite;
}

.ph-logo-pound--1 {
  top: -3px;
  right: -2px;
  animation-delay: 0s;
}

.ph-logo-pound--2 {
  bottom: -2px;
  left: -3px;
  font-size: 9px;
  opacity: 0.92;
  animation-delay: -1.4s;
}

@keyframes ph-pound-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.88;
  }
  50% {
    transform: translateY(-3px) scale(1.08);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ph-logo-pound {
    animation: none;
  }
}

.mapboxgl-ctrl-bottom-left,
.mapboxgl-ctrl-bottom-right {
  z-index: 5;
}

/* Minimal Mapbox branding — bottom-right logo + compact attribution with hover tooltip */
.mapboxgl-ctrl-bottom-right {
  bottom: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

a.mapboxgl-ctrl-logo {
  width: 58px;
  height: 16px;
  margin: 0;
  opacity: 0.88;
  transform: scale(1);
  transform-origin: bottom right;
  filter: drop-shadow(0 1px 2px rgb(255 255 255 / 0.85));
}

.ph-mapbox-attrib.mapboxgl-ctrl-attrib {
  margin: 0;
  padding: 0;
  min-height: 0;
  background: rgb(255 255 255 / 0.9);
  border-radius: 999px;
  box-shadow: 0 1px 4px rgb(15 23 42 / 0.12);
  backdrop-filter: blur(6px);
}

.ph-mapbox-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-button {
  display: block;
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 999px;
  background-color: transparent;
  background-size: 14px 14px;
  opacity: 0.75;
}

.ph-mapbox-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-button:hover,
.ph-mapbox-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-button:focus-visible {
  opacity: 1;
  outline: none;
  box-shadow: 0 0 0 2px rgb(16 185 129 / 0.35);
}

.ph-mapbox-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner {
  display: block !important;
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: min(300px, calc(100vw - 32px));
  padding: 8px 10px;
  background: rgb(255 255 255 / 0.97);
  border-radius: 10px;
  box-shadow: 0 4px 18px rgb(15 23 42 / 0.14);
  font-size: 10px;
  line-height: 1.45;
  color: #475569;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0.15s ease;
  z-index: 2;
  white-space: normal;
}

/* Collapse default expanded attribution — tooltip on hover/click instead */
.ph-mapbox-attrib:not(.mapboxgl-compact) .mapboxgl-ctrl-attrib-inner {
  display: none !important;
}

.ph-mapbox-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner a {
  color: #0f766e;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ph-mapbox-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner,
.ph-mapbox-attrib.mapboxgl-compact:focus-within .mapboxgl-ctrl-attrib-inner,
.ph-mapbox-attrib.mapboxgl-compact.mapboxgl-compact-show .mapboxgl-ctrl-attrib-inner {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Search centre — area label + checkered flag above price pins, below popups */
.ph-search-center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.ph-search-area-label {
  position: relative;
  margin-bottom: 6px;
  max-width: min(220px, 70vw);
  padding: 7px 12px;
  border-radius: 10px;
  background: rgb(255 255 255 / 0.97);
  box-shadow: 0 4px 16px rgb(15 23 42 / 0.18);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-align: center;
  color: #064e3b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ph-center-flag {
  position: relative;
  filter: drop-shadow(0 4px 8px rgba(15, 23, 42, 0.35));
}

.ph-search-center-marker {
  z-index: 400 !important;
}

.ph-search-center-marker.is-hidden {
  visibility: hidden !important;
  pointer-events: none !important;
}

.mapboxgl-marker:has(.ph-pin-wrap) {
  z-index: 100 !important;
}

.mapboxgl-marker:has(.ph-pin--active) {
  z-index: 800 !important;
}

.ph-pin-wrap {
  cursor: pointer;
  z-index: 1;
}

.ph-pin {
  position: relative;
  display: block;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  background: #10b981;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  outline: 2px solid #6ee7b7;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, outline-color 0.15s ease;
}

.ph-pin--active {
  background: #ef4444;
  outline: 2px solid #fca5a5;
  transform: scale(1.25);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.ph-pin-arrow {
  position: absolute;
  left: 50%;
  top: 100%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  margin-top: -4px;
  background: #10b981;
  transform: rotate(45deg);
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.ph-pin-arrow--active {
  background: #ef4444;
}

.mapboxgl-popup.property-hover-popup {
  z-index: 9000 !important;
}

.mapboxgl-popup.property-hover-popup .mapboxgl-popup-content {
  padding: 10px 12px;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
}

.modal-open .map-interactive-off {
  pointer-events: none;
}

/* Map pick mode — fixed checkered flag while panning */
.ph-map-pick-flag-anchor {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -100%);
  pointer-events: none;
  z-index: 1;
}

.ph-map-pick-flag-anchor .ph-center-flag {
  filter: drop-shadow(0 4px 8px rgba(15, 23, 42, 0.35));
}

/* Cookie consent splash */
.ph-cookie-splash__panel {
  animation: ph-splash-in 0.35s ease-out;
}

@keyframes ph-splash-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
