/**
 * NTF World Tour — Map + Card Styles
 *
 * Color palette:
 * - Primary (dark):  #0B1F4D
 * - Secondary (mid): #123A8C
 * - Accent (CTA):    #F5B800
 */

/* ── Map container (hidden on mobile) ──────────────── */
#neotech-world-tour-map {
  width: 100%;
  height: 500px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  background: #0b1f4d;
}

@media (max-width: 767px) {
  #neotech-world-tour-map {
    display: none;
  }
}

/* ── Mobile cards container (hidden on desktop) ────── */
#neotech-world-tour-cards {
  display: none;
}

@media (max-width: 767px) {
  #neotech-world-tour-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
  }
}

/* ── Marker base ────────────────────────────────────── */
.neotech-marker {
  background: none !important;
  border: none !important;
}

.neotech-marker__dot {
  width: 14px;
  height: 14px;
  background: #f5b800;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(245, 184, 0, 0.6);
  position: absolute;
  top: -7px;
  left: -7px;
  cursor: pointer;
}

/* ── Pulse animation for next event ─────────────────── */
.neotech-marker--next .neotech-marker__dot {
  background: #f5b800;
  animation: neotech-pulse 2s ease-in-out infinite;
}

@keyframes neotech-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 184, 0, 0.6);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(245, 184, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 184, 0, 0);
  }
}

/* ── Label (on map) ────────────────────────────────── */
.neotech-marker__label {
  position: absolute;
  top: -50px;
  left: 12px;
  background: rgba(11, 31, 77, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(245, 184, 0, 0.3);
  border-radius: 10px;
  padding: 8px 14px;
  white-space: nowrap;
  font-family: "Barlow", sans-serif;
  font-size: 13px;
  color: #ffffff;
  line-height: 1.4;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  z-index: 400;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.neotech-marker__label:hover {
  border-color: rgba(245, 184, 0, 0.7);
  box-shadow:
    0 4px 20px rgba(245, 184, 0, 0.3),
    0 4px 16px rgba(0, 0, 0, 0.5);
}

.neotech-marker__flag {
  font-size: 16px;
  vertical-align: middle;
}

.neotech-marker__label strong {
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.neotech-marker__date {
  color: #f5b800;
  font-size: 12px;
  font-weight: 600;
}

.neotech-marker__badge {
  display: inline-block;
  background: #f5b800;
  color: #0b1f4d;
  font-family: "Barlow", sans-serif;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border-radius: 100px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── Next event label highlight ─────────────────────── */
.neotech-marker--next .neotech-marker__label {
  border-color: rgba(245, 184, 0, 0.6);
  box-shadow:
    0 4px 20px rgba(245, 184, 0, 0.2),
    0 4px 16px rgba(0, 0, 0, 0.5);
}

/* ===========================================================
   CUSTOM OVERLAY (replaces Leaflet popups)
   =========================================================== */
.nwt-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.nwt-overlay--visible {
  opacity: 1;
  pointer-events: auto;
}

/* ===========================================================
   EVENT CARD (shared: overlay + mobile)
   =========================================================== */
.nwt-card {
  background: linear-gradient(135deg, #0e2761 0%, #0b1f4d 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  font-family: "Barlow", sans-serif;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  min-width: 240px;
  /* max-width: 280px; */
}

.nwt-card--next {
  border-color: rgba(245, 184, 0, 0.4);
  box-shadow: 0 0 30px rgba(245, 184, 0, 0.08);
}

/* ── Close button ──────────────────────────────────── */
.nwt-card__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease;
  padding: 0;
}

.nwt-card__close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

/* ── City image ────────────────────────────────────── */
.nwt-card__image {
  margin: -24px -24px 16px;
  height: 120px;
  overflow: hidden;
  position: relative;
}

.nwt-card__image::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, #0b1f4d, transparent);
  pointer-events: none;
}

.nwt-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.7) saturate(0.8);
}

.nwt-card__badge {
  display: inline-block;
  background: linear-gradient(135deg, #f5b800, #e5ab00);
  color: #0b1f4d;
  font-family: "Barlow", sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.nwt-card__flag {
  font-size: 36px;
  margin-bottom: 8px;
  line-height: 1;
}

.nwt-card__city {
  font-family: "Oswald", sans-serif;
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 4px;
  color: #ffffff;
}

.nwt-card__country {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nwt-card__divider {
  width: 40px;
  height: 2px;
  background: #f5b800;
  margin: 0 auto 12px;
  border-radius: 2px;
}

.nwt-card__date {
  font-size: 14px;
  font-weight: 600;
  color: #f5b800;
  margin: 0 0 4px;
}

.nwt-card__venue {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 16px;
}

.nwt-card__btn {
  display: inline-block;
  font-family: "Barlow", sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 24px;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.nwt-card__btn--primary {
  background: linear-gradient(135deg, #f5b800, #e5ab00);
  color: #0b1f4d;
}

.nwt-card__btn--primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 20px rgba(245, 184, 0, 0.4);
  transform: translateY(-1px);
  color: #0b1f4d;
  text-decoration: none;
}

.nwt-card__btn--disabled {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.35);
  cursor: default;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Leaflet popup safety net ────────────────────────── */
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #0b1f4d !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  padding: 0 !important;
}

/* ── Hide tile seams + dim labels ────────────────────── */
#neotech-world-tour-map .leaflet-tile-pane {
  filter: brightness(0.7) saturate(0.3);
}

#neotech-world-tour-map .leaflet-tile {
  outline: none !important;
  border: none !important;
  padding: 0 !important;
  image-rendering: auto;
}

#neotech-world-tour-map .leaflet-tile-container img {
  margin: -1px;
  padding: 1px;
}

/* ── Leaflet controls override ─────────────────────── */
.leaflet-control-zoom a {
  background: rgba(11, 31, 77, 0.8) !important;
  color: #f5b800 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.leaflet-control-zoom a:hover {
  background: rgba(245, 184, 0, 0.2) !important;
}
