/* ============================================================
   CoyoteAlert — style.css
   Wildlife Insights inspired: clean white header, map-first,
   green accents, professional public-safety feel.
   Mobile-first, then desktop overrides.
============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── TOKENS ─────────────────────────────────── */
:root {
  --green-dk:   #1b5e35;
  --green:      #2d7a4f;
  --green-md:   #388e5c;
  --green-lt:   #e8f5ee;
  --green-acc:  #3dba72;   /* active tab underline */

  --white:      #ffffff;
  --bg:         #f4f6f5;
  --card:       #ffffff;
  --border:     #dde5e0;
  --border-lt:  #eef2ef;

  --text:       #1a2e22;
  --text-mid:   #4a6358;
  --text-muted: #8fa89d;

  --red:        #c62828;
  --red-lt:     #ffebee;
  --amber:      #e65100;
  --amber-lt:   #fff3e0;
  --blue:       #1565c0;
  --blue-lt:    #e3f2fd;

  --header-h:   58px;
  --r:          8px;
  --r-lg:       12px;
  --r-xl:       16px;

  --sh-sm:  0 1px 3px rgba(0,0,0,0.07), 0 1px 6px rgba(0,0,0,0.04);
  --sh:     0 2px 10px rgba(0,0,0,0.09);
  --sh-lg:  0 4px 24px rgba(0,0,0,0.13);
}

/* ── RESET ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden; /* map-first — pages scroll internally */
}


/* ════════════════════════════════════════════
   HEADER
════════════════════════════════════════════ */
.ca-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  z-index: 500;
  box-shadow: 0 1px 0 var(--border), 0 2px 8px rgba(0,0,0,0.04);
}

/* Left: logo + brand */
.ca-header-left {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.ca-logo-icon {
  width: 34px;
  height: 34px;
  background: var(--green-lt);
  border: 1.5px solid #b6d9c5;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.ca-brand {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.ca-brand strong {
  font-weight: 800;
  color: var(--green);
}

/* Center: nav tabs */
.ca-nav {
  display: flex;
  align-items: stretch;
  height: var(--header-h);
  flex: 1;
  justify-content: center;
  gap: 0;
}

.ca-tab {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-mid);
  padding: 0 14px;
  cursor: pointer;
  height: 100%;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}

.ca-tab:hover { color: var(--text); }

.ca-tab.active {
  color: var(--green);
  font-weight: 700;
  border-bottom-color: var(--green-acc);
}

/* Right: login + CTA + hamburger */
.ca-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ca-btn-login {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-mid);
  padding: 6px 15px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.ca-btn-login:hover { border-color: var(--green); color: var(--green); }

.ca-btn-report {
  background: var(--green);
  color: white;
  border: none;
  border-radius: var(--r);
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 700;
  padding: 7px 16px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(45,122,79,.28);
  transition: background 0.15s, box-shadow 0.15s;
}
.ca-btn-report:hover  { background: var(--green-dk); }
.ca-btn-report:active { transform: scale(0.97); }

.ca-hamburger {
  display: none;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  width: 36px;
  height: 34px;
  font-size: 1.05rem;
  cursor: pointer;
  color: var(--text-mid);
  transition: border-color 0.15s;
}
.ca-hamburger:hover { border-color: var(--green); color: var(--green); }


/* ════════════════════════════════════════════
   MOBILE NAV DRAWER
════════════════════════════════════════════ */
.ca-mobile-drawer {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  z-index: 490;
  box-shadow: var(--sh);
  transform: translateY(-110%);
  transition: transform 0.22s cubic-bezier(.4,0,.2,1);
}

.ca-mobile-drawer.open { transform: translateY(0); }

.ca-mobile-drawer .ca-tab {
  display: block;
  width: 100%;
  height: auto;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border-lt);
  border-left: 3px solid transparent;
  border-right: none;
  text-align: left;
  font-size: 0.9rem;
}

.ca-mobile-drawer .ca-tab.active {
  border-left-color: var(--green-acc);
  background: var(--green-lt);
  color: var(--green);
}

.ca-mobile-drawer .ca-tab:last-child { border-bottom: none; }


/* ════════════════════════════════════════════
   MAP WRAPPER  (always-on Leaflet container)
════════════════════════════════════════════ */
#map-wrapper {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0; bottom: 0;
  z-index: 0;
}

