/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #1a1a1a; background: #f5f5f5; }
body { display: flex; flex-direction: column; }

.hidden { display: none !important; }

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb {
  background: #1b5e20;
  color: #fff;
  padding: 10px 16px;
  font-size: 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.breadcrumb .crumb {
  cursor: pointer;
  opacity: 0.8;
  text-decoration: underline;
}
.breadcrumb .crumb.active {
  opacity: 1;
  text-decoration: none;
  font-weight: 600;
  cursor: default;
}
.breadcrumb .sep {
  opacity: 0.6;
  margin: 0 2px;
}

/* ── Filter bar ───────────────────────────────────────────── */
.filter-bar {
  background: #fff;
  padding: 10px 16px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid #ddd;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.filter-group label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #666;
}
.filter-group input,
.filter-group select {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}
.filter-group input { width: 100px; }
.btn {
  padding: 6px 16px;
  background: #1b5e20;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 600;
}
.btn:hover { background: #2e7d32; }

/* ── Season picker ────────────────────────────────────────── */
.season-picker {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.season-picker h2 {
  margin-bottom: 20px;
  font-size: 22px;
  color: #333;
}
.season-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.season-card {
  padding: 16px 28px;
  background: #fff;
  border: 2px solid #1b5e20;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  color: #1b5e20;
  transition: all 0.15s;
}
.season-card:hover {
  background: #1b5e20;
  color: #fff;
}

/* ── Map ──────────────────────────────────────────────────── */
.map-container {
  flex: 1;
  position: relative;
}
#map {
  width: 100%;
  height: 100%;
  min-height: 400px;
}

/* Marker labels */
.marker-label {
  background: #1b5e20;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  font-weight: 700;
  line-height: 1;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Detail panel ─────────────────────────────────────────── */
.detail-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 55vh;
  background: #fff;
  border-top: 3px solid #1b5e20;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
  overflow-y: auto;
  z-index: 1000;
  transition: transform 0.2s ease;
}
.detail-header {
  position: sticky;
  top: 0;
  background: #fff;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
.detail-header h3 {
  font-size: 16px;
  flex: 1;
  min-width: 200px;
}
.detail-address {
  font-size: 13px;
  color: #666;
  flex: 1;
  min-width: 200px;
}
.btn-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  line-height: 1;
  padding: 0 4px;
}
.btn-close:hover { color: #333; }

.detail-games {
  padding: 8px 16px 16px;
}
.game-date-header {
  font-weight: 700;
  font-size: 14px;
  padding: 8px 0 4px;
  border-bottom: 1px solid #eee;
  margin-top: 8px;
  color: #1b5e20;
}
.game-row {
  display: grid;
  grid-template-columns: 70px 60px 1fr 1fr auto;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
  align-items: center;
}
.game-row .time { font-weight: 600; }
.game-row .game-num { color: #888; font-size: 12px; }
.game-row .teams { }
.game-row .meta { color: #666; font-size: 12px; }
.game-row .field { color: #888; font-size: 11px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .filter-bar { gap: 8px; }
  .filter-group input { width: 80px; }
  .game-row {
    grid-template-columns: 60px 50px 1fr;
    font-size: 12px;
  }
  .game-row .meta,
  .game-row .field {
    grid-column: 1 / -1;
  }
  .detail-panel { max-height: 65vh; }
}

@media (min-width: 900px) {
  .detail-panel {
    left: auto;
    width: 480px;
    right: 0;
    top: 0;
    bottom: 0;
    max-height: 100vh;
    border-top: none;
    border-left: 3px solid #1b5e20;
  }
}
