/* WeAD Corridor Alerts — Monica-style right-edge bar → expands to pill */
:root {
  --wead-ca-bg: rgba(8, 18, 32, 0.94);
  --wead-ca-border: rgba(61, 187, 255, 0.35);
  --wead-ca-accent: #3dbbff;
  --wead-ca-green: #00ff88;
  --wead-ca-text: #e8f4ff;
  --wead-ca-muted: rgba(232, 244, 255, 0.65);
}

/* Top of the 3 stacked edge bars */
#wead-alerts-bell {
  position: fixed;
  top: 160px;
  right: 0;
  z-index: 9400;
  width: 30px;
  height: 78px;
  padding: 0;
  margin: 0;
  border-radius: 12px 0 0 12px;
  border: 1px solid var(--wead-ca-border);
  border-right: none;
  background: var(--wead-ca-bg);
  color: var(--wead-ca-text);
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: -4px 4px 18px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-size: 14px;
  transition: width 0.22s ease, height 0.22s ease, padding 0.22s ease,
    border-radius 0.22s ease, gap 0.22s ease;
  overflow: visible;
}

#wead-alerts-bell .wead-bar-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.12em;
  color: var(--wead-ca-accent);
  font: 700 11px/1.1 Inter, system-ui, sans-serif;
}

#wead-alerts-bell .fa-bell,
#wead-alerts-bell .wead-ca-pill-text {
  display: none;
}

#wead-alerts-bell .badge {
  position: absolute;
  top: 6px;
  left: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ff5a5a;
  color: #fff;
  font: 700 9px/16px Inter, system-ui, sans-serif;
  text-align: center;
  z-index: 1;
}

#wead-alerts-bell.is-expanded {
  width: auto;
  height: 40px;
  padding: 0 14px 0 12px;
  gap: 8px;
  border-radius: 999px 0 0 999px;
}

#wead-alerts-bell.is-expanded .wead-bar-label {
  display: none;
}

#wead-alerts-bell.is-expanded .fa-bell,
#wead-alerts-bell.is-expanded .wead-ca-pill-text {
  display: inline;
}

#wead-alerts-bell.is-expanded .badge {
  position: static;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  font-size: 10px;
}

#wead-alerts-bell .wead-ca-pill-text {
  font: 600 12px/1 Inter, system-ui, sans-serif;
  color: var(--wead-ca-text);
}

#wead-alerts-bell:hover {
  border-color: rgba(61, 187, 255, 0.6);
}

#wead-alerts-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9450;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#wead-alerts-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

#wead-alerts-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(400px, 100vw);
  height: 100vh;
  z-index: 9500;
  background: linear-gradient(165deg, #07111f 0%, #0a1a2e 55%, #071420 100%);
  border-left: 1px solid var(--wead-ca-border);
  color: var(--wead-ca-text);
  transform: translateX(105%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
}

#wead-alerts-drawer.open {
  transform: translateX(0);
}

.wead-ca-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(61, 187, 255, 0.14);
}

.wead-ca-head h2 {
  margin: 0;
  font: 700 16px/1.3 Inter, system-ui, sans-serif;
}

.wead-ca-head p {
  margin: 4px 0 0;
  color: var(--wead-ca-muted);
  font: 400 12px/1.4 Inter, system-ui, sans-serif;
}

.wead-ca-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--wead-ca-text);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.wead-ca-list {
  overflow-y: auto;
  padding: 12px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wead-ca-item {
  border: 1px solid rgba(61, 187, 255, 0.18);
  background: rgba(10, 22, 40, 0.65);
  border-radius: 12px;
  padding: 12px;
}

.wead-ca-item .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wead-ca-item .title {
  font: 600 13px/1.35 Inter, system-ui, sans-serif;
}

.wead-ca-sev {
  font: 700 10px/1 Inter, system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 7px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.wead-ca-sev.critical {
  color: #ff8a8a;
  border-color: rgba(255, 90, 90, 0.45);
  background: rgba(255, 90, 90, 0.12);
}

.wead-ca-sev.high {
  color: #ffc857;
  border-color: rgba(255, 200, 87, 0.4);
  background: rgba(255, 200, 87, 0.1);
}

.wead-ca-sev.medium {
  color: var(--wead-ca-accent);
  border-color: rgba(61, 187, 255, 0.4);
  background: rgba(61, 187, 255, 0.1);
}

.wead-ca-sev.low {
  color: var(--wead-ca-muted);
  border-color: rgba(255, 255, 255, 0.15);
}

.wead-ca-item .meta {
  margin-top: 6px;
  color: var(--wead-ca-muted);
  font: 400 11px/1.4 Inter, system-ui, sans-serif;
}

.wead-ca-item .summary {
  margin-top: 8px;
  color: var(--wead-ca-text);
  font: 400 12px/1.45 Inter, system-ui, sans-serif;
  opacity: 0.9;
}

.wead-ca-item a.ask {
  display: inline-block;
  margin-top: 10px;
  color: var(--wead-ca-green);
  font: 600 12px/1.2 Inter, system-ui, sans-serif;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 255, 136, 0.35);
}

.wead-ca-empty {
  color: var(--wead-ca-muted);
  font: 400 13px/1.4 Inter, system-ui, sans-serif;
  padding: 24px 8px;
  text-align: center;
}

@media (max-width: 720px) {
  #wead-alerts-bell {
    top: auto !important;
    bottom: 260px !important;
    right: 0 !important;
    width: 28px;
    height: 56px;
    border-radius: 10px 0 0 10px;
  }

  #wead-alerts-bell .wead-bar-label {
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  #wead-alerts-bell .badge {
    top: 4px;
    left: 2px;
    min-width: 14px;
    height: 14px;
    line-height: 14px;
    font-size: 8px;
  }

  #wead-alerts-bell.is-expanded {
    width: auto;
    max-width: calc(100% - 12px);
    height: 38px;
    padding: 0 12px;
    border-radius: 999px 0 0 999px;
  }

  #wead-alerts-bell.is-expanded .badge {
    position: static;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    font-size: 10px;
  }

  #wead-alerts-drawer {
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    max-width: none !important;
    height: min(78vh, 640px) !important;
    border-left: none;
    border-top: 1px solid var(--wead-ca-border);
    border-radius: 16px 16px 0 0;
    transform: translate3d(0, 105%, 0);
  }

  #wead-alerts-drawer.open {
    transform: translate3d(0, 0, 0);
  }
}
