/* ============================================================
   main.css — צבע שחור | עיצוב אתר מקיף
   ============================================================ */

@font-face {
  font-family: fontx;
  src: url(../fonts/regular.otf);
}
@font-face {
  font-family: fontx;
  src: url(../fonts/bold.otf);
  font-weight: 700;
}

/* ===== משתנים ===== */
:root {
  --primary:         #ffd500;
  --on-primary:      #1f1c00;
  --bg:              #0f0f13;
  --surface:         #16171c;
  --surface-1:       #1c1d24;
  --surface-2:       #22232c;
  --surface-3:       #292a35;
  --on-surface:      #e8e8ee;
  --on-surface-var:  #9a9caa;
  --outline:         rgba(255,255,255,0.08);
  --outline-strong:  rgba(255,255,255,0.16);
  --danger:          #ff7c6b;
  --ok:              #4ade80;
  --radius-l:        20px;
  --radius-m:        16px;
  --radius-s:        12px;
}

/* ===== Reset בסיסי ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: fontx, "Segoe UI", "Heebo", sans-serif;
  background: var(--bg);
  color: var(--on-surface);
  direction: rtl;
  width: 100%;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== Alert modal — body class ===== */
body.event-ended { animation: endedFlash 1.1s ease-in-out infinite; }
@keyframes endedFlash {
  0%,100% { background: var(--bg); }
  50%      { background: #2a2b38; }
}

a { color: var(--primary); text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select { font-family: inherit; }

/* ============================================================
   HEADER
   ============================================================ */
#siteHeader {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(15,15,19,0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--outline);
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-logo {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  flex-shrink: 0;
}

.header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--on-surface);
  line-height: 1.2;
}
.header-sub {
  font-size: 11px;
  color: var(--on-surface-var);
  margin-top: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* כפתור חיבור */
.conn-wrap { position: relative; }

.conn-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--outline-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--on-surface-var);
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.15s;
}
.conn-btn:hover { background: var(--surface-3); }
.conn-btn.ok   #connText { color: var(--ok); }
.conn-btn.down #connText { color: var(--danger); }

#connText { font-size: 12.5px; }

.conn-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--on-surface-var);
  flex-shrink: 0;
  transition: background 0.2s;
}
.conn-dot.ok   { background: var(--ok);     box-shadow: 0 0 0 3px rgba(74,222,128,.18); }
.conn-dot.down { background: var(--danger); box-shadow: 0 0 0 3px rgba(255,124,107,.18); }

.conn-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  background: var(--surface-3);
  border: 1px solid var(--outline);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.conn-popover[hidden] { display: none; }
.conn-popover .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* כפתור הגדרות */
.header-settings-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 13px;
  font-weight: 700;
  transition: filter 0.15s;
}
.header-settings-btn:hover { filter: brightness(1.08); }

/* ===== Shell (מוסתר) ===== */
#app { display: none; }

/* ============================================================
   MAIN LAYOUT — מפה + היסטוריה
   ============================================================ */
#historyScreen { display: block; }

.main-layout {
  display: flex;
  height: calc(100vh - 66px);
  overflow: hidden;
}

/* ===== מפה חיה ===== */
#liveMapPanel {
  flex: 1 1 auto;
  position: relative;
  min-width: 0;
  min-height: 300px;
}

/* position:absolute מבטיח שהמפה תמלא את האב גם אם height:100% לא עובד */
#liveMapContainer {
  position: absolute;
  inset: 0;
  background: var(--surface);
}

/* סטטוס מפה */
.map-status {
  position: absolute;
  bottom: 20px;
  right: 50%;
  transform: translateX(50%);
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
  transition: background 0.3s;
}

.map-status.idle {
  background: rgba(22,23,28,0.88);
  color: var(--on-surface-var);
  backdrop-filter: blur(8px);
}
.map-status.active {
  background: var(--primary);
  color: var(--on-primary);
}

.map-status-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  background: currentColor;
  opacity: 0.7;
}
.map-status.active .map-status-dot {
  opacity: 1;
  animation: blink 1s infinite;
}
@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.2; }
}

/* ===== נעץ פעיל (מבהב) ===== */
.live-pin-wrap {
  position: relative;
  width: 40px; height: 40px;
}
.live-pin-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: pinPulse 1.6s ease-out infinite;
}
@keyframes pinPulse {
  0%   { transform: scale(0.6); opacity: 0.7; }
  100% { transform: scale(2.2); opacity: 0; }
}
.live-pin-core {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 3px solid #1a1a1f;
  box-shadow: 0 3px 10px rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
}
.live-pin-core svg { color: var(--on-primary); }

