/* ── Push Notification Bell ──────────────────────────────────────────── */
.push-bell-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  min-height: auto;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  margin-left: auto;
  flex-shrink: 0;
}

.push-bell-btn:hover,
.push-bell-btn:focus-visible {
  background: rgba(255, 45, 45, 0.18);
  border-color: rgba(255, 45, 45, 0.35);
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ff2d2d;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  border-radius: 999px;
  min-width: 17px;
  height: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid #0b0b0b;
  animation: badge-pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badge-pop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

/* ── Notification Panel ──────────────────────────────────────────────── */
.push-notif-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100vw);
  background: #0b0b0b;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.6);
  z-index: 1500;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.push-notif-panel.open {
  transform: translateX(0);
}

.push-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(17, 17, 17, 0.98);
  flex-shrink: 0;
}

.push-notif-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
}

.pn-title-icon {
  font-size: 1.1rem;
}

.push-conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.4s;
}

.push-conn-dot.connected { background: #2ecc71; box-shadow: 0 0 6px rgba(46, 204, 113, 0.6); }
.push-conn-dot.reconnecting { background: #ffb020; box-shadow: 0 0 6px rgba(255, 176, 32, 0.6); animation: dot-blink 1s infinite; }
.push-conn-dot.disconnected { background: #555; }

@keyframes dot-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.push-notif-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pn-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted, #b3b3b3);
  font-size: 0.72rem;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  min-height: auto;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.pn-btn:hover {
  background: rgba(255, 45, 45, 0.15);
  color: #fff;
}

.pn-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  width: 32px;
  height: 32px;
  min-height: auto;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.pn-close:hover { background: rgba(255, 45, 45, 0.2); }

.push-notif-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.pn-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 220px;
  color: rgba(255,255,255,0.25);
  text-align: center;
  padding: 20px;
  font-size: 0.88rem;
}

.pn-empty-icon { font-size: 2.5rem; }

.pn-empty-sub {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.15);
  max-width: 220px;
}

/* ── Notification Items ──────────────────────────────────────────────── */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(17, 17, 17, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 12px 14px;
  transition: background 0.2s;
}

.notif-item.unread {
  background: rgba(30, 30, 30, 0.98);
  border-color: rgba(255, 255, 255, 0.12);
}

.notif-item.notif-type-panic,
.notif-item.notif-type-panic.unread {
  border-color: rgba(255, 59, 59, 0.4);
  background: rgba(40, 10, 10, 0.98);
}

.notif-item.notif-type-bolo.unread {
  border-color: rgba(255, 176, 32, 0.3);
}

.notif-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 3px;
  line-height: 1.35;
  word-break: break-word;
}

.notif-detail {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.45;
  word-break: break-word;
}

.notif-age {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
  margin-top: 5px;
}

.notif-badge-type {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 7px;
  border-radius: 999px;
  flex-shrink: 0;
  margin-top: 2px;
  white-space: nowrap;
}

.badge-bolo { background: rgba(255,176,32,0.18); color: #ffb020; border: 1px solid rgba(255,176,32,0.3); }
.badge-call-critical { background: rgba(255,59,59,0.2); color: #ff3b3b; border: 1px solid rgba(255,59,59,0.35); }
.badge-call-high { background: rgba(255,59,59,0.15); color: #ff6060; border: 1px solid rgba(255,59,59,0.25); }
.badge-call-medium { background: rgba(255,176,32,0.15); color: #ffb020; border: 1px solid rgba(255,176,32,0.25); }
.badge-call-low { background: rgba(46,204,113,0.15); color: #2ecc71; border: 1px solid rgba(46,204,113,0.25); }
.badge-dispatch { background: rgba(31,111,255,0.15); color: #5590ff; border: 1px solid rgba(31,111,255,0.25); }
.badge-cleared { background: rgba(46,204,113,0.15); color: #2ecc71; border: 1px solid rgba(46,204,113,0.25); }
.badge-officer { background: rgba(31,111,255,0.15); color: #5590ff; border: 1px solid rgba(31,111,255,0.25); }
.badge-panic { background: rgba(255,59,59,0.25); color: #ff3b3b; border: 1px solid rgba(255,59,59,0.45); }

/* ── Alert Banner ────────────────────────────────────────────────────── */
.push-alert-banner {
  position: fixed;
  top: 68px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  width: min(480px, calc(100vw - 24px));
  background: rgba(15, 15, 15, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 14px 16px;
  z-index: 1400;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  justify-content: space-between;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  backdrop-filter: blur(16px);
}

.push-alert-banner.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.push-alert-banner.leaving {
  opacity: 0;
  transform: translateX(-50%) translateY(-20px);
}

.push-alert-banner.push-alert-critical {
  border-color: rgba(255, 59, 59, 0.4);
  box-shadow: 0 12px 40px rgba(255, 0, 0, 0.25);
}

.push-alert-banner.push-alert-warning {
  border-color: rgba(255, 176, 32, 0.35);
}

.push-alert-banner.push-alert-info {
  border-color: rgba(31, 111, 255, 0.3);
}

.pab-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.pab-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.pab-text { min-width: 0; }

.pab-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3px;
  word-break: break-word;
}

.pab-detail {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.4;
  word-break: break-word;
}

.pab-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0 0 8px;
  min-height: auto;
  flex-shrink: 0;
  line-height: 1;
}

.pab-close:hover { color: #fff; }

/* ── Panic Overlay ───────────────────────────────────────────────────── */
.panic-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(100, 0, 0, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: panic-in 0.3s ease;
}

@keyframes panic-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.panic-pulse-ring {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,0,0,0.3) 0%, transparent 70%);
  animation: panic-pulse 1.2s infinite;
}

@keyframes panic-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.08); }
}

.panic-inner {
  position: relative;
  text-align: center;
  padding: 40px 32px;
  max-width: 340px;
}

.panic-skull {
  font-size: 4rem;
  animation: panic-shake 0.4s infinite;
  margin-bottom: 16px;
}

@keyframes panic-shake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-6deg); }
  75% { transform: rotate(6deg); }
}

.panic-title {
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
  text-shadow: 0 0 30px rgba(255,100,100,0.8);
}

.panic-callsign {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffdddd;
  margin-bottom: 8px;
}

.panic-location {
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 6px;
}

.panic-call-id {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 28px;
}

.panic-dismiss {
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.4);
  color: #fff;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  min-height: auto;
}

.panic-dismiss:hover { background: rgba(255,255,255,0.25); }

/* ── Connection status dot in panel ─────────────────────────────────── */
@media (max-width: 700px) {
  .push-notif-panel {
    width: 100vw;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .push-alert-banner {
    top: 60px;
    width: calc(100vw - 24px);
  }
}
