/* Property Map Section Styles - Matching Related Properties Container */
.property-map-section {
  margin: 0 auto 2rem;
  padding: 2rem 0 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background 0.3s ease;
  width: 100%;
  margin-top: 1rem;
  max-width: min(84.5svw, 120rem);
  border-radius: 1.5rem;
  transition: box-shadow 0.5s ease;
}

/* Property Map Header - Inside Container */
.property-map-header {
  text-align: left;
  padding: 0 2rem;
  margin-bottom: 2rem;
}

.property-map-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--white);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Property Map Container - Matching Related Properties */
.property-map-container {
  position: relative;
  overflow: hidden;
  padding: 0 2rem 2rem;
  height: 32rem;
}

.property-map-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 400px;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--rich-black);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.property-map {
  width: 100%;
  height: 100%;
  border-radius: 1rem;
}

/* Layer Switcher Control - Matching Home Page */
.layer-switcher-control {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
}

.layer-toggle-button {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  background-color: transparent;
}

.layer-toggle-button:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  transform: scale(1.05);
}

/* Thumbnail as full background */
.layer-thumbnail {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.dark-mode {
  background-size: cover;
  background-image: url(../../images/dark-mode-thumbnail.webp);
}

.satellite-mode {
  background-image: url(../../images/satellite-thumbnail.webp);
  background-size: cover;
}

.layer-label {
  font-size: 12px;
  font-weight: 500;
  color: white;
  text-align: center;
  margin-bottom: 4px;
}

/* Property Marker Popup Styles - Matching Home Page */
.property-popup {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 0;
  border: none;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 8px 16px rgba(0, 0, 0, 0.2);
  max-width: 320px;
  min-width: 280px;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  transform: translateY(-8px);
}

.property-popup-content {
  padding: 1.5rem;
}

.property-popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
}

.property-popup-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--rich-black);
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.property-popup-availability {
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}

.property-popup-availability.available {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.property-popup-availability.completed {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.property-popup-availability.development {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.property-popup-address {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0 0 1rem 0;
  line-height: 1.4;
}

.property-popup-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.property-popup-detail {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.property-popup-detail-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.property-popup-detail-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--rich-black);
}

.property-popup-description {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5;
  margin: 0;
  white-space: pre-line;
}

/* Hide Google branding - Matching Home Page */
img[alt="Google"],
div:has(> img[alt="Google"]),
.gm-style a[href^="https://maps.google.com/maps"]
{
  opacity: 0 !important;
  display: none !important;
  visibility: hidden !important;
}

.gmnoprint:has(a[href^="https://maps.google.com"]),
.gm-style-cc:has(a[href^="https://www.google.com/intl"])
{
  display: none !important;
}

/* Hide the bottom-right map data and terms container */
div[style*='position: absolute; right: 0px; bottom: 0px;'] {
  display: none !important;
}

/* Enhanced map markers - Matching Home Page */
.gm-style-iw {
  border-radius: 12px !important;
  padding: 12px !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12) !important;
}

.gm-style img[src*='marker'] {
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2));
}

/* Marker animation */
@keyframes markerPulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.gm-style img[src*='selected-marker'] {
  animation: markerPulse 1.5s infinite ease-in-out;
}

/* Google Maps Controls Overrides - Matching Home Page */
.gm-svpc,
.gm-control-active,
.gm-style-mtc button,
.gmnoprint button {
  border-radius: 4px !important;
  background-color: rgba(18, 18, 18, 0.85) !important;
  color: white !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin: 2px !important;
}

.gm-fullscreen-control {
  border-radius: 4px !important;
  background-color: rgba(18, 18, 18, 0.85) !important;
  color: white !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin: 2px 7px 2px 2px !important;
}

/* Hide specific Google Maps controls */
.gm-tilt,
.gm-compass,
button[aria-label*='Rotate map'],
div[style*='background-color: rgb(230, 230, 230)'],
div[style*='background-color: rgb(255, 255, 255)'][style*='box-shadow'][style*='border-radius: 2px'][style*='width: 40px'][style*='height: 122px'] {
  display: none !important;
}

/* Hide specific Google Maps rotation/tilt control container */
.gmnoprint[data-control-width='40'][data-control-height='40']
  > div[style*='background-color: rgb(255, 255, 255)'][style*='box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px -1px'][style*='border-radius: 2px'][style*='width: 40px'][style*='height: 40px'] {
  display: none !important;
}