/* ===== פאנל היסטוריה ===== */
#feedPanel {
  width: 360px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--outline);
  overflow: hidden;
}

.active-banner {
  background: var(--primary);
  color: var(--on-primary);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  flex-shrink: 0;
  animation: bannerIn 0.3s ease;
}
.active-banner[hidden] { display: none; }
@keyframes bannerIn {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.feed-header {
  padding: 14px 16px 10px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--outline);
}
.feed-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--on-surface-var);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

#history {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px;
}

/* כרטיס היסטוריה */
.history_item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--outline);
  border-right: 4px solid transparent;
  border-radius: 0;
  padding: 12px 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.history_item:first-child { border-top: 1px solid var(--outline); }
.history_item:hover  { background: var(--surface-1); }
.history_item:active { background: var(--surface-2); }
.history_item:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

/* גבול צבעוני לפי סוג אירוע */
.history_item:has(.hi-icon[data-event="0"]) { border-right-color: var(--primary); }
.history_item:has(.hi-icon[data-event="2"]) { border-right-color: #5b9cf6; }
.history_item:has(.hi-icon[data-event="3"]) { border-right-color: #ff8c40; }

/* אייקון */
.hi-icon {
  flex: 0 0 44px;
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--on-surface-var);
}
.hi-icon[data-event="0"] { background: rgba(255,213,0,.12); color: var(--primary); }
.hi-icon[data-event="2"] { background: rgba(91,156,246,.12); color: #5b9cf6; }
.hi-icon[data-event="3"] { background: rgba(255,140,64,.12); color: #ff8c40; }

.hi-body  { flex: 1; min-width: 0; }
.hi-title { font-size: 15px; font-weight: 700; color: var(--on-surface); }
.hi-time  { font-size: 11.5px; color: var(--primary); margin-top: 3px; }
.hi-cities { font-size: 13.5px; color: var(--on-surface); margin-top: 4px; word-break: break-word; }
.hi-note  {
  font-size: 12.5px; color: var(--on-surface-var);
  margin-top: 5px; padding-right: 8px;
  border-right: 2px solid var(--outline-strong);
  line-height: 1.45;
}

.history_empty {
  text-align: center;
  color: var(--on-surface-var);
  font-size: 15px;
  padding: 80px 16px;
}

/* ============================================================
   SETTINGS OVERLAY
   ============================================================ */
.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.settings-overlay[hidden] { display: none; }
.settings-overlay:not([hidden]) {
  animation: settingsIn 0.22s ease;
}
@keyframes settingsIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.settings-inner {
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
  padding-bottom: 60px;
}

.settings-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15,15,19,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--outline);
}
.settings-title { font-size: 17px; font-weight: 700; }

.settings-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; }

/* כרטיס הגדרות */
.settings-card {
  background: var(--surface-1);
  border: 1px solid var(--outline);
  border-radius: var(--radius-m);
  padding: 18px 20px;
}

.card-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}
.card-sub {
  font-size: 13px;
  color: var(--on-surface-var);
  margin-bottom: 14px;
  line-height: 1.6;
}

.about-card { text-align: center; }
.about-logo { width: 54px; height: 54px; border-radius: 14px; display: block; margin: 0 auto 12px; }
.danger-btn { color: var(--danger) !important; }

/* ===== חיפוש ===== */
.search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 14px;
  background: var(--surface-2);
  border: 1.5px solid var(--outline-strong);
  border-radius: var(--radius-s);
  position: relative;
  transition: border-color 0.15s;
}
.search-row:focus-within { border-color: var(--primary); }
.search-icon { display: flex; color: var(--on-surface-var); flex-shrink: 0; }
#search {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--on-surface);
  font-size: 14.5px;
}
#search::placeholder { color: var(--on-surface-var); }

/* Autocomplete */
#autocomplete {
  position: absolute;
  top: calc(100% + 6px); right: 0; left: 0;
  z-index: 20;
  max-height: 240px;
  overflow-y: auto;
  background: var(--surface-3);
  border: 1px solid var(--outline);
  border-radius: var(--radius-s);
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  padding: 4px;
}
.ac-option {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%; text-align: right;
  background: transparent; border: none; border-radius: 10px;
  padding: 9px 12px; color: var(--on-surface); cursor: pointer;
}
.ac-option:hover, .ac-option.focused { background: rgba(255,255,255,0.06); }
.ac-city  { font-weight: 600; font-size: 14px; }
.ac-area  { font-size: 12px; color: var(--on-surface-var); }
.ac-area.is-area { color: var(--primary); font-weight: 600; font-size: 14px; }

