/* Cybersecop live threat globe — centred homepage section + full-screen modal.
   Scoped to .cso-threat-globe / .cso-tg-modal so it does not restyle the page. */

.cso-threat-globe:empty {
  display: none !important;
}

/* In-flow, centred block (front page and shortcode). Not a fixed corner widget. */
.cso-threat-globe {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 320px;
  margin: 18px auto 24px;
  padding: 0;
  z-index: 2;
  pointer-events: none;
  font: 12px/1.35 Tahoma, "Segoe UI", sans-serif;
  color: #e8eef8;
  -webkit-tap-highlight-color: transparent;
  scroll-margin-top: 80px;
  box-sizing: border-box;
}

.cso-threat-globe *,
.cso-threat-globe *::before,
.cso-threat-globe *::after { box-sizing: border-box; }

.cso-threat-globe .cso-tg-service,
.cso-threat-globe .cso-tg-tagline,
.cso-threat-globe .cso-tg-widget,
.cso-threat-globe .cso-tg-offer,
.cso-threat-globe .cso-tg-cta {
  pointer-events: auto;
}

.cso-tg-service {
  margin: 0 0 2px;
  padding: 0;
  font: 700 13px/1.3 Tahoma, "Segoe UI", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 4px #000, 0 0 8px rgba(0, 0, 0, 0.7);
}

.cso-tg-tagline {
  margin: 0 0 8px;
  padding: 0 6px;
  font: 700 15px/1.3 Tahoma, "Segoe UI", sans-serif;
  color: #f4fff0;
  text-align: center;
  text-shadow: 0 1px 4px #000, 0 0 8px rgba(0, 0, 0, 0.7);
}

.cso-threat-globe .cso-tg-widget {
  position: relative;
  display: block;
  width: 260px;
  height: 260px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  overflow: hidden;
  color: inherit;
  text-align: left;
  background:
    radial-gradient(circle at 50% 42%, #0a1a2c 0%, #050b14 62%, #020509 100%);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(80, 170, 255, 0.28),
    0 0 24px rgba(20, 90, 180, 0.18);
}

.cso-threat-globe .cso-tg-widget:focus {
  outline: none;
}
.cso-threat-globe .cso-tg-widget:focus-visible {
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.48),
    0 0 0 2px #041018,
    0 0 0 4px #5cc8ff;
}

.cso-threat-globe .cso-tg-stage-mini {
  position: absolute;
  inset: 0;
}
.cso-threat-globe .cso-tg-widget canvas,
.cso-tg-stage-mini canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.cso-tg-copy {
  position: static;
}

.cso-threat-globe .cso-tg-live,
.cso-threat-globe .cso-tg-count,
.cso-threat-globe .cso-tg-hint {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.cso-threat-globe .cso-tg-live {
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px 2px 6px;
  border-radius: 999px;
  background: rgba(4, 10, 18, 0.72);
  border: 1px solid rgba(255, 80, 70, 0.45);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

.cso-threat-globe .cso-tg-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e23d2f;
  box-shadow: 0 0 6px #e23d2f;
}

.cso-threat-globe .cso-tg-dot.is-live {
  animation: cso-tg-blink 1.5s ease-out infinite;
}

.cso-threat-globe .cso-tg-count {
  left: 8px;
  right: 8px;
  bottom: 22px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #f2f7ff;
  text-shadow: 0 1px 4px #000, 0 0 8px rgba(0, 0, 0, 0.8);
  background: rgba(4, 10, 18, 0.45);
  border-radius: 999px;
  padding: 2px 8px;
}

.cso-threat-globe .cso-tg-count .cso-tg-n {
  color: #7dff9a;
}

.cso-threat-globe .cso-tg-hint {
  left: 0;
  right: 0;
  bottom: 6px;
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: rgba(200, 220, 240, 0.78);
  text-shadow: 0 1px 3px #000;
}

.cso-tg-offer {
  margin: 8px 0 0;
  padding: 6px 10px;
  max-width: 100%;
  font: 11px/1.4 Tahoma, "Segoe UI", sans-serif;
  color: #d5e3f0;
  text-align: center;
  text-shadow: 0 1px 2px #000;
  background: rgba(4, 10, 18, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}

a.cso-tg-cta {
  display: inline-block;
  margin: 8px 0 0;
  padding: 8px 18px;
  border-radius: 3px;
  font: bold 14px/1.2 Tahoma, "Segoe UI", sans-serif;
  color: #fff !important;
  text-decoration: none !important;
  text-align: center;
  text-shadow: 1px 1px #1d6e14;
  background: linear-gradient(#7ad86e, #2f9e23 85%, #217818);
  border: 1px solid #1d6e14;
  cursor: pointer;
  box-shadow: 1px 1px 0 #0a3d0a;
}
a.cso-tg-cta:hover,
a.cso-tg-cta:focus-visible {
  background: linear-gradient(#8ee67f, #2f9e23 85%, #217818);
  outline: none;
  box-shadow: 0 0 0 2px #041018, 0 0 0 4px #5cc8ff;
}

/* Floated into measured free desktop space. JS sets left/top/width in document coordinates. */
#cso-tg-float-host {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  overflow: visible;
  z-index: 8;
  pointer-events: none;
}

.cso-threat-globe--home.is-desk-free {
  position: absolute;
  z-index: 8;
  margin: 0;
  transform: none;
  overflow: visible;
  max-width: 320px;
}

/* In-flow fallback (and shortcode / mobile): centred in normal document flow. */
.cso-threat-globe--home.is-flow-center {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  max-width: 320px;
  margin: 16px auto 24px;
  transform: none;
}

/* Narrow / mobile: in-flow, centred, ~200px globe, between the icon area and the boxes. */
@media (max-width: 860px) {
  .cso-threat-globe,
  .cso-threat-globe--home.is-flow-center {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
    max-width: 240px;
    margin: 16px auto 20px;
  }
  .cso-threat-globe .cso-tg-widget {
    width: 200px;
    height: 200px;
    border-radius: 14px;
  }
  .cso-tg-service {
    font-size: 12px;
  }
  .cso-tg-tagline {
    font-size: 13px;
    margin-bottom: 8px;
  }
}

/* Full-screen modal (teleported to document.body). */
.cso-tg-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 50% 40%, #0a1c30 0%, #050a12 55%, #020308 100%);
  color: #e8eef8;
  font: 14px/1.4 Tahoma, "Segoe UI", sans-serif;
}

.cso-tg-modal[hidden] {
  display: none !important;
}

.cso-tg-modal .cso-tg-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px 12px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(2, 6, 12, 0.82) 0%, rgba(2, 6, 12, 0.35) 70%, rgba(2, 6, 12, 0) 100%);
}

