/* ========================================
   CRYSTAL PARK
   INTERACTIVE SITE PLAN
======================================== */

/* ========================================
   VARIABLES
======================================== */

:root {
  --navy: #0d1b2a;
  --gold: #c7a55b;
  --green: #198754;
  --amber: #797877;
  --sold: #e7280f;
}

/* ========================================
   GENERAL
======================================== */

body {
  background: #f6f6f3;
  color: #17202a;
}

/* ========================================
   NAVIGATION
======================================== */

.cp-nav {
  background: var(--navy);
}

.availability-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
}

.availability-back img {
  filter: invert(1);
}

.availability-back:hover img,
.availability-back:active img {
  filter: none;
}

/* ========================================
   HERO
======================================== */

.hero {
  background: linear-gradient(135deg, #0d1b2a, #24384d);

  color: #fff;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: var(--gold);
}

/* ========================================
   MAP CARD
======================================== */

.map-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 35px #0000000c;
}

.landscape-hint {
  display: none;
}

@media (max-width: 767.98px) and (orientation: portrait) {
  .landscape-hint {
    display: block;
    margin: 0 0 16px;
    padding: 10px 12px;
    border-left: 3px solid var(--gold);
    background: #fff;
    color: #17202a;
    font-size: 0.875rem;
  }
}

.map-scroll {
  overflow: hidden;
  padding: 16px;
}

.map-wrap {
  position: relative;
  width: 100%;
  max-width: 1050px;
  margin: 0 auto;
}

.map-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

/* ========================================
   MAP MARKERS
======================================== */

.marker {
  position: absolute;
  transform: translate(-50%, -50%);

  width: 26px;
  height: 26px;

  border: 2px solid white;
  border-radius: 50%;

  font-size: 9px;
}

/* Desktop hover */

.marker:hover {
  transform: translate(-50%, -50%) scale(1.16);

  z-index: 5;
}

/* ========================================
   MARKER STATUS
======================================== */

.marker.available {
  background: var(--green);
}

.marker.under-offer {
  background: var(--amber);
  color: #212529;
}

.marker.sold {
  background: var(--sold);
  opacity: 0.72;
}

.marker.hidden-state {
  opacity: 0.1;
  pointer-events: none;
}

/* ========================================
   LEGEND
======================================== */

.legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.dot {
  width: 11px;
  height: 11px;

  border-radius: 50%;

  display: inline-block;

  margin-right: 6px;
}

.dot.available {
  background: var(--green);
}

.dot.under-offer {
  background: var(--amber);
}

.dot.sold {
  background: var(--sold);
}

/* ========================================
   UNIT DETAILS SHEET
======================================== */

.unit-sheet {
  height: auto !important;
  max-height: 80vh;

  border-radius: 24px 24px 0 0;
}

/* ========================================
   INFO BOXES
======================================== */

.info-box {
  background: #f4f5f6;

  border-radius: 12px;

  padding: 12px;
}

.info-box small,
.info-box strong {
  display: block;
}

.info-box strong {
  font-size: 1.2rem;
}

/* ========================================
   STATUS BADGES
======================================== */

.status-available {
  background: #d1e7dd !important;
  color: #0f5132 !important;
}

.status-under-offer {
  background: #fff3cd !important;
  color: #664d03 !important;
}

.status-sold {
  background: #e2e3e5 !important;
  color: #41464b !important;
}

/* ========================================
   TABLET
   601px - 1024px
======================================== */

@media (min-width: 601px) and (max-width: 1024px) {
  /* Fit full site plan */

  .map-wrap {
    min-width: 0;
    width: 100%;
  }

  .map-wrap img {
    width: 100%;
    height: auto;
  }

  .map-scroll {
    overflow-x: hidden;
    overflow-y: visible;
  }

  /* Tablet markers */

  .marker {
    width: 27px;
    height: 27px;

    border-width: 2px;

    font-size: 9px;

    box-shadow: 0 2px 7px #0005;
  }

  /* Map */

  .map-card {
    border-radius: 15px;
  }

  /* Filters */

  .filter {
    font-size: 0.9rem;
  }

  /* Legend */

  .legend {
    gap: 14px;
    font-size: 0.85rem;
  }

  /* Hero */

  .hero .lead {
    font-size: 1.05rem;
  }
}

/* ========================================
   MOBILE
   600px AND BELOW
======================================== */

@media (max-width: 600px) {
  /* Hero */

  .hero .lead {
    font-size: 1rem;
  }

  /* Reduce outside spacing */

  main.container {
    padding-left: 10px;
    padding-right: 10px;
  }

  /* Fit entire site plan */

  .map-wrap {
    min-width: 0;
    width: 100%;
  }

  .map-wrap img {
    width: 100%;
    height: auto;
  }

  .map-scroll {
    overflow-x: hidden;
    overflow-y: visible;
  }

  /* Mobile markers */

  .marker {
    width: 21px;
    height: 21px;

    border-width: 2px;

    font-size: 7.5px;

    box-shadow: 0 1px 4px #0005;
  }

  /* Disable hover enlargement on touch */

  .marker:hover {
    transform: translate(-50%, -50%);

    z-index: auto;
  }

  /* Map card */

  .map-card {
    border-radius: 12px;
  }

  /* Filters */

  .filter {
    font-size: 0.82rem;

    padding: 0.4rem 0.65rem;
  }

  /* Legend */

  .legend {
    gap: 10px;

    font-size: 0.8rem;
  }

  .dot {
    width: 9px;
    height: 9px;
  }

  /* Unit details */

  .unit-sheet {
    max-height: 90vh;
  }
}
