/* Public ice-rink map page. Reuses ../styles.css tokens. */

/* Split-pane filling the viewport below the 64px sticky nav: map left, sidebar right.
   The container itself never scrolls; the sidebar scrolls internally on overflow. */
.rinkPage {
  display: flex;
  flex-direction: row;
  height: calc(100vh - 64px);
  overflow: hidden;
}

.rinkPage__mapwrap {
  position: relative;
  flex: 1 1 50%;
  min-width: 0;
  min-height: 0;
}

.rinkPage__map {
  width: 100%;
  height: 100%;
  background: var(--surface);
}

/* Loading / error / empty overlay, centered over the map area. */
.rinkPage__state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 15px;
  pointer-events: none;
  z-index: 2;
}

/* Right sidebar: fixed half-width, internally scrollable. */
.rinkSidebar {
  flex: 1 1 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
  border-left: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font);
  color: var(--text);
}

.rinkSidebar__head {
  flex: 0 0 auto;
}

.rinkSidebar__title {
  margin: 0 0 4px;
  font-size: 21px;
  letter-spacing: -0.3px;
}

.rinkSidebar__sub {
  margin: 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.4;
}

.rinkSidebar__search {
  flex: 0 0 auto;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
}
.rinkSidebar__search::placeholder { color: var(--text-dim); }
.rinkSidebar__search:focus { border-color: var(--accent); }

.rinkSidebar__groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Per-country collapsible accordion group. */
.rinkGroup {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow: hidden;
}

.rinkGroup__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.rinkGroup__summary::-webkit-details-marker { display: none; }
.rinkGroup__summary:hover { color: var(--accent); }

.rinkGroup__count {
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
}

.rinkGroup__list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.rinkRow {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}
.rinkRow:last-child { border-bottom: none; }
.rinkRow:hover { background: var(--surface); }

.rinkRow__name {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.rinkRow__addr {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.35;
}

/* InfoWindow content (rendered inside Google's white popup, so use dark text). */
.rinkInfo {
  font-family: var(--font);
  color: #1a1d22;
  min-width: 180px;
  line-height: 1.45;
}
.rinkInfo__name {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}
.rinkInfo__row {
  font-size: 13px;
  color: #444b55;
}
.rinkInfo__size {
  font-weight: 600;
  color: #1a73e8;
}
.rinkInfo__link {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1a73e8;
}
.rinkInfo__link:hover { text-decoration: underline; }

@media (max-width: 640px) {
  /* Stack vertically: map on top, sidebar below. Container scrolls as a whole. */
  .rinkPage {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 64px);
    overflow: visible;
  }
  .rinkPage__mapwrap {
    flex: 0 0 auto;
    height: 45vh;
  }
  .rinkSidebar {
    flex: 1 1 auto;
    overflow-y: visible;
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 16px;
  }
  .rinkSidebar__title { font-size: 18px; }
}
