/* ===== Map page overrides ===== */

/* Desktop: side-by-side layout */
@media (min-width: 768px) {
  #hero {
    flex-direction: row;
    height: calc(100vh - 2rem - 70px);
    overflow: hidden;
  }
  #controls {
    width: 300px;
    min-width: 300px;
    height: 100%;
    min-height: unset;
    overflow-y: auto;
    order: -1;
  }
  #map {
    flex: 1;
    height: 100% !important;
  }
}

/* Controls panel */
#controls {
  background: #181818;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sidebar-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold-solid);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #2a2a2a;
}

/* Stats line under the title */
.sidebar-stats {
  font-size: 0.78rem;
  color: #9a9a9a;
  margin-top: -0.35rem;
}
.sidebar-stats strong {
  color: var(--gold-solid);
  font-weight: 700;
}

/* Loading spinner on the placeholder icon */
.info-placeholder-icon.spin {
  display: inline-block;
  animation: spin 1.1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Search */
.search-wrapper {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  pointer-events: none;
  opacity: 0.5;
}

#searchInput {
  width: 100%;
  padding: 0.65rem 0.9rem 0.65rem 2rem;
  background: #242424;
  border: 1px solid #333;
  border-radius: 8px;
  color: #fff;
  font-size: 0.875rem;
  font-family: 'Hanken Grotesk', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

#searchInput:focus {
  border-color: var(--gold-solid);
}

#searchInput::placeholder {
  color: #555;
}

.search-results {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: #1e1e1e;
  border: 1px solid var(--gold-solid);
  border-radius: 8px;
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  z-index: 9999;
  display: none;
  box-shadow: 0 6px 16px rgba(0,0,0,0.7);
}

.search-results li {
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: #ccc;
  border-bottom: 1px solid #2a2a2a;
  transition: background 0.15s, color 0.15s;
}

.search-results li:last-child { border-bottom: none; }

.search-results li:hover,
.search-results li.kb-active {
  background: #2a2a2a;
  color: var(--gold-solid);
}

/* Non-selectable "no results" row */
.search-results li.search-noresult,
.search-results li.search-noresult:hover {
  cursor: default;
  color: #888;
  background: transparent;
  font-style: italic;
}

/* Location + reset action row */
.control-actions {
  display: flex;
  gap: 0.5rem;
}
.control-actions .locate-btn {
  flex: 1;
  text-align: center;
}

/* Opt-in geolocation button */
.locate-btn {
  width: 100%;
  padding: 0.6rem 0.9rem;
  background: #1c1c1c;
  color: #ddd;
  border: 1px solid #333;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.locate-btn:hover {
  background: #2a2a2a;
  color: var(--gold-solid);
  border-color: var(--gold-solid);
}
.locate-btn[aria-busy="true"] {
  opacity: 0.6;
  cursor: progress;
}

/* Premium-only toggle */
.premium-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  background: #1c1c1c;
  border: 1px solid #333;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: #ddd;
  transition: border-color 0.15s, color 0.15s;
}
.premium-toggle:hover { border-color: var(--gold-solid); }
.premium-toggle input { accent-color: var(--gold-solid); width: 1rem; height: 1rem; cursor: pointer; }
.premium-toggle-text { color: var(--gold-solid); font-weight: 600; }

/* Labels */
.control-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}

/* Gold-themed selects */
#clubSelect,
#regionSelect {
  width: 100%;
  padding: 0.65em 2.2em 0.65em 0.85em;
  font-size: 0.875rem;
  font-family: 'Hanken Grotesk', sans-serif;
  border: 1px solid #333;
  border-radius: 8px;
  background: #242424;
  color: #fff;
  margin-bottom: 0;
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23d4af37' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-color: #242424;
}

#clubSelect:focus,
#regionSelect:focus {
  border-color: var(--gold-solid);
  outline: none;
}

/* Info placeholder */
.info-placeholder {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #444;
  font-size: 0.825rem;
  line-height: 1.6;
}

.info-placeholder-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

/* Club info card */
.club-card {
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  overflow: hidden;
  animation: cardFadeIn 0.2s ease;
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.club-card-header {
  background: linear-gradient(135deg, #1c1500, #262000);
  border-bottom: 1px solid var(--gold-solid);
  padding: 1rem 1.1rem;
}

/* Premium room emphasis */
.club-card--premium {
  border-color: var(--gold-solid);
  box-shadow: 0 0 0 1px var(--gold-solid), 0 6px 20px rgba(212,175,55,0.15);
}
.premium-badge {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.2rem 0.55rem;
  background: var(--gold-solid);
  color: #1a1000;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 999px;
}
.popup-premium {
  color: #b8860b;
  font-weight: 700;
  font-size: 0.72rem;
}

.apex-badge {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.2rem 0.55rem;
  background: linear-gradient(135deg, #f5d77a, var(--gold-solid));
  color: #1a1000;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
  text-decoration: none;
}
.apex-badge:hover { filter: brightness(1.08); }

.club-card-name {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--gold-solid);
  line-height: 1.3;
  margin-bottom: 0.35rem;
}

.club-card-region {
  font-size: 0.7rem;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.club-card-details {
  padding: 0.85rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.detail-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.825rem;
  color: #bbb;
}

.detail-icon {
  flex-shrink: 0;
  width: 1rem;
  text-align: center;
  margin-top: 0.05rem;
}

.detail-row a {
  color: #bbb;
  word-break: break-all;
  transition: color 0.2s;
}

.detail-row a:hover { color: var(--gold-solid); }

.club-card-actions {
  padding: 0 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.club-card-actions button {
  width: 100%;
  padding: 0.5rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'Hanken Grotesk', sans-serif;
  border: 1px solid #333;
  background: #1e1e1e;
  color: #bbb;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.club-card-actions button:hover {
  border-color: var(--gold-solid);
  color: var(--gold-solid);
  background: #1f1a00;
}

.club-card-reviews {
  border-top: 1px solid #222;
  padding: 0.85rem 1.1rem;
}

.reviews-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold-solid);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

.review-item {
  font-size: 0.8rem;
  color: #888;
  line-height: 1.5;
  font-style: italic;
  margin-bottom: 0.5rem;
  padding-left: 0.75rem;
  border-left: 2px solid #2a2a2a;
}

/* Nearest-rooms list (after geolocation) */
.nearest-list {
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  overflow: hidden;
  animation: cardFadeIn 0.2s ease;
}
.nearest-label {
  background: linear-gradient(135deg, #1c1500, #262000);
  border-bottom: 1px solid var(--gold-solid);
  padding: 0.7rem 1.1rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold-solid);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.nearest-item {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 1.1rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid #222;
  color: #ccc;
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 0.83rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.nearest-item:last-child { border-bottom: none; }
.nearest-item:hover { background: #2a2a2a; color: var(--gold-solid); }
.nearest-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nearest-dist { flex-shrink: 0; color: #888; font-size: 0.75rem; }
.nearest-item:hover .nearest-dist { color: var(--gold-solid); }

/* Custom cluster icons */
.custom-cluster {
  background: transparent !important;
  border: none !important;
}

.cluster-icon {
  width: 36px;
  height: 36px;
  background: var(--gold-solid);
  color: #1a1000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  font-family: 'Hanken Grotesk', sans-serif;
  box-shadow: 0 2px 8px rgba(0,0,0,0.6), 0 0 0 4px rgba(212,175,55,0.15);
}