#leaflet-map {
  width: 100%;
  height: 100%;
}


/* ════════════════════════════════════════════
   PAGE SYSTEM
════════════════════════════════════════════ */
.ca-page {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0; bottom: 0;
  display: none;
}

.ca-page.active { display: block; }

/* Map pages: transparent — map shows through */
.ca-page.map-page {
  z-index: 10;
  background: transparent;
  pointer-events: none;
}
.ca-page.map-page > * { pointer-events: auto; }

/* Content pages: solid white, scrollable */
.ca-page.content-page {
  z-index: 20;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}


/* ════════════════════════════════════════════
   ALERTS PAGE — MAP OVERLAYS
════════════════════════════════════════════ */

/* ── Floating info card (top-left) ─────── */
.map-info-card {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 290px;
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 18px 20px 20px;
  box-shadow: var(--sh-lg);
  border: 1px solid var(--border);
}

.map-info-top {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 2px;
}

.map-info-count {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--green);
  line-height: 1;
}

.map-info-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  max-width: 140px;
}

.map-info-area {
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.map-info-desc {
  font-size: 0.83rem;
  color: var(--text-mid);
  line-height: 1.55;
  margin-bottom: 14px;
}

.map-info-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Filter chips (right side) ─────────── */
.map-filters {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.filter-chip {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-family: inherit;
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--text-mid);
  padding: 6px 14px;
  cursor: pointer;
  box-shadow: var(--sh-sm);
  transition: all 0.14s;
  white-space: nowrap;
}

.filter-chip:hover { border-color: var(--green); color: var(--green); }

.filter-chip.active {
  background: var(--green);
  color: white;
  border-color: var(--green);
  box-shadow: 0 2px 8px rgba(45,122,79,.3);
}

/* ── Bottom sightings feed ──────────────── */
.sightings-feed {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.08);
  transition: max-height 0.3s ease;
  max-height: 220px;
  overflow: hidden;
}

.sightings-feed.collapsed { max-height: 44px; }

.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-lt);
  user-select: none;
}

.feed-header h3 {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
}

.feed-toggle-btn {
  background: none;
  border: none;
  font-size: 0.72rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  transition: transform 0.22s;
  pointer-events: none;
}

.sightings-feed.collapsed .feed-toggle-btn { transform: rotate(180deg); }

.feed-scroll {
  display: flex;
  gap: 10px;
  padding: 10px 16px 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.feed-scroll::-webkit-scrollbar { display: none; }

.feed-card {
  flex-shrink: 0;
  width: 210px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 10px 12px;
  scroll-snap-align: start;
  cursor: pointer;
  background: var(--card);
  transition: box-shadow 0.14s, border-color 0.14s;
}

.feed-card:hover { box-shadow: var(--sh); border-color: var(--green-md); }

.feed-card-loc {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.feed-card-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.risk-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
  flex-shrink: 0;
}
.risk-dot.low    { background: var(--green); }
.risk-dot.medium { background: var(--amber); }
.risk-dot.high   { background: var(--red); }

/* Explore map label */
.explore-label {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-mid);
  box-shadow: var(--sh);
  white-space: nowrap;
}


/* ════════════════════════════════════════════
   CONTENT PAGE WRAPPER
════════════════════════════════════════════ */
.ca-content-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 20px 72px;
}

.ca-page-header {
  margin-bottom: 24px;
}

.ca-page-header h1 {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.4px;
}

.ca-page-header p {
  font-size: 0.88rem;
  color: var(--text-mid);
  margin-top: 5px;
}

.ca-page-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 18px;
  gap: 16px;
  flex-wrap: wrap;
}

.ca-page-header-row h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
}

.ca-page-header-row p {
  font-size: 0.88rem;
  color: var(--text-mid);
  margin-top: 4px;
}


/* ════════════════════════════════════════════
   CARDS
════════════════════════════════════════════ */
.ca-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  box-shadow: var(--sh-sm);
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-lt);
}


