/* Course preview page — internal debug tool. Sidebar + full-height
   Leaflet map. Reuses v2 palette via existing CSS vars. */

.cp-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cp-hero {
  padding: 0 4px;
}
.cp-eyebrow {
  display: inline-block;
  padding: 3px 9px;
  border: 1px dashed rgba(217,176,96,0.45);
  border-radius: 999px;
  color: var(--gold, #d9b060);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.cp-title {
  margin: 0 0 6px;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 500;
  font-size: 32px;
  letter-spacing: -0.01em;
}
.cp-sub {
  margin: 0;
  color: rgba(255,255,255,0.55);
  max-width: 70ch;
  line-height: 1.5;
}

/* ── Grid ─────────────────────────────────────────────────────── */
.cp-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  align-items: stretch;
  min-height: 70vh;
}
@media (max-width: 880px) {
  .cp-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }
}

.cp-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Mode tabs (overview / hole-by-hole) ──────────────────────── */
.cp-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
}
.cp-mode-tab {
  appearance: none;
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 120ms, color 120ms;
}
.cp-mode-tab.is-active {
  background: rgba(217,176,96,0.16);
  color: var(--gold, #d9b060);
}
.cp-mode-tab:hover:not(.is-active) {
  color: rgba(255,255,255,0.85);
}
.cp-mode-tab:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Search ──────────────────────────────────────────────────── */
.cp-search {
  position: relative;
}
.cp-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  pointer-events: none;
}
.cp-search-input {
  width: 100%;
  padding: 12px 14px 12px 38px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 120ms, background 120ms;
}
.cp-search-input::placeholder { color: rgba(255,255,255,0.40); }
.cp-search-input:focus {
  border-color: rgba(217,176,96,0.55);
  background: rgba(255,255,255,0.06);
}
.cp-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #14171c;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.cp-dropdown-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 120ms;
}
.cp-dropdown-item:last-child { border-bottom: none; }
.cp-dropdown-item:hover { background: rgba(217,176,96,0.10); }
.cp-dropdown-item.is-muted {
  color: rgba(255,255,255,0.50);
  cursor: default;
}
.cp-dropdown-item-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.cp-dropdown-item-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.50);
  margin-top: 2px;
}

.cp-status {
  padding: 8px 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  letter-spacing: 0.01em;
}

/* ── Sidebar cards ───────────────────────────────────────────── */
.cp-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  overflow: hidden;
}
.cp-card-head {
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.cp-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}
.cp-card-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.50);
  margin-top: 2px;
}
.cp-card-body {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
}
.cp-stat {
  padding: 12px 10px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.05);
}
.cp-stat:last-child { border-right: none; }
.cp-stat-v {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  color: #fff;
  line-height: 1;
}
.cp-stat-l {
  margin-top: 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.50);
}

.cp-ingest-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.18);
  border-top: 1px solid rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.85);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 120ms, color 120ms;
}
.cp-ingest-btn:hover {
  background: rgba(217,176,96,0.10);
  color: var(--gold, #d9b060);
}

/* ── Legend ──────────────────────────────────────────────────── */
.cp-legend-list {
  list-style: none;
  padding: 6px 8px;
  margin: 0;
}
.cp-legend-item {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
}
.cp-legend-item:hover { background: rgba(255,255,255,0.03); }
.cp-legend-sw {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1.5px solid;
  display: inline-block;
}
.cp-legend-label {
  color: #fff;
  font-weight: 500;
}
.cp-legend-count {
  color: rgba(255,255,255,0.55);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

/* ── Hole-by-hole nav ────────────────────────────────────────── */
.cp-hole-nav {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  gap: 8px;
  align-items: stretch;
}
.cp-hole-nav-btn {
  appearance: none;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background 120ms, border-color 120ms;
}
.cp-hole-nav-btn:hover:not(:disabled) {
  background: rgba(217,176,96,0.16);
  border-color: rgba(217,176,96,0.55);
}
.cp-hole-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.cp-hole-nav-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  padding: 8px;
  line-height: 1.2;
}
.cp-hole-nav-num {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  color: #fff;
}
.cp-hole-nav-meta {
  font-size: 10px;
  color: rgba(255,255,255,0.55);
  margin-top: 2px;
  letter-spacing: 0.04em;
}

/* ── Map ─────────────────────────────────────────────────────── */
.cp-map-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: #0a0c10;
  min-height: 540px;
}
@media (max-width: 880px) {
  .cp-map-wrap { min-height: 60vh; }
}
.cp-map {
  position: absolute;
  inset: 0;
}
.cp-map-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255,255,255,0.45);
  background: #0a0c10;
  pointer-events: none;
}
.cp-map-empty > i { font-size: 36px; opacity: 0.4; }
.cp-map-empty-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
}
.cp-map-empty-sub {
  font-size: 11px;
  letter-spacing: 0.04em;
}

/* Override Leaflet's white attribution to fit the dark theme. */
.cp-map .leaflet-control-attribution {
  background: rgba(10,12,16,0.65) !important;
  color: rgba(255,255,255,0.55) !important;
  font-size: 9px !important;
}
.cp-map .leaflet-control-attribution a {
  color: rgba(217,176,96,0.85) !important;
}
.cp-map .leaflet-bar a {
  background: rgba(20,23,28,0.92) !important;
  color: #fff !important;
  border-color: rgba(255,255,255,0.10) !important;
}
.cp-map .leaflet-bar a:hover {
  background: rgba(217,176,96,0.18) !important;
}
