/* ================= TEX DEAL INC. — WORLD MAP WIDGET (scoped to .wm-section) ================= */
/* Extracted from Antigravity map build: only the .wm-* widget styles are kept.
   The original file also contained a full demo page (site header, hero, office
   cards, contact form, footer, and a global * / body reset) which is NOT included
   here because it would conflict with and override the existing site's styling. */

:root {
  --wm-bg: #030712;
  --wm-card-bg: rgba(11, 17, 33, 0.88);
  --wm-border: rgba(56, 189, 248, 0.25);
  --wm-accent-hub: #38bdf8;
  --wm-accent-client: #ffb020;
  --wm-text-bright: #f8fafc;
  --wm-text-muted: #94a3b8;
  --wm-font: 'Outfit', 'Work Sans', system-ui, -apple-system, sans-serif;
}

/* Photorealistic Satellite Map Container */
.wm-section {
  position: relative;
  z-index: 1; /* Contained stacking context: keeps every child (wm-header,
                 wm-controls, wm-time-bar, wm-slider-wrap, wm-legend, wm-tooltip)
                 scoped inside this section so it can never render above the
                 site navbar (z-index: 9), the WhatsApp button, or any other
                 global page chrome, even when the navbar becomes position-fixed
                 on scroll. Internal z-index values (10, 30) now only compete
                 with each other, not with the rest of the page. */
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7), inset 0 0 0 1px var(--wm-border);
  background: #030712;
}

.wm-wrap {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
}

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

.wm-status {
  display: none !important;
}

/* Glassmorphism Map Header */
.wm-header {
  position: absolute;
  top: 18px;
  left: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 10;
  pointer-events: none;
}

.wm-title-box {
  background: rgba(10, 16, 30, 0.88);
  border: 1px solid var(--wm-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 10px 18px;
  border-radius: 12px;
  pointer-events: auto;
}

.wm-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--wm-text-bright);
  display: flex;
  align-items: center;
  gap: 8px;
}

.wm-title-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: wm-pulse 2s infinite;
}

@keyframes wm-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.wm-subtitle {
  margin: 2px 0 0 0;
  font-size: 11.5px;
  color: var(--wm-text-muted);
}

.wm-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 16, 30, 0.88);
  border: 1px solid var(--wm-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 6px 12px;
  border-radius: 12px;
  pointer-events: auto;
}

.wm-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--wm-text-bright);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.wm-btn:hover, .wm-btn.is-active {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Time Scrubber Bar at Bottom */
.wm-time-bar {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(10, 16, 30, 0.9);
  border: 1px solid var(--wm-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 12px 20px;
  border-radius: 14px;
  z-index: 10;
}

.wm-time-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 140px;
}

.wm-time-clock {
  font-size: 14px;
  font-weight: 700;
  color: var(--wm-text-bright);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

.wm-time-label {
  font-size: 10.5px;
  color: var(--wm-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.wm-slider-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.wm-time-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 4px;
  background: linear-gradient(90deg, #1e293b 0%, #38bdf8 50%, #1e293b 100%);
  outline: none;
  cursor: pointer;
}

.wm-time-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f59e0b;
  border: 2px solid #ffffff;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.8);
  cursor: pointer;
}

.wm-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--wm-text-bright);
}

.wm-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.wm-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}

.wm-legend-dot.hub {
  background: var(--wm-accent-hub);
  color: var(--wm-accent-hub);
}

.wm-legend-dot.client {
  background: var(--wm-accent-client);
  color: var(--wm-accent-client);
}

/* Hover Tooltip */
.wm-tooltip {
  position: absolute;
  transform: translate(-50%, -120%);
  background: rgba(10, 16, 30, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  color: #e2e8f0;
  padding: 10px 14px;
  border-radius: 10px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 30;
  backdrop-filter: blur(12px);
  min-width: 160px;
}

.wm-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -130%);
}

.wm-tooltip-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wm-tooltip-badge {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.wm-tooltip-badge.hub {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.wm-tooltip-badge.client {
  background: rgba(255, 176, 32, 0.2);
  color: #ffb020;
  border: 1px solid rgba(255, 176, 32, 0.4);
}

.wm-tooltip-sub {
  font-size: 11.5px;
  color: #94a3b8;
}

@media (max-width: 990px) {
  .wm-wrap { height: 460px; }
}
