/* AFCON 2027 Interactive Map — afcontanzaniaguide.com */
:root {
  --am-green: #1B5E20;
  --am-green-mid: #2E7D32;
  --am-green-light: #EAF3DE;
  --am-gold: #FFD54F;
  --am-gold-dark: #F9A825;
  --am-tz: #1B5E20;
  --am-ke: #006600;
  --am-ug: #FCDC04;
  --am-white: #ffffff;
  --am-border: #E0E0E0;
  --am-text: #1a1a1a;
  --am-muted: #666;
  --am-radius: 12px;
}

.afcon-map-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--am-white);
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  overflow: hidden;
  max-width: 100%;
}

/* Header */
.afcon-map-header {
  background: #1B5E20 !important;
  padding: 16px 16px 14px;
  color: #ffffff !important;
}
.afcon-map-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.afcon-map-flag { font-size: 18px; }
.afcon-map-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  margin: 0 !important;
  color: #ffffff !important;
}
.afcon-map-sub {
  font-size: 12px !important;
  color: rgba(255,255,255,0.8) !important;
  margin: 0 !important;
}

/* Filters */
.afcon-map-filters {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--am-border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: #FAFAFA;
}
.afcon-map-filters::-webkit-scrollbar { display: none; }
.afcon-map-filter {
  flex-shrink: 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--am-muted);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
}
.afcon-map-filter:hover { color: var(--am-green); }
.afcon-map-filter.active {
  color: var(--am-green);
  border-bottom-color: var(--am-green);
  background: #fff;
}

/* Map */
#afcon-leaflet-map {
  height: 320px;
  width: 100%;
  z-index: 1;
}
@media (min-width: 600px) {
  #afcon-leaflet-map { height: 420px; }
}

/* Info panel */
.afcon-map-panel {
  padding: 14px 16px;
  border-top: 1px solid var(--am-border);
  min-height: 90px;
  background: #fff;
}
.afcon-map-panel-default {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--am-muted);
  font-size: 13px;
}
.afcon-map-panel-default p { margin: 0; }
.afcon-map-panel-icon { font-size: 24px; }

/* Stadium card in panel */
.afcon-stadium-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
}
.afcon-stadium-card-left {}
.afcon-stadium-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--am-text);
  margin: 0 0 2px;
}
.afcon-stadium-city {
  font-size: 12px;
  color: var(--am-muted);
  margin: 0 0 8px;
}
.afcon-stadium-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.afcon-stadium-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.afcon-badge-tz { background: #EAF3DE; color: #1B5E20; }
.afcon-badge-ke { background: #E8F5E9; color: #2E7D32; }
.afcon-badge-ug { background: #FFF9E6; color: #856404; }
.afcon-badge-final { background: #FFF8E1; color: #856404; border: 1px solid #FFD54F; }
.afcon-badge-semi { background: #E3F2FD; color: #1565C0; }
.afcon-badge-group { background: #F3E5F5; color: #6A1B9A; }
.afcon-stadium-cap {
  font-size: 13px;
  font-weight: 700;
  color: var(--am-green);
}
.afcon-stadium-cap-label {
  font-size: 11px;
  color: var(--am-muted);
}
.afcon-directions-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--am-green);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 6px;
  transition: background 0.15s;
  white-space: nowrap;
}
.afcon-directions-btn:hover { background: var(--am-green-mid); color: #fff; }
.afcon-stadium-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--am-green);
  text-decoration: none;
}
.afcon-stadium-link:hover { text-decoration: underline; }
.afcon-stadium-card-right {
  text-align: right;
}

/* Stats strip */
.afcon-map-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--am-border);
  background: var(--am-green-light);
}
.afcon-map-stat {
  padding: 10px 6px;
  text-align: center;
  border-right: 1px solid #C8E6C9;
}
.afcon-map-stat:last-child { border-right: none; }
.afcon-map-stat-num {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--am-green);
  line-height: 1.2;
}
.afcon-map-stat-label {
  display: block;
  font-size: 10px;
  color: var(--am-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Custom Leaflet marker styles */
.afcon-marker {
  width: 36px !important;
  height: 44px !important;
  background: none !important;
  border: none !important;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.afcon-marker-pin {
  width: 32px;
  height: 32px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  border: 2px solid rgba(255,255,255,0.6);
  transition: transform 0.15s, box-shadow 0.15s;
}
.afcon-marker-pin:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
.afcon-marker-pin.tz { background: #1B5E20; }
.afcon-marker-pin.ke { background: #006600; }
.afcon-marker-pin.ug { background: #D4A017; }
.afcon-marker-pin.active-pin {
  transform: rotate(-45deg) scale(1.2);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.afcon-marker-inner {
  transform: rotate(45deg);
  font-size: 13px;
  line-height: 1;
  color: #fff;
  font-weight: 700;
}
.afcon-marker-shadow {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 4px;
  background: rgba(0,0,0,0.2);
  border-radius: 50%;
}

/* Leaflet popup customisation */
.leaflet-popup-content-wrapper {
  border-radius: 10px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
  padding: 0 !important;
  overflow: hidden;
}
.leaflet-popup-content {
  margin: 0 !important;
  width: 220px !important;
}
.afcon-popup {
  padding: 12px 14px;
}
.afcon-popup-name {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 2px;
}
.afcon-popup-city {
  font-size: 11px;
  color: #666;
  margin: 0 0 6px;
}
.afcon-popup-cap {
  font-size: 12px;
  font-weight: 700;
  color: #1B5E20;
}
.leaflet-popup-tip-container { display: block; }

/* Pulse animation for selected marker */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(27,94,32,0.4); }
  70% { box-shadow: 0 0 0 10px rgba(27,94,32,0); }
  100% { box-shadow: 0 0 0 0 rgba(27,94,32,0); }
}
.afcon-marker-pin.pulsing {
  animation: pulse 1.5s ease-out;
  transform: rotate(-45deg) scale(1.15);
}