/* Chips נבחרים */
#selected { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#selected .chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--outline);
  border-radius: 999px; padding: 5px 12px 5px 6px;
  font-size: 13px; color: var(--on-surface);
}
#selected .chip.is-area { color: var(--primary); }
#selected .chip-x {
  width: 20px; height: 20px; flex-shrink: 0;
  border: none; border-radius: 50%;
  background: var(--surface-3); color: var(--on-surface-var);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1;
}
#selected .chip-x:hover { background: var(--danger); color: #fff; }
#selected .empty { width: 100%; text-align: center; color: var(--on-surface-var); font-size: 13px; }

/* ===== Switch (M3) ===== */
.switch-row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 0; cursor: pointer;
}
.switch-text { flex: 1; min-width: 0; }
.switch-label { display: block; font-size: 14px; color: var(--on-surface); }
.switch-sub   { display: block; font-size: 12px; color: var(--on-surface-var); margin-top: 2px; line-height: 1.4; }
.switch { position: relative; width: 52px; height: 32px; flex-shrink: 0; }
.switch input { position: absolute; inset: 0; margin: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2; }
.switch .track {
  position: absolute; inset: 0; border-radius: 999px;
  background: var(--surface-3); border: 2px solid var(--outline-strong);
  transition: background 0.2s, border-color 0.2s;
}
.switch .thumb {
  position: absolute; top: 50%; right: 8px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--on-surface-var); transform: translateY(-50%);
  transition: right 0.2s, width 0.2s, height 0.2s, background 0.2s;
}
.switch input:checked + .track { background: var(--primary); border-color: var(--primary); }
.switch input:checked + .track .thumb { right: 24px; width: 24px; height: 24px; background: var(--on-primary); }

/* ===== Filter chips ===== */
.chip-set { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 34px; padding: 0 14px;
  border: 1px solid var(--outline-strong); border-radius: 10px;
  background: transparent; color: var(--on-surface);
  font-size: 13px; font-weight: 600;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.filter-chip:hover { background: rgba(255,255,255,0.06); }
.filter-chip .chip-check { width: 0; overflow: hidden; display: inline-flex; align-items: center; transition: width 0.15s; }
.filter-chip.selected { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.filter-chip.selected .chip-check { width: 16px; }

/* ===== Buttons ===== */
.icon-btn {
  width: 40px; height: 40px; flex-shrink: 0;
  border: none; border-radius: 50%; background: transparent;
  color: var(--on-surface-var); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: rgba(255,255,255,0.07); color: var(--on-surface); }

.text-btn {
  background: transparent; border: none;
  color: var(--primary); font-weight: 600; font-size: 13px;
  padding: 8px 12px; margin-top: 8px;
  border-radius: 999px; cursor: pointer;
  transition: background 0.15s;
}
.text-btn:hover { background: rgba(255,213,0,.1); }

.filled-btn {
  display: block; width: 100%; height: 46px;
  border: none; border-radius: 999px;
  background: var(--primary); color: var(--on-primary);
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: filter 0.12s, transform 0.1s;
}
.filled-btn:hover  { filter: brightness(1.06); }
.filled-btn:active { transform: scale(0.99); }

/* ===== Sound picker ===== */
.sound-picker { display: flex; align-items: center; gap: 8px; }
.sound-select {
  flex: 1; background: var(--surface-2); color: var(--on-surface);
  border: 1px solid var(--outline-strong); border-radius: var(--radius-s);
  padding: 10px 12px; font-size: 13.5px; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239a9caa' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 10px center; padding-left: 32px;
}
.sound-select:focus { outline: none; border-color: var(--primary); }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; background: transparent; }
::-webkit-scrollbar-thumb { border-radius: 8px; border: 2px solid transparent; background-clip: content-box; background-color: var(--surface-3); }

/* ============================================================
   ALERT MODAL
   ============================================================ */
#alertOverlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.72);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
#alertOverlay[hidden] { display: none; }

#alertCard {
  width: 520px; max-width: 100%;
  height: min(560px, 90vh);
  display: flex; flex-direction: column;
  background: var(--bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.7), 0 0 0 1px var(--outline-strong);
  animation: modalIn 0.26s cubic-bezier(0.34,1.1,0.64,1);
}
@keyframes modalIn {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* Header התרעה */
#alert-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px 10px;
  background: var(--surface); flex-shrink: 0;
}
#logo { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
#head-text { flex: 1; min-width: 0; }
#eventTitle { color: var(--primary); font-size: 18px; font-weight: 700; }
#locationText { margin-top: 3px; font-size: 14.5px; font-weight: 600; word-break: break-word; }

#closeAlert { color: var(--on-surface-var); flex-shrink: 0; }

