/* -----------------------------------------------------------
   GLOBAL REAL LEAFLET MAP STYLES
   ----------------------------------------------------------- */
.if-real-map-section {
  max-width: 1320px;
  margin: 0 auto;
  font-family: inherit;
  color: #ffffff;
}

.if-map-header-block {
  text-align: center;
  margin-bottom: 28px;
}

.if-map-pill {
  background: rgba(255, 234, 0, 0.12);
  color: #ffea00;
  padding: 6px 18px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 234, 0, 0.3);
  display: inline-block;
}

.if-map-title {
  font-size: clamp(2rem, 3.5vw, 2.7rem);
  font-weight: 800;
  color: #ffffff;
  margin: 16px 0 10px;
  line-height: 1.25;
}

.if-map-subtitle {
  color: #a3a3a3;
  font-size: 0.98rem;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.55;
}

/* Region Quick-Zoom Toolbar */
.if-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  background: #0e0e12;
  border: 1px solid #1f1f25;
  padding: 10px 18px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.if-toolbar-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.if-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.if-tb-icon {
  width: 16px;
  height: 16px;
  color: #ffea00;
  flex-shrink: 0;
}

.if-toolbar-label {
  font-size: 13.5px;
  font-weight: 700;
  color: #e5e5e5;
  letter-spacing: 0.3px;
}

.if-map-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.if-map-btn {
  background: rgba(255, 255, 255, 0.05);
  color: #e0e0e0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  font-family: inherit;
}

.if-map-btn:hover {
  background: rgba(255, 234, 0, 0.15);
  border-color: rgba(255, 234, 0, 0.4);
  color: #ffea00;
}

.if-map-btn.active {
  background: #ffea00;
  color: #000000;
  border-color: #ffea00;
  box-shadow: 0 0 12px rgba(255, 234, 0, 0.4);
}

/* Layer Style Toggle Buttons */
.if-layer-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 2px;
}

.if-layer-btn {
  background: transparent;
  color: #aaa;
  border: none;
  padding: 4px 12px;
  border-radius: 18px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  font-family: inherit;
}

.if-layer-btn:hover {
  color: #ffffff;
}

.if-layer-btn.active {
  background: #ffea00;
  color: #000000;
}

/* Map Frame */
.if-map-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #1f1f23;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  background: #0b101b;
}

.if-world-map {
  width: 100%;
  height: 600px;
  background: #0b101b !important;
  z-index: 1;
}

/* ZERO TILE SEAMS & ZERO WHITE GRID LINES FIX (Preserved User Overlap Adjustment) */
.if-world-map .leaflet-tile-container {
  will-change: transform;
}

.if-world-map img.leaflet-tile,
.if-world-map .leaflet-tile,
.if-world-map .leaflet-tile-container img {
  width: 256.5px !important;
  height: 256.5px !important;
  max-width: none !important;
  max-height: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  vertical-align: baseline !important;
  image-rendering: -webkit-optimize-contrast;
  -webkit-backface-visibility: hidden !important;
  backface-visibility: hidden !important;
}

/* Custom Yellow Pin */
.if-yellow-pin-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
}

.if-yellow-pin {
  width: 26px;
  height: 26px;
  background: #ffea00;
  border: 2px solid #000000;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.2s, box-shadow 0.2s;
}

.if-yellow-pin::after {
  content: '';
  width: 7px;
  height: 7px;
  background: #000000;
  border-radius: 50%;
}

.if-yellow-pin-wrap:hover .if-yellow-pin {
  transform: rotate(-45deg) scale(1.22);
  background: #ffffff;
  box-shadow: 0 0 14px rgba(255, 234, 0, 0.9);
}

/* Custom Yellow Cluster Badge with Pulse Ring */
.marker-cluster-custom {
  background: rgba(255, 234, 0, 0.28);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ifClusterPulse 2.4s infinite;
}

@keyframes ifClusterPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 234, 0, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(255, 234, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 234, 0, 0); }
}

.marker-cluster-custom div {
  width: 34px;
  height: 34px;
  background: #111114;
  border: 2.2px solid #ffea00;
  border-radius: 50%;
  color: #ffea00;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
  transition: transform 0.2s ease, background 0.2s, color 0.2s;
}

.marker-cluster-custom:hover div {
  transform: scale(1.12);
  background: #ffea00;
  color: #000000;
}

/* Styled Leaflet Popup (Dark Glassmorphism) */
.if-leaflet-popup .leaflet-popup-content-wrapper {
  background: rgba(14, 14, 18, 0.96) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 234, 0, 0.35) !important;
  border-radius: 12px !important;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  padding: 4px !important;
}

.if-leaflet-popup .leaflet-popup-content {
  margin: 12px 14px !important;
  line-height: 1.4 !important;
  font-family: inherit !important;
}

.if-leaflet-popup .leaflet-popup-tip {
  background: rgba(14, 14, 18, 0.96) !important;
  border: 1px solid rgba(255, 234, 0, 0.35) !important;
  box-shadow: none !important;
}

