/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0f;
  --panel-bg: rgba(0,0,0,0.7);
  --text: #e0e0e0;
  --text-muted: #888;
  --border: rgba(255,255,255,0.1);
  --active: #fff;
  --disabled: #444;

  /* Event colors */
  --color-signup:    #22ff66;
  --color-vetting:   #ff6622;
  --color-match:     #ff22aa;
  --color-placement: #ffdd22;
  --color-interview: #ff9900;
  --color-website:   #2299ff;
  --color-discord:   #7c5cfc;
}

html, body {
  width: 100%; height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  overflow: hidden;
}

/* ── Layout ── */
#globe-container {
  position: fixed;
  inset: 0;
  z-index: 0;
}

#side-panel {
  position: fixed;
  left: 0; top: 0; bottom: 60px;
  width: 200px;
  padding: 24px 20px;
  background: var(--panel-bg);
  backdrop-filter: blur(8px);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#side-panel h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.description {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

.filter-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 8px;
}

/* ── Time Filters ── */
#time-filters {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.time-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  padding: 2px 0;
  transition: color 0.2s;
}

.time-btn.active {
  color: var(--active);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2px 10px;
}

/* ── Company Selector ── */
#company-selector {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
}

.company-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 12px;
  padding: 4px 14px;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  width: 80px;
}

.company-btn.active {
  color: var(--active);
  border-color: rgba(255,255,255,0.4);
}

.company-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ── Bottom Legend Bar ── */
#legend-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 200px repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  z-index: 10;
}

/* ── Logo (in legend bar) ── */
#randstad-logo {
  grid-column: 1;
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border);
  padding: 0 16px;
}

#randstad-logo img {
  display: block;
  width: 140px;
}

.legend-btn {
  background: none;
  border: none;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: color 0.2s;
  text-transform: uppercase;
}

.legend-btn.active { color: var(--active); }
.legend-btn.muted  { opacity: 0.3; }

.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* Color dots per event type */
[data-event="vetting"]   .dot { background: var(--color-vetting); }
[data-event="signup"]    .dot { background: var(--color-signup); }
[data-event="placement"] .dot { background: var(--color-placement); }
[data-event="discord"]   .dot { background: var(--color-discord); }
[data-event="website"]   .dot { background: var(--color-website); }
[data-event="interview"] .dot { background: var(--color-interview); }
[data-event="match"]     .dot { background: var(--color-match); }

/* ── Tooltip ── */
.tooltip {
  position: fixed;
  background: rgba(10,10,20,0.92);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 10px 16px;
  pointer-events: none;
  z-index: 100;
  max-width: 280px;
  backdrop-filter: blur(4px);
}

.tooltip.hidden { display: none; }

.tooltip-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.tooltip-detail {
  font-size: 12px;
  color: var(--text-muted);
}

.tooltip-link {
  margin-top: 6px;
}

.tooltip-link a {
  font-size: 11px;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.15s;
}

.tooltip-link a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ── Ping Rings ── */
.ping {
  position: relative;
  width: 0; height: 0;
  transform: translate(-50%, -50%);
  pointer-events: all;
  cursor: pointer;
}

.ping-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid currentColor;
  transform: translate(-50%, -50%);
  opacity: 0.85;
  animation: pulse 2s ease-out infinite;
  box-shadow: 0 0 6px currentColor;
}

.ping-ring:nth-child(1) { width: 8px;  height: 8px;  animation-delay: 0s; }
.ping-ring:nth-child(2) { width: 16px; height: 16px; animation-delay: 0.2s; }
.ping-ring:nth-child(3) { width: 24px; height: 24px; animation-delay: 0.4s; }
.ping-ring:nth-child(4) { width: 32px; height: 32px; animation-delay: 0.6s; }

@keyframes pulse {
  0%   { opacity: 0.85; }
  50%  { opacity: 0.4; }
  100% { opacity: 0.85; }
}

/* ── Hamburger (mobile only) ── */
#hamburger {
  display: none;
  position: fixed;
  top: 12px; left: 12px;
  z-index: 20;
  width: 40px; height: 40px;
  background: rgba(0,0,0,0.75);
  border: 1px solid var(--border);
  border-radius: 6px;
  backdrop-filter: blur(8px);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

#hamburger span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: opacity 0.2s;
}

#panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9;
  background: rgba(0,0,0,0.5);
}

/* ── Mobile layout ── */
@media (max-width: 767px) {
  #hamburger {
    display: flex;
  }

  #side-panel {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    bottom: 0;
    z-index: 15;
  }

  #side-panel.open {
    transform: translateX(0);
  }

  #panel-overlay.visible {
    display: block;
  }

  #legend-bar {
    grid-template-columns: 120px repeat(4, 1fr);
  }

  #randstad-logo img {
    width: 90px;
  }
}

/* Globe outer glow overlay (decorative) */
#globe-container canvas {
  border-radius: 50%;
}

/* Subtle scan-line texture on panel */
#side-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255,255,255,0.01) 2px,
    rgba(255,255,255,0.01) 4px
  );
  pointer-events: none;
}