/* הערה */
.alert-note {
  flex-shrink: 0; background: var(--surface-2);
  border-right: 3px solid var(--primary);
  padding: 9px 14px; margin: 0 16px 10px;
  border-radius: 12px; font-size: 13.5px; line-height: 1.5;
  max-height: 84px; overflow-y: auto;
}
.alert-note[hidden] { display: none; }

/* פס מרחק */
.distance-bar {
  flex-shrink: 0; background: var(--surface-2);
  border-right: 3px solid var(--primary);
  padding: 8px 14px; margin: 0 16px 10px;
  border-radius: 12px; font-size: 13px; font-weight: 600;
  text-align: center;
}
.distance-bar[hidden] { display: none; }

/* מפה */
#map { flex: 1 1 auto; min-height: 0; background: var(--surface); }

/* נעץ */
.bc-pin {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); border: 2px solid #1a1a1f;
  box-shadow: 0 3px 10px rgba(0,0,0,.45);
}
.bc-pin svg { transform: rotate(45deg); color: var(--on-primary); }
.bc-userpin {
  width: 18px; height: 18px; border-radius: 50%;
  background: #4c8dff; border: 3px solid #fff;
  box-shadow: 0 0 0 4px rgba(76,141,255,.35), 0 2px 6px rgba(0,0,0,.5);
}

/* כפתורי תחתית */
#menu-container { display: flex; gap: 8px; background: var(--surface-2); padding: 8px; flex-shrink: 0; }
.button {
  cursor: pointer; color: var(--on-surface); flex: 1; text-align: center;
  padding: 11px 10px; font-size: 14px; font-weight: 600;
  background: var(--surface-3); border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.button:hover  { background: var(--primary); color: var(--on-primary); }
.button.loading { pointer-events: none; opacity: 0.6; }

/* banner סיום */
.event-ended-banner {
  flex-shrink: 0; background: var(--surface-3); color: var(--on-surface);
  text-align: center; padding: 12px 16px;
  font-size: 16px; font-weight: 700;
  border-bottom: 2px solid var(--primary);
}
.event-ended-banner[hidden] { display: none; }

/* כיתוב מותג על המפה */
.map-brand-label {
  position: absolute;
  bottom: 28px;
  left: 12px;
  z-index: 400;
  background: rgba(15, 15, 19, 0.82);
  backdrop-filter: blur(6px);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 213, 0, 0.25);
  pointer-events: none;
  letter-spacing: 0.3px;
}

/* ===== Admin panel ===== */
#adminPanel {
  position: fixed;
  bottom: 56px;
  left: 16px;
  z-index: 900;
}
#adminCard {
  background: var(--surface-3);
  border: 1px solid var(--primary);
  border-radius: var(--radius-m);
  padding: 14px 18px;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.admin-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}
.admin-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--on-surface-var);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin: 8px 0 4px;
}
.admin-divider {
  height: 1px;
  background: var(--outline);
  margin: 10px 0 6px;
}
.admin-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--on-surface);
  padding: 3px 0;
}
.admin-row span:last-child {
  font-weight: 700;
  color: var(--primary);
  min-width: 32px;
  text-align: left;
}

/* footer */
#siteFooter {
  background: var(--surface);
  border-top: 1px solid var(--outline);
  padding: 12px 24px;
  text-align: center;
  font-size: 12.5px;
  color: var(--on-surface-var);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
#siteFooter a {
  color: var(--primary);
  text-decoration: none;
}
#siteFooter a:hover { text-decoration: underline; }
.footer-sep { opacity: 0.4; }

/* tooltip מפה */
.live-tooltip {
  background: var(--surface-3);
  border: 1px solid var(--outline);
  color: var(--on-surface);
  font-family: fontx, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
  padding: 5px 10px;
  white-space: nowrap;
}
.live-tooltip::before { display: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  #feedPanel { width: 300px; }
}

@media (max-width: 640px) {
  .header-inner  { padding: 0 16px; height: 58px; }
  .header-sub    { display: none; }
  .header-settings-btn span { display: none; }
  .header-settings-btn { padding: 0 12px; width: 36px; justify-content: center; }
  .settings-body { padding: 12px; }

  /* נייד: מפה למעלה, פאנל למטה */
  .main-layout   { flex-direction: column; height: auto; overflow: visible; }
  #liveMapPanel  { height: 45vh; }
  #feedPanel     { width: 100%; height: auto; border-right: none; border-top: 1px solid var(--outline); }
  #history       { max-height: 60vh; }

  #alertOverlay  { align-items: flex-end; padding: 0; }
  #alertCard     { border-radius: 20px 20px 0 0; width: 100%; }
}
