/* ============================================================
   SEWALOK — MAP PICKER (PURE GRINDR STYLE 2025)
   FINAL VERSION • Parveen Edition
============================================================ */

/* ------------------------------
   ROOT VARIABLES
------------------------------ */
:root {
  --sl-map-bg: #000;
  --sl-surface: #0f1114;
  --sl-accent: #06b6d4;
  --sl-text: #e6eef6;
  --sl-muted: #9aa4af;
  --sl-radius: 14px;
  --sl-z: 99999;
  --sl-action-height: 120px;
  --sl-padding: 18px;
  --sl-shadow: 0 14px 40px rgba(2, 6, 23, 0.6);

  /* Grindr Marker Colors */
  --sl-search-yellow: #ffcb00;
  --sl-self-blue: #19c3ff;
}

/* ------------------------------
   OVERLAY / MODAL
------------------------------ */
#sl-map-picker {
  position: fixed;
  inset: 0;
  display: none;
  z-index: var(--sl-z);
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-tap-highlight-color: transparent;
}

#sl-map-picker[aria-hidden="false"] {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* Desktop */
@media (min-width: 880px) {
  #sl-map-picker {
    align-items: center;
    padding: 24px;
  }
}

/* ------------------------------
   INNER MAP CONTAINER
------------------------------ */
.sl-map-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

@media (min-width: 880px) {
  .sl-map-inner {
    width: min(1100px, 96%);
    height: min(720px, 86vh);
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    box-shadow: var(--sl-shadow);
  }
}

/* ------------------------------
   MAP CANVAS
------------------------------ */
#sl-map {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--sl-action-height);
  background: var(--sl-map-bg);
}

@media (min-width: 880px) {
  #sl-map {
    bottom: 72px;
  }
}

/* ------------------------------
   BOTTOM ACTION BAR
------------------------------ */
#sl-map-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--sl-action-height);
  padding: var(--sl-padding);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0),
    rgba(0,0,0,0.75)
  );
}

.sl-actions-inner {
  width: 100%;
  max-width: 700px;
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

@media (max-width: 879px) {
  .sl-actions-inner {
    flex-direction: column;
  }
}

/* Buttons */
#sl-map-confirm,
#sl-map-cancel {
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  min-width: 48%;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease, box-shadow .12s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

#sl-map-confirm {
  background: var(--sl-accent);
  color: #041018;
}

#sl-map-cancel {
  background: rgba(255,255,255,0.1);
  color: var(--sl-text);
}

#sl-map-confirm:hover,
#sl-map-cancel:hover {
  transform: translateY(-4px);
}

/* ------------------------------
   GRINDR BLUE SELF-USER DOT
------------------------------ */
.sl-map-self-pin,
.sl-self-pulse,
.sl-self-core {
  position: absolute;
  pointer-events: none;
  z-index: calc(var(--sl-z) + 5);
}

/* Pulsing ring */
.sl-self-pulse {
  width: 32px;
  height: 32px;
  background: rgba(25,195,255,0.25);
  border-radius: 50%;
  animation: slPulse 2s infinite ease-out;
}

/* Blue inner dot */
.sl-self-core {
  width: 14px;
  height: 14px;
  background: var(--sl-self-blue);
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 5px 15px rgba(0,0,0,0.4);
  transform: translate(9px, -23px);
}

/* Pulsing animation */
@keyframes slPulse {
  0%   { transform: scale(0.4); opacity: 1; }
  70%  { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ------------------------------
   GRINDR SEARCH PIN (CENTER FIXED)
------------------------------ */
.sl-search-pin {
  position: absolute !important;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  z-index: calc(var(--sl-z) + 6);
  pointer-events: none;
}

.sl-search-pin div {
  animation: slPinDrop .25s ease;
}

@keyframes slPinDrop {
  from { transform: translateY(-10px) scale(0.6); opacity: 0.2; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* ------------------------------
   LEAFLET CLEANUP
------------------------------ */
.leaflet-control {
  z-index: calc(var(--sl-z) + 2);
}

.leaflet-control-attribution {
  color: rgba(255,255,255,0.4);
  background: rgba(0,0,0,0.4);
  border-radius: 6px;
  padding: 4px 6px;
}

/* High Performance */
.leaflet-container {
  will-change: transform;
  -webkit-transform: translateZ(0);
}
