/* body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #0a0d14;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
} */

#map {
  /* width: 100vw;
  height: 100vh;
  position: fixed; */
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0; left: 0;
  z-index: 1;
}

/* Page title overlay */
#page-title {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: rgba(10, 13, 20, 0.82);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 10px 28px;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  pointer-events: none;
}

/* Division legend */
#legend {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 10;
  background: rgba(10, 13, 20, 0.82);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 12px 14px;
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Creates two equal-width columns */
    grid-column-gap: 1rem; /* Optional: adds space between grid items */
}

#legend .legend-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.5);
  pointer-events: none;
    grid-column: span 2; /* Forces the title to span across both columns */
    /* Optional styling to center the title if you want */
    text-align: left;
    margin-bottom: .25rem;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  line-height: 2rem;
  padding: 0;
  margin: 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  user-select: none;
}
.legend-item:hover {
  background: rgba(255,255,255,0.08);
}
.legend-item:active {
  background: rgba(255,255,255,0.14);
  transform: scale(0.97);
}
.legend-swatch {
  width: 12px; height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}
.legend-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Slide-up drawer */
#drawer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 10000;
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  max-width: 640px;
  margin: 0 auto;
}
#drawer.open {
  transform: translateY(0);
  pointer-events: all;
}
#drawer-inner {
  background: rgba(10, 13, 20, 0.96);
  border-top: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px 20px 0 0;
  padding: 0 0 env(safe-area-inset-bottom, 16px);
  backdrop-filter: blur(16px);
  max-width: 640px;
  margin: 0 auto;
}
#drawer-handle-row {
  /* display: flex; */
  display: none;
  justify-content: center;
  align-items: center;
  padding: 14px 20px;
  position: relative;
}
#drawer-handle {
  width: 40px; height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.25);
}
#drawer-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
#drawer-close:hover { background: rgba(255,255,255,0.2); }

#drawer-header {
  padding: 8px 22px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
#drawer-division-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 2px;
}
#drawer-division-name {
    align-items: center;
    display: flex;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
}
#drawer-division-name #drawer-color-dot {
  display: inline-block;
  width: .5rem; height: 1rem;
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: middle;
  position: relative;
  top: 0;
}

#drawer-teams {
    /* background: #FFFFFF14; */
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

#drawer-navigation {
    align-items: center;
    display: flex;
    justify-content: flex-end;
    margin-left: 1rem;
    margin-right: -6px;
    flex: 1;
}

#drawer-navigation button {
    align-items: center;
    appearance: none;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

#drawer-navigation button svg {
    display: block;
    fill: white;
    height: 1.5rem;
    width: auto;
}

.team-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1rem;
  border-radius: 0;
  text-decoration: none;
  color: #fff;
  transition: background 0.15s, transform 0.12s;
  cursor: pointer;
  margin-bottom: 0;
}
.team-card:not(:last-child) {
    border-bottom: 1px solid #FFFFFF14;
}
.team-card:hover {
  background: rgba(255,255,255,0.07);
  /* transform: scale(.98); */
}
.team-card:active { transform: translateX(2px) scale(0.99); }

.team-flag {
  width: 2.25rem; height: 1.25rem;
  min-height: 2.25rem;
    min-width: 2.25rem;
  border-radius: .5rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  overflow: hidden;
}

.team-flag img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.team-info {
    line-height: 1.1;
  flex: 1;
}
.team-country {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 2px;
}
.team-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.team-arrow {
  color: rgba(255,255,255,0.3);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Custom map markers */
.custom-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid rgba(255,255,255,0.7);
  box-shadow: 0 3px 12px rgba(0,0,0,0.5);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  padding: 5px;
}
.custom-marker:hover {
  box-shadow: 0 5px 18px rgba(0,0,0,0.7);
}
.custom-marker-inner {
  transform: rotate(45deg);
  font-size: 0.6rem;
  font-weight: 800;
  color: rgba(0,0,0,0.7);
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1.1;
  white-space: nowrap;
  pointer-events: none;

    /* background-image: url(https://www.mchenryffl.com/wp-content/uploads/2026/06/CIC.png); */
    background-size: cover;
    height: 100%;
    width: 100%;
    border-radius: 50%;
    background-position: center;
}

/* Leaflet overrides */
.leaflet-container { background: #0d1117 !important; }
.leaflet-control-zoom { display: none; }
.leaflet-control-attribution { display: none; }
