/* Base wrapper: JS controls height after image load */
#vcm-map-wrapper {
  position: relative;
  width: 100%;
  background: #fff;
  margin: 0;
  padding: 0;
}

/* While initializing, keep it full-screen-ish for loader */
#vcm-map-wrapper.vcm-initializing {
  min-height: 130vh;
  height: 130vh;
}

/* While initializing, hide modal + coords (map can still size) */
#vcm-map-wrapper.vcm-initializing #vcmModalBackdrop,
#vcm-map-wrapper.vcm-initializing #vcm-coords {
  visibility: hidden;
}

/* Loading overlay inside wrapper */
#vcm-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.96);
  z-index: 9000;
  transition: opacity 0.25s ease;
}

#vcm-loading.vcm-loading-hidden {
  opacity: 0;
  pointer-events: none;
}

.vcm-loading-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #111827;
}

.vcm-loading-spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(156, 163, 175, 0.7);
  border-top-color: #111827;
  animation: vcm-spin 0.7s linear infinite;
}

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

#vcm-coords {
  position: fixed;
  top: 10rem;
  left: 8px;
  padding: 4px 8px;
  font-size: 11px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
  z-index: 500;
  pointer-events: none;
  color: #111827;
}

.vcm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  opacity: 0;
  transition: 0.2s opacity;
}

.vcm-modal-backdrop.vcm-active {
  opacity: 1;
  pointer-events: all;
}

.vcm-modal {
  width: min(500px, 95%);
  background: #fff;
  border-radius: 14px;
  padding: 18px 20px 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(0, 0, 0, 0.06);
  position: relative;
  transform: scale(0.9);
  transition: 0.2s transform;
}

.vcm-modal-backdrop.vcm-active .vcm-modal {
  transform: scale(1);
}

.vcm-modal h2 {
  font-size: 18px;
  margin: 0 0 4px;
  font-weight: 600;
}

.vcm-modal-subtitle {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
}

.vcm-modal #vcmModalDescription {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  color: #374151;
  overflow: auto;
  max-height: 40rem;
}

.vcm-modal-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: rgba(17, 24, 39, 0.05);
  color: #111827;
}

/* Optional tooltip styling */
.vcm-marker-tooltip {
  background: rgba(17, 24, 39, 0.92);
  color: #f9fafb;
  border-radius: 999px;
  padding: 4px 10px;
  border: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  font-size: 11px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.vcm-marker-tooltip .leaflet-tooltip-arrow {
  display: none;
}

.vcm-map-content-wrapper {
  display: flex;
  width: min(100%, 1600px);
  position: relative;
  margin: auto;
  gap: 1rem;
  /* height will be set via JS */
}

#vcm-map {
  flex: 1.5;
  background-color: #fff;
}

.map-side-content {
  flex: 1;
  padding-top: 1rem;
  padding-bottom: 2rem;
  padding-right: 1rem;
}

.sticky-wrapper {
  width: 100%;
  position: sticky;
  top: 9rem;
}

.market-links-wrapper {
  margin-top: 1rem;
}

.market-links-wrapper h5 {
  color: #374a59;
  text-align: center;
  text-transform: uppercase;
  font-weight: 700;
  font-size: clamp(1.5rem, 1.13vw + 1.22rem, 2.2rem);
}

.market-links-wrapper .links-wrapper {
  width: fit-content;
  margin: auto;
  display: flex;
  flex-direction: column;
  margin-top: clamp(0.5rem, 1.13vw + 0.22rem, 1.2rem);
}

.market-links-wrapper .single-link {
  color: #000;
  display: flex;
  gap: clamp(0.38rem, 0.4vw + 0.28rem, 0.62rem);
  padding: clamp(0.5rem, 0.81vw + 0.3rem, 1rem)
    clamp(1rem, 1.62vw + 0.61rem, 2rem);
  border-radius: 1rem;
  transition: 0.2s all;
}

.market-links-wrapper .single-link.link-hover:hover {
  box-shadow: 0px 10px 20px 0px rgb(0 0 0 / 7%);
  transform: scale(1.02);
}

.market-links-wrapper .sponser-wrapper {
  width: clamp(4rem, 3.23vw + 3.21rem, 6rem);
  padding-top: 5px;
  display: flex;
}

.market-links-wrapper .sponser-wrapper span {
  font-size: clamp(0.88rem, 0.2vw + 0.83rem, 1rem);
}

.market-links-wrapper .sponser-wrapper .sponsor-image {
  margin-top: clamp(0.12rem, 0.3vw + 0.05rem, 0.31rem);
  margin-left: -2px;
}

.market-links-wrapper .single-link-content h6 {
  font-family: var(--glamour-lifestyle);
  margin-bottom: 0px;
  font-size: clamp(1.75rem, 2.26vw + 0.55rem, 2.5rem);
  color: var(--text-color);
}

.market-links-wrapper .single-link-content p {
  font-weight: 500;
  font-size: clamp(1.125rem, 0.56vw + 0.67rem, 1.4rem);
  color: var(--text-color);
  margin-bottom: 0px;
}

.map-small-icon-wrapper {
  width: 24px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.map-small-icon-wrapper .map-small-icon {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c12457;
  border: 1px solid #ffffff;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

#vcm-record-btn {
  position: fixed;
  top: 12rem;
  left: 8px;
  padding: 4px 8px;
  font-size: 11px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
  z-index: 500;
  color: #111827;
  border: none;
  outline: none;
}

#vcm-record-btn.active {
  background-color: #c12457;
  color: #fff;
}

.leaflet-interactive {
  outline: none;
}

@media screen and (max-width: 1200px) {
  #vcm-map {
    flex: 1.25;
  }
}
@media screen and (max-width: 1000px) {
  #vcm-map {
    flex: 1;
  }
}
@media screen and (max-width: 767px) {
  #vcm-map {
    flex: unset;
  }
  .vcm-map-content-wrapper {
    flex-direction: column;
  }
  .map-side-content {
    flex: unset;
    padding-top: 0px;
    padding-right: 0px;
    width: min(100%, 620px);
    margin: auto;
  }
}