/* ════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════ */
.btn-green {
  background: var(--green);
  color: white;
  border: none;
  border-radius: var(--r);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 1px 4px rgba(45,122,79,.28);
  transition: background 0.14s, box-shadow 0.14s, transform 0.1s;
  white-space: nowrap;
}
.btn-green:hover  { background: var(--green-dk); box-shadow: 0 2px 8px rgba(45,122,79,.38); }
.btn-green:active { transform: scale(0.97); }
.btn-green.full-width { width: 100%; }

.btn-outline-green {
  background: transparent;
  color: var(--green);
  border: 1.5px solid var(--green);
  border-radius: var(--r);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.14s, color 0.14s;
  white-space: nowrap;
}
.btn-outline-green:hover { background: var(--green-lt); }


/* ════════════════════════════════════════════
   FORMS
════════════════════════════════════════════ */
.form-group { margin-bottom: 16px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

input, select, textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: #fafcfb;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238fa89d' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-color: #fafcfb;
  padding-right: 34px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green);
  background: white;
  box-shadow: 0 0 0 3px rgba(45,122,79,.1);
}

textarea { resize: vertical; min-height: 80px; }

.photo-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--r);
  padding: 18px;
  text-align: center;
  cursor: pointer;
  font-size: 0.87rem;
  color: var(--text-muted);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.photo-upload-area:hover {
  border-color: var(--green);
  background: var(--green-lt);
  color: var(--green);
}


/* ════════════════════════════════════════════
   STATUS / NOTICE BOXES
════════════════════════════════════════════ */
.status-box {
  margin-top: 14px;
  padding: 12px 15px;
  border-radius: var(--r);
  font-size: 0.87rem;
  font-weight: 500;
  line-height: 1.5;
}
.status-box.info    { background: var(--blue-lt); color: var(--blue);   border-left: 3px solid var(--blue); }
.status-box.success { background: var(--green-lt); color: var(--green-dk); border-left: 3px solid var(--green); }

.notice-bar {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: var(--r);
  padding: 10px 16px;
  font-size: 0.82rem;
  color: #5d4037;
  line-height: 1.5;
  margin-bottom: 16px;
}


/* ════════════════════════════════════════════
   TAGS / BADGES
════════════════════════════════════════════ */
.tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.tag-sighting { background: #fff8e1;        color: #b45309; }
.tag-safety   { background: var(--red-lt);  color: var(--red); }
.tag-lost-pet { background: #f3e5f5;        color: #7b1fa2; }
.tag-question { background: var(--blue-lt); color: var(--blue); }
.tag-tip      { background: var(--green-lt);color: var(--green-dk); }
.tag-general  { background: #f0f0f0;        color: #424242; }
.tag-loc      { background: #ecf0f1;        color: #546e7a; }
.tag-low      { background: var(--green-lt);color: var(--green-dk); }
.tag-medium   { background: var(--amber-lt);color: var(--amber); }
.tag-high     { background: var(--red-lt);  color: var(--red); }


/* ════════════════════════════════════════════
   COMMUNITY FEED  (Reddit-style)
════════════════════════════════════════════ */
#community-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  display: flex;
  transition: box-shadow 0.14s, border-color 0.14s;
}
.post-card:hover { box-shadow: var(--sh); border-color: #c5d5cb; }

/* Vote strip */
.post-vote {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  background: #f7faf8;
  border-right: 1px solid var(--border-lt);
  gap: 3px;
  min-width: 48px;
}

.vote-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
  padding: 4px 6px;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.13s, background 0.13s;
}
.vote-btn:hover { color: var(--green); background: var(--green-lt); }
.vote-btn.voted { color: var(--green); }

.vote-count {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-mid);
  min-width: 20px;
  text-align: center;
}

/* Post content */
.post-content { flex: 1; min-width: 0; }

.post-main { padding: 13px 16px 10px; }

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 7px;
  align-items: center;
}

.post-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 6px;
  word-break: break-word;
}

.post-body {
  font-size: 0.86rem;
  color: var(--text-mid);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 10px;
}

.post-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px solid var(--border-lt);
}

.post-action-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 5px;
  transition: background 0.12s, color 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.post-action-btn:hover { background: var(--bg); color: var(--text); }

.post-time {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-left: auto;
}


/* ════════════════════════════════════════════
   COMMENTS
════════════════════════════════════════════ */
.comments-section {
  border-top: 1px solid var(--border-lt);
  padding: 12px 16px 16px;
  background: #f9fbf9;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 12px;
}

