/* =============================================================
   NEOHAWK THREAT MAP — STYLES
   Loaded by:
     • index.html       (renders the mini teaser only)
     • threat-map.html  (renders the full widget)
   Variables (--blue, --pink, --bg0 etc.) come from style.css
   ============================================================= */


/* ── MINI TEASER (index.html) ─────────────────────────────── */

.tm-mini-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 2rem;
}

/* live-dot for the kicker badge in the section header */
.tm-mini-kicker-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--pink, #ff1a6c);
  box-shadow: 0 0 10px var(--pink, #ff1a6c);
  margin-right: 0.5rem;
  vertical-align: middle;
  animation: tmPulse 1.6s ease-in-out infinite;
}
@keyframes tmPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.7); }
}

.tm-mini-link {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}

.tm-mini {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  height: 360px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 14px;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(28,28,30,0.6), rgba(19,19,21,0.6));
  border: 1px solid rgba(0, 207, 255, 0.18);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.4),
    0 30px 80px -20px rgba(0,207,255,0.08),
    inset 0 1px 0 rgba(255,255,255,0.03);
  cursor: pointer;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.tm-mini-link:hover .tm-mini {
  border-color: rgba(0, 207, 255, 0.5);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.4),
    0 35px 90px -20px rgba(0,207,255,0.18),
    inset 0 1px 0 rgba(255,255,255,0.03);
}

.tm-mini-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  display: block;
}

/* CTA pill anchored bottom-centre */
.tm-mini-cta-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(180deg, transparent 0%, rgba(19,19,21,0.85) 90%);
  pointer-events: none;
}

