/* Golf Course Map Component */

:root {
  --color-navy: #003764;
  --color-navy-dark: #002542;
  --color-navy-light: #A0C2E8;
  --color-navy-lighter: #D5E9FF;
  --color-white: #ffffff;
  --color-cream: #FAF9F2;
  --font-display: 'Rufina', serif;
  --font-heading: 'Cronos Pro', Georgia, serif;
  --font-body: 'Instrument Sans', system-ui, sans-serif;
}

.golf-map {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Chip strip – the accessible, always-available hole selector */

.golf-map__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.golf-map__chip {
  width: 52px;
  height: 52px;
  border-radius: 9999px;
  border: 1px solid rgba(0, 55, 100, 0.18);
  background: transparent;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.golf-map__chip:hover {
  opacity: 0.8;
}

.golf-map__chip:focus-visible {
  outline: 2px solid var(--color-navy-light);
  outline-offset: 2px;
}

.golf-map__chip.is-selected {
  background: var(--color-navy);
  color: #fff;
  border-color: var(--color-navy);
}

/* Two-column grid: map on the left, detail panel on the right */

.golf-map__grid {
  display: grid;
  /* minmax(0, 1fr) prevents min-content from overflowing horizontally */
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
}

/* Map panel stretches to row height; inner figure is sized by image.
   This is the positioning context for pins: their percentages resolve
   against the image box, NOT the stretched panel. */

.golf-map__panel {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1fa0d2;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.02);
}

.golf-map__figure {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
}

.details-image {
  display: block;
  width: 100%;
  height: auto;
}

/* Hole pins: absolutely positioned by percentage of the IMAGE box.
   transform: translate(-50%, -50%) centers the button on the coordinate. */

.golf-map__pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  background: var(--color-navy);
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 2px 6px rgba(0, 20, 40, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: width 0.2s ease, height 0.2s ease, box-shadow 0.2s ease;
  z-index: 3;
}

.golf-map__pin:hover {
  opacity: 0.8;
}

.golf-map__pin:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.golf-map__pin.is-selected {
  width: 46px;
  height: 46px;
  background: var(--color-cream);
  color: var(--color-navy);
  font-size: 17px;
  border: 2px solid var(--color-navy);
  box-shadow: 0 0 0 6px rgba(0, 55, 100, 0.28);
  z-index: 5;
}

/* Map badge: top-left, overlays the map */

.golf-map__badge {
  position: absolute;
  top: 20px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 18px;
  border-radius: 9999px;
  background: var(--color-navy);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  white-space: nowrap;
  z-index: 2;
}

/* Detail panel: dark navy background, white text */

.golf-map__detail {
  background: var(--color-navy);
  color: #fff;
  border-radius: 8px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: 100%;
}

.golf-map__detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.golf-map__hole-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.golf-map__eyebrow {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-navy-lighter);
}

.golf-map__hole-no {
  font-family: var(--font-display);
  font-size: 76px;
  line-height: 0.9;
  color: #fff;
}

.golf-map__stats {
  display: flex;
  gap: 32px;
  padding-top: 8px;
  margin: 0;
}

.golf-map__stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}

.golf-map__stat-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(213, 233, 255, 0.65);
  margin: 0;
}

.golf-map__stat-value {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  color: #fff;
  margin: 0;
}

/* Tee pill */

.golf-map__tee-pill {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 16px;
  border-radius: 9999px;
  border: 1px solid rgba(213, 233, 255, 0.35);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-navy-lighter);
  white-space: nowrap;
  margin: 0;
}

/* Tee list */

.golf-map__tees {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.golf-map__tee {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid rgba(160, 194, 232, 0.28);
}

.golf-map__tee:last-child {
  border-bottom: 1px solid rgba(160, 194, 232, 0.28);
}

.golf-map__tee-name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: rgba(213, 233, 255, 0.9);
}

.golf-map__dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  flex-shrink: 0;
}

.golf-map__tee-yds {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

/* Fly-over video thumbnail */

.golf-map__flyover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  margin-top: auto;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.golf-map__flyover:hover {
  opacity: 0.9;
}

.golf-map__flyover img,
.golf-map__flyover video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.golf-map__play {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  border: 1.45px solid rgba(255, 255, 255, 0.9);
  background: rgba(0, 37, 66, 0.35);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.golf-map__play::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 8px solid #fff;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  margin-left: 2px;
}

.golf-map__flyover-label {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  z-index: 2;
  pointer-events: none;
}

/* Totals footer */

.golf-map__totals {
  display: flex;
  gap: 32px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: rgba(213, 233, 255, 0.65);
  margin: 0;
}

/* Responsive: stack on mobile, scroll chips horizontally */

@media (max-width: 1023px) {
  .golf-map__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .golf-map__detail {
    min-height: auto;
  }

  .golf-map__chips {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .golf-map__chip {
    scroll-snap-align: start;
    flex-shrink: 0;
  }

  .golf-map__pin {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .golf-map__pin.is-selected {
    width: 38px;
    height: 38px;
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .golf-map__detail {
    padding: 32px 24px;
  }

  .golf-map__hole-no {
    font-size: 56px;
  }

  .golf-map__stat-value {
    font-size: 28px;
  }
}