/* Hide 1px height separator divs between Google Maps controls */
div[style*='position: relative'][style*='overflow: hidden'][style*='width: 30px'][style*='height: 1px'][style*='margin: 0px 5px'][style*='background-color: rgb(26, 26, 26)'] {
  display: none !important;
}

.gm-svpc,
.gm-control-active {
  width: 36px !important;
  height: 36px !important;
  transform: scale(0.85);
  transform-origin: bottom right;
}

.gm-svpc {
  width: 40px !important;
  height: 40px !important;
  transform: scale(1) !important;
  margin: 0 !important;
  overflow: visible !important;
}

.gm-style-mtc button img,
.gm-svpc img,
.gm-control-active img {
  filter: brightness(0) invert(1) !important;
  width: 20px !important;
  height: 20px !important;
  transform-origin: center !important;
}

.gm-svpc img {
  width: 24px !important;
  height: 24px !important;
  transform: translate(-50%, -50%) !important;
  position: absolute;
  top: 50%;
  left: 50%;
  filter: brightness(0) invert(1) !important;
}

.gm-svpc:hover,
.gm-control-active:hover,
.gm-style-mtc button:hover,
.gm-fullscreen-control:hover,
.gmnoprint button:hover {
  background-color: rgba(30, 30, 30, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  transform: scale(1.05);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3) !important;
}

.gm-bundled-control,
.gm-bundled-control-on-bottom {
  background: transparent !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 100vh !important;
  margin-bottom: 40px !important;
}

.gm-bundled-control > div,
.gm-bundled-control-on-bottom > div,
.gm-style > div:nth-child(1) > div:nth-child(3),
.gm-style > div:nth-child(1) > div:nth-child(4),
.gmnoprint div[draggable='false'],
.gm-style .gm-style-mtc > div,
.gm-style .gmnoprint > div {
  background: transparent !important;
  box-shadow: none !important;
  background-color: transparent !important;
}

/* Responsive adjustments - Matching Related Properties */
@media (max-width: 1050px) {
  .property-map-section {
    width: 95%;
    margin: 0 auto 2rem auto;
    padding: 2rem 0 0;
    max-width: none;
  }

  .property-map-container {
    padding: 0 1.5rem 1.5rem;
    height: 40rem;
  }

  .property-map-wrapper {
    min-height: 350px;
  }

  .property-map-header {
    padding: 0 1.5rem;
  }

  .property-map-title {
    font-size: 2rem;
  }

  .layer-switcher-control {
    bottom: 15px;
    left: 15px;
  }

  .layer-toggle-button {
    width: 65px;
    height: 65px;
    border-radius: 12px;
  }

  .layer-label {
    font-size: 11px;
  }
}

@media (max-width: 768px) {
  .property-map-section {
    width: 95%;
    margin: 0 auto 2rem auto;
    padding: 1.5rem 0 0;
    max-width: none;
  }

  .property-map-container {
    padding: 0 1rem 1rem;
    height: 46rem;
  }

  .property-map-wrapper {
    min-height: auto;
  }

  .property-map-header {
    padding: 0 1rem;
    margin-bottom: 1.5rem;
  }

  .property-map-title {
    font-size: 2rem;
  }

  .layer-switcher-control {
    bottom: 10px;
    left: 10px;
  }

  .layer-toggle-button {
    width: 70px;
    height: 70px;
    border-radius: 12px;
  }

  .layer-label {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .property-map-section {
    width: 95%;
    margin: 0 auto 2rem auto;
    padding: 2rem 0 0;
    max-width: none;
  }

  .property-map-container {
    padding: 0 0.75rem 0.75rem;
    height: 38rem;
  }

  .property-map-wrapper {
    min-height: auto;
  }

  .property-map-header {
    padding: 0 0.75rem;
    margin-bottom: 1rem;
  }

  .property-map-title {
    font-size: 2rem;
  }

  .layer-switcher-control {
    bottom: 8px;
    left: 8px;
  }

  .layer-toggle-button {
    width: 75px;
    height: 75px;
    border-radius: 12px;
  }

  .layer-label {
    font-size: 9px;
  }
}

@media (max-width: 360px) {
  .property-map-container {
    height: 36rem;
  }

  .property-map-wrapper {
    min-height: auto;
  }

  .layer-toggle-button {
    width: 80px;
    height: 80px;
    border-radius: 12px;
  }

  .layer-label {
    font-size: 8px;
  }
}