.if-leaflet-popup .leaflet-popup-close-button {
  color: #a0a0a0 !important;
  padding: 8px 8px 0 0 !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  transition: color 0.2s ease, transform 0.2s ease !important;
}

.if-leaflet-popup .leaflet-popup-close-button:hover {
  color: #ffea00 !important;
  transform: scale(1.15) !important;
}

/* Popup Content Card */
.if-pop-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.if-pop-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  padding: 2.5px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.if-status-pilot {
  background: rgba(0, 195, 255, 0.14);
  color: #00c3ff;
  border: 1px solid rgba(0, 195, 255, 0.35);
}

.if-status-security {
  background: rgba(255, 174, 0, 0.14);
  color: #ffae00;
  border: 1px solid rgba(255, 174, 0, 0.35);
}

.if-status-active {
  background: rgba(0, 230, 118, 0.14);
  color: #00e676;
  border: 1px solid rgba(0, 230, 118, 0.35);
}

.if-pop-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
}

.if-pop-client {
  font-size: 11.5px;
  color: #c0c0c0;
  font-weight: 600;
}

.if-pop-loc {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #a3a3a3;
  font-size: 11.5px;
}

.if-pop-loc-icon {
  width: 12px;
  height: 12px;
  color: #ffea00;
  flex-shrink: 0;
}

.if-pop-animals {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.if-pop-animal-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 2.5px 8px;
  border-radius: 12px;
  font-size: 11px;
  color: #f0f0f0;
  line-height: 1.2;
}

.if-pop-animal-icon {
  width: 14px !important;
  height: 14px !important;
  object-fit: contain;
  display: inline-block;
  filter: drop-shadow(0 0 2px rgba(255, 234, 0, 0.3));
}

.if-pop-action {
  margin-top: 4px;
}

/* SOLID WHITE BUTTON ON DEFAULT (Zero Theme Blue!), Bold Dark Text, Hover InnovFactory Yellow */
.if-pop-card a.if-pop-link,
.if-pop-card a.if-pop-link:link,
.if-pop-card a.if-pop-link:visited,
a.if-pop-link,
a.if-pop-link:link,
a.if-pop-link:visited {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  background: #ffffff !important;
  color: #0b0b0e !important;
  border: 1px solid #ffffff !important;
  padding: 8px 15px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35) !important;
  transition: all 0.2s ease !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.if-pop-card a.if-pop-link:hover,
.if-pop-card a.if-pop-link:focus,
a.if-pop-link:hover,
a.if-pop-link:focus {
  background: #ffea00 !important;
  border-color: #ffea00 !important;
  color: #000000 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px rgba(255, 234, 0, 0.45) !important;
}

.if-pop-card a.if-pop-link span,
a.if-pop-link span {
  color: #0b0b0e !important;
  font-weight: 800 !important;
}

.if-pop-card a.if-pop-link:hover span,
a.if-pop-link:hover span {
  color: #000000 !important;
}

.if-pop-card a.if-pop-link svg,
a.if-pop-link svg {
  color: #0b0b0e !important;
  stroke: #0b0b0e !important;
  flex-shrink: 0 !important;
  transition: transform 0.2s ease !important;
}

.if-pop-card a.if-pop-link:hover svg,
a.if-pop-link:hover svg {
  color: #000000 !important;
  stroke: #000000 !important;
  transform: translateX(2px) !important;
}

.if-pop-note {
  font-size: 11px;
  color: #888888;
  font-style: italic;
  margin-top: 2px;
}

/* Styled Leaflet Zoom Controls (Dark UI) */
.if-world-map .leaflet-control-zoom {
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6) !important;
}

.if-world-map .leaflet-control-zoom a {
  background: #111114 !important;
  color: #f0f0f0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  width: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
  font-size: 16px !important;
  transition: all 0.2s ease !important;
}

.if-world-map .leaflet-control-zoom a:hover {
  background: #ffea00 !important;
  color: #000000 !important;
}

.if-world-map .leaflet-control-attribution {
  background: rgba(0, 0, 0, 0.6) !important;
  color: #888 !important;
  font-size: 10px !important;
}

.if-world-map .leaflet-control-attribution a {
  color: #aaa !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .if-world-map {
    height: 480px;
  }
  .if-map-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 14px;
  }
  .if-toolbar-left,
  .if-toolbar-right {
    justify-content: center;
  }
  .if-map-btns {
    justify-content: center;
    gap: 6px;
  }
  .if-map-btn {
    font-size: 11.5px;
    padding: 5px 10px;
  }
}

/* Two-Finger Mobile Gesture Notice */
.if-gesture-notice {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(14, 14, 18, 0.94);
  color: #ffffff;
  border: 1px solid rgba(255, 234, 0, 0.5);
  padding: 11px 20px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.if-gesture-notice.active {
  opacity: 1;
}
