/* ============================================================
   Australian Army Cadets Map — Public Map Styles
   ============================================================ */

.acm-map-container {
  display: flex; flex-direction: column;
  font-family: 'Segoe UI', system-ui, sans-serif;
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}

/* ── Top bar ── */
.acm-top-bar {
  height: 100px; background: #fff;
  border-bottom: 1px solid #ddd;
  display: flex; align-items: center;
  justify-content:center; padding: 0 20px;
  flex-shrink: 0; z-index: 100;
}
.acm-top-left { display: flex; align-items: center; gap: 200px; }
.acm-logo-badge {
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.acm-logo-badge svg { width: 32px; height: 32px; }
.acm-logo-dark { background: #2d3318; }
.acm-title {
  font-size: 45px; font-weight: 700; color: #8b1a1a;
  letter-spacing: 1px; text-transform: uppercase; margin: 0;
}
.acm-top-actions {
    display: flex;
    gap: 8px;
    position: absolute;
    top: auto;
    bottom: auto;
    right: 30px;
    margin-top: 8.5em;
}
.acm-logo-badge-2 img {
    width: 70px;
}
.acm-legend-item.active {
    border-color: none !important;
    background: none;
}
/* ── Nav bar ── */
.acm-nav-bar {
    height: 40px;
    background: #4f5a26;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    flex-shrink: 0;
}
.acm-icon-btn {
    background: transparent;
    border: none;
    padding: 4px;
}
.acm-top-actions img {
    width: 36px ;
    height: 36px;
}
.acm-top-actions img {
    width: 33px;
    height: 30px;
}
.acm-back-btn {
  color: #fff; font-size: 13px; font-weight: 600;
  background: none; border: none; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.acm-back-btn.visible { opacity: 1; pointer-events: all; }
.acm-back-btn:hover { text-decoration: underline; }
.acm-nav-url { color: rgba(255,255,255,0.6); font-size: 11px; }

/* ── Body ── */
.acm-body { flex: 1; display: flex; overflow: hidden; position: relative; }
#acm-leaflet-map { flex: 1; z-index: 1; }
.leaflet-tile { filter: saturate(0.65) brightness(1.06); }

/* ── Sidebar ── */
.acm-sidebar {
    width: 200px;
    background: #e7f4f7;
    display: flex;
    flex-direction: column;
    z-index: 100;
    padding: 20px 14px;
    gap: 10px;
    flex-shrink: 0;
}
.acm-legend-title {
  font-size: 11px; font-weight: 700; color: #aaa;
  text-transform: uppercase; letter-spacing: 1px;
}
.acm-legend-item {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; padding: 7px 8px; border-radius: 6px;
  transition: background 0.2s; border: 1.5px solid transparent;
}
.acm-legend-box {
    width: 44px;
    height: 40px;
    border-radius: 4px;
    border: 2px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}
.acm-legend-box.checked { border-color: #ccc; }
.acm-check { color: #8b1a1a; font-size: 14px; display: none; }
.acm-legend-box.checked .acm-check { display: block; }
.acm-legend-label {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.acm-legend-label.acu { color: #8b1a1a; }
.acm-legend-label.hq  { color: #555; }
.acm-legend-label.new { color: #b8860b; }
.acm-sidebar-hint { font-size: 11px; color: #bbb; font-style: italic; line-height: 1.5; }

/* ── Footer ── */
.acm-footer-bar {
  background: #2d3318; height: 30px;
  display: flex; align-items: center; padding: 0 14px; gap: 8px;
  flex-shrink: 0;
}
.acm-footer-badge {
  width: 20px; height: 20px; background: #b8860b;
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 9px; color: #fff;
}
.acm-footer-bar a { color: rgba(255,255,255,0.6); font-size: 11px; text-decoration: none; }

/* ── Map markers ── */
.acm-marker-pin {
  border-radius: 50%; border: 2px solid rgba(255,255,255,0.7);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform 0.18s, box-shadow 0.18s;
}
.acm-marker-pin:hover { transform: scale(1.35); box-shadow: 0 0 0 5px rgba(255,255,255,0.4); }
.acm-marker-pin svg { width: 58%; height: 58%; opacity: 0.85; }
.acm-marker-acu { background: rgba(139,26,26,0.22); border-color: #8b1a1a; }
.acm-marker-hq  { background: rgba(120,120,120,0.18); border-color: #888; }
.acm-marker-new { background: rgba(184,134,11,0.22); border-color: #b8860b; }
.acm-marker-state {
  background: rgba(139,26,26,0.22); border: 2.5px solid #8b1a1a;
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; cursor: pointer; transition: all 0.2s;
}
.acm-marker-state:hover {
  background: rgba(139,26,26,0.38); transform: scale(1.12);
  box-shadow: 0 0 0 7px rgba(139,26,26,0.12);
}

/* ── State tooltip ── */
.acm-state-tooltip {
  background: white; border: 2px solid #8b1a1a;
  border-radius: 8px; padding: 5px 12px;
  font-family: inherit; box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.acm-state-tooltip strong { color: #8b1a1a; font-size: 13px; display: block; }
.acm-state-tooltip span { color: #666; font-size: 11px; }

/* ── Circle popup (on-map) ── */
.acm-circle-popup {
  width: 360px; height: 360px; border-radius: 50%;
  background: rgba(246,242,237,0.95);
  position: relative; display: flex; align-items: center;
  justify-content: center; pointer-events: all;
  animation: acmPopIn 0.22s cubic-bezier(0.34,1.56,0.64,1);
  overflow: hidden;
  box-shadow: 0 10px 50px rgba(0,0,0,0.22), 0 0 0 2px rgba(139,26,26,0.2);
}
@keyframes acmPopIn {
  from { transform: scale(0.2); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.acm-ch-h, .acm-ch-v { position: absolute; background: rgba(139,26,26,0.12); pointer-events: none; }
.acm-ch-h { left:0; right:0; top:50%; height:1.5px; transform:translateY(-50%); }
.acm-ch-v { top:0; bottom:0; left:50%; width:1.5px; transform:translateX(-50%); }
.acm-ring  { position: absolute; inset:45px; border-radius:50%; border:1.5px solid rgba(139,26,26,0.13); pointer-events:none; }

.acm-popup-close {
  position: absolute; top:78px; right:68px;
  width:26px; height:26px; background:rgba(139,26,26,0.12);
  border:none; border-radius:50%; cursor:pointer; font-size:13px;
  color:#8b1a1a; display:flex; align-items:center; justify-content:center;
  transition:background 0.2s; z-index:10;
}
.acm-popup-close:hover { background:rgba(139,26,26,0.28); }

.acm-popup-content {
  position: relative; z-index:2; width:74%;
  display:flex; flex-direction:column; gap:8px;
}
.acm-popup-unit-name {
  font-size:15px; font-weight:700; color:#8b1a1a;
  text-transform:uppercase; letter-spacing:0.5px;
  text-align:center; line-height:1.2; margin-bottom:2px;
}
.acm-stat-lbl { font-size:8.5px; font-weight:700; letter-spacing:1.5px; text-transform:uppercase; color:#999; margin-bottom:1px; }
.acm-stat-num { font-size:38px; font-weight:700; color:#333; line-height:1; }
.acm-stat-num.sm { font-size:28px; }
.acm-stat-desc {
  font-size:8px; color:#777; text-transform:uppercase;
  letter-spacing:0.4px; line-height:1.4;
  background:rgba(180,180,180,0.18); padding:3px 5px; border-radius:3px; margin-top:3px;
}
.acm-person-icons { display:flex; gap:4px; align-items:flex-end; margin:2px 0; }
.acm-bottom-row   { display:flex; gap:10px; }
.acm-bottom-col   { flex:1; }

/* Loading spinner for map */
.acm-loading {
  position: absolute; inset: 0; background: rgba(246,242,237,0.9);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; flex-direction: column; gap: 12px;
}
.acm-spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(74,82,40,0.2);
  border-top-color: #4a5228;
  border-radius: 50%;
  animation: acmSpin 0.8s linear infinite;
}
@keyframes acmSpin { to { transform: rotate(360deg); } }
.acm-loading p { color: #4a5228; font-size: 13px; font-weight: 600; }