.cso-tg-modal .cso-tg-bar > * {
  pointer-events: auto;
}

.cso-tg-modal .cso-tg-heading {
  min-width: 0;
}

.cso-tg-modal .cso-tg-kicker {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7dff9a;
}

.cso-tg-modal .cso-tg-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.cso-tg-modal h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  color: #fff;
  font-weight: 700;
}

.cso-tg-modal .cso-tg-chip {
  display: inline-block;
  margin: 0;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(125, 255, 154, 0.45);
  background: rgba(8, 40, 20, 0.55);
  color: #7dff9a;
  font: 700 10px/1.2 Tahoma, "Segoe UI", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cso-tg-modal .cso-tg-heading > .cso-tg-offer {
  margin: 8px 0 0;
  max-width: 36rem;
  text-align: left;
  color: #c5d4e4;
  background: rgba(4, 10, 18, 0.55);
}

.cso-tg-modal .cso-tg-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 12px 0 0;
}

.cso-tg-modal .cso-tg-stat {
  min-width: 7.5rem;
}

.cso-tg-modal .cso-tg-stat .k {
  display: block;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9bb0c8;
}

.cso-tg-modal .cso-tg-stat .v {
  display: block;
  margin-top: 1px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.cso-tg-modal .cso-tg-stat .v.is-ok {
  color: #7dff9a;
}

.cso-tg-modal .cso-tg-close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(140, 180, 220, 0.35);
  background: rgba(8, 16, 28, 0.7);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.cso-tg-modal .cso-tg-close:hover,
.cso-tg-modal .cso-tg-close:focus-visible {
  background: rgba(20, 40, 70, 0.9);
  outline: none;
  box-shadow: 0 0 0 2px #5cc8ff;
}

.cso-tg-modal .cso-tg-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.cso-tg-modal .cso-tg-stage-full {
  position: absolute;
  inset: 0;
}

.cso-tg-modal .cso-tg-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.cso-tg-modal .cso-tg-ticker {
  position: absolute;
  left: 20px;
  bottom: 8px;
  max-width: min(420px, calc(100% - 40px));
  z-index: 2;
  font-size: 12px;
  color: #d5e6f8;
  text-shadow: 0 1px 4px #000;
  pointer-events: none;
}

.cso-tg-modal .cso-tg-ticker b {
  color: #7dff9a;
  font-weight: 700;
}

.cso-tg-modal .cso-tg-foot {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 8px 20px 16px;
  font-size: 11px;
  line-height: 1.45;
  color: #9bb0c8;
}

.cso-tg-modal .cso-tg-foot a {
  color: #fff !important;
  font-weight: 700;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .cso-tg-modal .cso-tg-bar {
    padding: 10px 12px 4px;
  }
  .cso-tg-modal h2 {
    font-size: 18px;
  }
  .cso-tg-modal .cso-tg-stat .v {
    font-size: 16px;
  }
  .cso-tg-modal .cso-tg-ticker,
  .cso-tg-modal .cso-tg-foot {
    padding-left: 12px;
    padding-right: 12px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cso-threat-globe .cso-tg-dot.is-live {
    animation: none;
  }
}

@keyframes cso-tg-blink {
  0% { box-shadow: 0 0 0 0 rgba(226, 61, 47, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(226, 61, 47, 0); }
  100% { box-shadow: 0 0 0 0 rgba(226, 61, 47, 0); }
}

@media print {
  .cso-threat-globe,
  .cso-tg-modal {
    display: none !important;
  }
}