.tm-mini-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white, #f0f0f0);
  padding: 0.8rem 1.6rem;
  border: 1px solid var(--blue, #00cfff);
  border-radius: 999px;
  background: rgba(19,19,21,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s, color 0.2s;
}
.tm-mini-link:hover .tm-mini-cta {
  background: var(--blue, #00cfff);
  color: var(--bg0, #131315);
}
.tm-mini-cta .arr { transition: transform 0.2s; }
.tm-mini-link:hover .tm-mini-cta .arr { transform: translateX(4px); }

/* status badge top-right */
.tm-mini-badge {
  position: absolute;
  top: 1rem; right: 1rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  background: rgba(0, 207, 255, 0.12);
  border: 1px solid rgba(0, 207, 255, 0.4);
  color: var(--blue, #00cfff);
}
.tm-mini-badge.demo {
  background: rgba(255, 26, 108, 0.12);
  border-color: rgba(255, 26, 108, 0.4);
  color: var(--pink, #ff1a6c);
}
.tm-mini-badge-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--blue, #00cfff);
  box-shadow: 0 0 6px var(--blue, #00cfff);
}
.tm-mini-badge.demo .tm-mini-badge-dot {
  background: var(--pink, #ff1a6c);
  box-shadow: 0 0 6px var(--pink, #ff1a6c);
}

@media (max-width: 600px) {
  .tm-mini { height: 280px; }
  .tm-mini-cta { font-size: 0.7rem; padding: 0.65rem 1.2rem; }
}


/* ── FULL WIDGET (threat-map.html) ────────────────────────── */

.threat-map-section {
  position: relative;
  padding: 110px 0 70px;
  background: var(--bg0, #131315);
  overflow: hidden;
}

.threat-map-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,207,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,207,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

.threat-map-container {
  position: relative; z-index: 1;
  max-width: 1280px; margin: 0 auto; padding: 0 2rem;
}

.threat-map-head { text-align: center; margin-bottom: 2.5rem; }

.threat-map-kicker {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.45rem 1rem;
  background: rgba(0,207,255,0.06);
  border: 1px solid rgba(0,207,255,0.25);
  border-radius: 999px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.2em;
  color: var(--blue, #00cfff); margin-bottom: 1.4rem;
}

.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--pink, #ff1a6c);
  box-shadow: 0 0 12px var(--pink, #ff1a6c);
  animation: livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.7); }
}

.threat-map-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  color: var(--white, #f0f0f0);
  margin: 0 0 1rem;
  line-height: 1.05;
}
.threat-map-title .pink { color: var(--pink, #ff1a6c); }

.threat-map-sub {
  max-width: 640px; margin: 0 auto;
  color: var(--muted, #888); font-size: 1rem; line-height: 1.7;
}

.threat-map-frame {
  position: relative;
  background: linear-gradient(180deg, rgba(28,28,30,0.6), rgba(19,19,21,0.6));
  border: 1px solid rgba(0,207,255,0.18);
  border-radius: 14px;
  overflow: hidden;
  height: 600px;
  display: flex;
  flex-direction: row;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.4),
    0 30px 80px -20px rgba(0,207,255,0.08),
    inset 0 1px 0 rgba(255,255,255,0.03);
}

/* LEFT — stats column */
.threat-stats-col {
  flex: 0 0 220px;
  height: 100%;
  background: rgba(15,15,17,0.7);
  border-right: 1px solid rgba(0,207,255,0.18);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
}

/* CENTER — map fills the rest */
.threat-map-main {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
}

#threatMapCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* status badge sits at top of stats column now */
.status-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  pointer-events: none;
  transition: background 0.4s, border-color 0.4s, color 0.4s;
  margin-bottom: 0.25rem;
}
.status-badge.live  { background: rgba(0,207,255,0.12); border: 1px solid rgba(0,207,255,0.4); color: var(--blue, #00cfff); }
.status-badge.live  .status-badge-dot { background: var(--blue, #00cfff); box-shadow: 0 0 6px var(--blue, #00cfff); }
.status-badge.demo  { background: rgba(255,26,108,0.12); border: 1px solid rgba(255,26,108,0.4); color: var(--pink, #ff1a6c); }
.status-badge.demo  .status-badge-dot { background: var(--pink, #ff1a6c); box-shadow: 0 0 6px var(--pink, #ff1a6c); }
.status-badge-dot   { width: 6px; height: 6px; border-radius: 50%; }

/* stat cards */
.stat-card {
  background: rgba(28,28,30,0.6);
  border: 1px solid rgba(0,207,255,0.18);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
}
.stat-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem; font-weight: 600; letter-spacing: 0.18em;
  color: var(--muted, #888); text-transform: uppercase; margin-bottom: 0.4rem;
}
.stat-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.6rem; font-weight: 800; color: var(--blue, #00cfff);
  line-height: 1; font-variant-numeric: tabular-nums;
}
.stat-value.pink-text { color: var(--pink, #ff1a6c); }
.stat-meta { font-size: 0.66rem; color: var(--dim, #444); margin-top: 0.35rem; letter-spacing: 0.05em; }

.stat-legend-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.2rem;
}
.stat-legend-list .legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: var(--white, #f0f0f0);
  letter-spacing: 0.04em;
}
.stat-legend-list .ldot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.stat-legend-list .ldot.blue  { background: var(--blue, #00cfff); box-shadow: 0 0 7px var(--blue, #00cfff); }
.stat-legend-list .ldot.pink  { background: var(--pink, #ff1a6c); box-shadow: 0 0 7px var(--pink, #ff1a6c); }
.stat-legend-list .ldot.white { background: #f0f0f0; box-shadow: 0 0 7px #f0f0f0; }

/* RIGHT — vertical feed sidebar (fixed size, no overflow) */
.threat-feed-col {
  flex: 0 0 260px;
  height: 100%;
  background: rgba(15,15,17,0.7);
  border-left: 1px solid rgba(0,207,255,0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.threat-feed-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(0,207,255,0.15);
  background: rgba(10,10,12,0.55);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--blue, #00cfff);
}
.feed-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--pink, #ff1a6c);
  box-shadow: 0 0 8px var(--pink, #ff1a6c);
  animation: livePulse 1.4s ease-in-out infinite;
}
.feed-count {
  margin-left: auto;
  background: rgba(0,207,255,0.12);
  color: var(--blue, #00cfff);
  padding: 1px 6px; border-radius: 3px;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
}
.threat-feed-body {
  flex: 1;
  overflow: hidden;
  position: relative;
  min-height: 0;
}

.feed-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-family: 'DM Sans', sans-serif;
  color: var(--white, #f0f0f0);
  overflow: hidden;
  animation: feedSlideDown 0.35s cubic-bezier(0.34, 1.2, 0.5, 1) both;
}
.feed-item.leaving {
  animation: feedSlideOut 0.25s ease-in forwards;
}
@keyframes feedSlideDown {
  from { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; }
  to   { opacity: 1; max-height: 70px; padding-top: 8px; padding-bottom: 8px; }
}
@keyframes feedSlideOut {
  to { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; border: 0; }
}
.feed-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}
.feed-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.feed-blue  .feed-dot { background: var(--blue, #00cfff); box-shadow: 0 0 6px var(--blue, #00cfff); }
.feed-pink  .feed-dot { background: var(--pink, #ff1a6c); box-shadow: 0 0 6px var(--pink, #ff1a6c); }
.feed-white .feed-dot { background: #f0f0f0; box-shadow: 0 0 6px #f0f0f0; }
.feed-time {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  color: var(--muted, #888);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}
.feed-type {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.feed-blue  .feed-type { color: rgba(0,207,255,0.8); }
.feed-pink  .feed-type { color: rgba(255,26,108,0.8); }
.feed-white .feed-type { color: rgba(240,240,240,0.7); }
.feed-sev {
  margin-left: auto;
  background: rgba(255,26,108,0.18);
  color: var(--pink, #ff1a6c);
  padding: 1px 5px; border-radius: 3px;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.feed-route {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feed-from, .feed-to { color: var(--blue, #00cfff); }
.feed-from.au, .feed-to.au { color: var(--pink, #ff1a6c); }
.feed-arr { color: var(--dim, #444); font-size: 0.7rem; }

/* BELOW — top sources strip */
.threat-bottom-strip {
  margin-top: 1rem;
  border: 1px solid rgba(0,207,255,0.18);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(15,15,17,0.7);
}
.threat-tt {
  display: flex;
  align-items: center;
  height: 42px;
}
.tt-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.65rem; font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--bg0, #131315);
  background: var(--blue, #00cfff);
  padding: 0 1rem; height: 100%;
  display: flex; align-items: center;
  flex-shrink: 0;
}
.tt-list { display: flex; flex: 1; overflow: hidden; padding: 0 1rem; gap: 1.5rem; }
.tt-item {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.74rem;
  color: var(--white, #f0f0f0);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.tt-rank {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--dim, #444);
  background: rgba(255,255,255,0.05);
  padding: 1px 6px;
  border-radius: 3px;
  min-width: 20px; text-align: center;
}
.tt-item.gold   .tt-rank { color: #ffd700; background: rgba(255,215,0,0.1); }
.tt-item.silver .tt-rank { color: #c0c0c0; background: rgba(192,192,192,0.1); }
.tt-item.bronze .tt-rank { color: #cd7f32; background: rgba(205,127,50,0.1); }
.tt-city {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tt-city.au { color: var(--pink, #ff1a6c); }
.tt-count {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--blue, #00cfff);
  font-variant-numeric: tabular-nums;
  transition: color 0.3s, transform 0.2s;
}
.tt-count.bumped { color: #fff; transform: scale(1.15); }

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.7); }
}

.threat-map-disclaimer {
  margin-top: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.disclaimer-text {
  font-size: 0.7rem;
  color: var(--dim, #444);
  letter-spacing: 0.04em;
  line-height: 1.7;
  max-width: 720px;
}
.disclaimer-text code {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.66rem;
  color: rgba(0, 207, 255, 0.7);
  background: rgba(0, 207, 255, 0.06);
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0;
}
.disclaimer-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue, #00cfff);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(0, 207, 255, 0.3);
  border-radius: 999px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.disclaimer-cta:hover {
  background: rgba(0, 207, 255, 0.08);
  border-color: rgba(0, 207, 255, 0.6);
  color: var(--white, #f0f0f0);
}

@media (max-width: 1100px) {
  .threat-stats-col { flex-basis: 200px; padding: 0.85rem; }
  .threat-feed-col  { flex-basis: 230px; }
  .stat-value { font-size: 1.4rem; }
}
@media (max-width: 900px) {
  .threat-map-section { padding: 70px 0 40px; }
  .threat-map-container { padding: 0 1rem; }
  .threat-map-title { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  .threat-map-sub { font-size: 0.9rem; padding: 0 0.5rem; }
  .threat-map-frame { flex-direction: column; height: auto; }
  .threat-stats-col {
    flex: 0 0 auto;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid rgba(0,207,255,0.18);
    padding: 0.6rem;
    gap: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }
  .threat-stats-col .status-badge { display: none; }
  .stat-card { min-width: 130px; flex-shrink: 0; padding: 0.55rem 0.7rem; }
  .stat-value { font-size: 1.15rem; }
  .stat-meta, .stat-label { font-size: 0.55rem; }
  .stat-legend-list .legend-item { font-size: 0.62rem; }
  .threat-map-main { height: 360px; }

  /* Mobile feed: simple inline-block ticker, no flex weirdness */
  .threat-feed-col {
    flex: 0 0 auto;
    height: 38px;
    width: 100%;
    border-left: 0;
    border-top: 1px solid rgba(0,207,255,0.18);
    display: flex !important;
    flex-direction: row !important;
    overflow: hidden !important;
  }
  .threat-feed-head {
    flex: 0 0 auto;
    border-bottom: 0;
    border-right: 1px solid rgba(0,207,255,0.2);
    background: rgba(0,207,255,0.08);
    color: var(--blue, #00cfff);
    padding: 0 0.85rem;
    height: 100%;
    font-size: 0.58rem;
    letter-spacing: 0.2em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
  }
  .threat-feed-head .feed-count { display: none; }
  .threat-feed-body {
    flex: 1 1 auto;
    display: block !important;
    height: 100% !important;
    line-height: 38px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    min-width: 0 !important;
    mask-image: linear-gradient(to right, black calc(100% - 40px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 40px), transparent 100%);
  }
  .threat-feed-body .feed-item {
    display: inline-block !important;
    height: 100% !important;
    line-height: 38px !important;
    padding: 0 14px !important;
    margin: 0 !important;
    border: 0 !important;
    border-right: 1px solid rgba(255,255,255,0.06) !important;
    max-height: none !important;
    max-width: none !important;
    white-space: nowrap !important;
    vertical-align: top !important;
    animation: mobileFadeIn 0.4s ease-out both !important;
  }
  .threat-feed-body .feed-item.leaving {
    animation: mobileFadeOut 0.25s ease-in forwards !important;
  }
  @keyframes mobileFadeIn  { from { opacity: 0; } to { opacity: 1; } }
  @keyframes mobileFadeOut { to { opacity: 0; } }

  .threat-feed-body .feed-meta,
  .threat-feed-body .feed-route {
    display: inline !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
  }
  .threat-feed-body .feed-meta { padding-right: 6px !important; }
  .threat-feed-body .feed-meta > *,
  .threat-feed-body .feed-route > * {
    display: inline-block !important;
    vertical-align: middle !important;
    margin-right: 4px !important;
  }
  .threat-feed-body .feed-dot {
    width: 5px !important; height: 5px !important;
    border-radius: 50%;
  }
  .threat-feed-body .feed-time { font-size: 0.55rem !important; }
  .threat-feed-body .feed-type { font-size: 0.52rem !important; }
  .threat-feed-body .feed-sev  { font-size: 0.5rem !important; padding: 1px 4px !important; border-radius: 3px; }
  .threat-feed-body .feed-route { font-size: 0.7rem !important; }

  .threat-tt { height: 36px; }
  .tt-label { font-size: 0.55rem; padding: 0 0.7rem; }
  .tt-item { font-size: 0.66rem; }
  .threat-map-disclaimer { padding: 0 1rem; }
  .disclaimer-text { font-size: 0.65rem; }

  /* mini */
  .tm-mini { height: 300px; }
  .tm-mini-cta { font-size: 0.7rem; padding: 0.65rem 1.2rem; letter-spacing: 0.12em; }
}
@media (max-width: 600px) {
  .threat-map-section { padding: 50px 0 30px; }
  .threat-map-container { padding: 0 0.75rem; }
  .threat-map-title { font-size: clamp(1.4rem, 7vw, 2rem); }
  .threat-map-kicker { font-size: 0.6rem; letter-spacing: 0.15em; }
  .threat-map-main { height: 320px; }
  .threat-feed-col { height: 38px; }
  .threat-feed-head { font-size: 0.52rem; padding: 0 0.7rem; }
  .stat-card { min-width: 110px; }

  /* mini */
  .tm-mini { height: 240px; border-radius: 10px; }
  .tm-mini-cta { font-size: 0.62rem; padding: 0.55rem 1rem; letter-spacing: 0.1em; }
  .tm-mini-cta-overlay { padding: 1rem; }
  .tm-mini-badge { font-size: 0.5rem; padding: 0.25rem 0.5rem; }
}