.comment-item {
  padding: 8px 10px 8px 12px;
  border-left: 2.5px solid var(--border);
  border-radius: 0 var(--r) var(--r) 0;
}

.comment-text {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.comment-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.comment-input {
  flex: 1;
  padding: 8px 11px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  font-family: inherit;
  font-size: 0.85rem;
  resize: none;
  min-height: 36px;
  max-height: 100px;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: white;
  color: var(--text);
}
.comment-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45,122,79,.1);
}

.btn-post-comment {
  background: var(--green);
  color: white;
  border: none;
  border-radius: var(--r);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 13px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.14s;
}
.btn-post-comment:hover  { background: var(--green-dk); }
.btn-post-comment:active { transform: scale(0.96); }


/* ════════════════════════════════════════════
   SAFETY GUIDE GRID
════════════════════════════════════════════ */
.safety-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

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

.safety-icon { font-size: 1.7rem; line-height: 1; }

.safety-card h3 {
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--text);
}

.safety-card p {
  font-size: 0.84rem;
  color: var(--text-mid);
  line-height: 1.6;
}


/* ════════════════════════════════════════════
   ABOUT — CONTACTS
════════════════════════════════════════════ */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 6px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.contact-icon {
  font-size: 1.4rem;
  width: 38px;
  text-align: center;
  flex-shrink: 0;
}

.contact-item strong {
  display: block;
  font-size: 0.87rem;
  color: var(--text);
}

.contact-item span {
  font-size: 0.87rem;
  color: var(--text-mid);
}


/* ════════════════════════════════════════════
   LOGIN MODAL
════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.38);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}

.modal-card {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 32px 28px;
  width: 100%;
  max-width: 370px;
  box-shadow: var(--sh-lg);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: 4px;
}
.modal-close:hover { color: var(--text); background: var(--bg); }

.modal-card h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.modal-sub {
  font-size: 0.84rem;
  color: var(--text-mid);
}

.modal-footer {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 16px;
}
.modal-footer a { color: var(--green); font-weight: 600; text-decoration: none; }
.modal-footer a:hover { text-decoration: underline; }


/* ════════════════════════════════════════════
   LEAFLET POPUP OVERRIDES
════════════════════════════════════════════ */
.leaflet-popup-content-wrapper {
  border-radius: var(--r-lg) !important;
  box-shadow: var(--sh-lg) !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid var(--border) !important;
}

.leaflet-popup-content { margin: 0 !important; width: 238px !important; }
.leaflet-popup-tip { background: white !important; }

.map-popup-bar { height: 4px; }
.map-popup-bar.low    { background: var(--green); }
.map-popup-bar.medium { background: var(--amber); }
.map-popup-bar.high   { background: var(--red); }

.map-popup { padding: 13px 15px 14px; }

.map-popup-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.map-popup-row {
  font-size: 0.79rem;
  color: var(--text-mid);
  line-height: 1.7;
}

.map-popup-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-lt);
}


/* ════════════════════════════════════════════
   UTILITY
════════════════════════════════════════════ */
.hidden { display: none !important; }
.muted  { color: var(--text-muted); font-size: 0.84rem; }


/* ════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════ */
@media (max-width: 820px) {
  .ca-nav     { display: none; }
  .ca-hamburger { display: flex; align-items: center; justify-content: center; }
  .ca-btn-login { display: none; }
}

@media (max-width: 600px) {
  .map-info-card {
    top: 12px;
    left: 12px;
    right: 12px;
    width: auto;
  }

  .map-filters {
    top: auto;
    bottom: 52px;
    right: 0; left: 0;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 12px 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .map-filters::-webkit-scrollbar { display: none; }

  .form-row { grid-template-columns: 1fr; }

  .ca-content-wrap { padding: 20px 14px 72px; }

  .safety-grid { grid-template-columns: 1fr; }

  .ca-page-header-row { flex-direction: column; align-items: flex-start; }

  .comment-input-row { flex-direction: column; }
  .btn-post-comment  { width: 100%; }
}

@media (max-width: 380px) {
  .ca-brand { font-size: 0.9rem; }
  .ca-btn-report { font-size: 0.78rem; padding: 6px 12px; }
}
