/* ═══════════════════════════════════════════════════
   map.css — Google Map container & info panel
   ═══════════════════════════════════════════════════ */

/* ── Map pin markers ── */
.map-pin {
  width: 24px; height: 24px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 1.5px solid rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.5);
  cursor: pointer;
  will-change: background;
}
.map-pin span {
  transform: rotate(45deg);
  font: 700 10px/1 'Rajdhani', sans-serif;
  color: #000;
  pointer-events: none;
  user-select: none;
}

/* ── Category pin (admin map + website shared) ── */
.map-pin--cat {
  width: 32px;
  height: 32px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 1.5px solid rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.55);
  cursor: pointer;
  will-change: background, transform;
  transition: transform .15s, box-shadow .15s;
}
.map-pin--cat:hover {
  transform: rotate(-45deg) scale(1.15);
  box-shadow: 0 4px 12px rgba(0,0,0,.6);
}
.map-pin--cat .map-pin-icon {
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
}
.map-pin--cat svg {
  width: 12px;
  height: 12px;
  stroke: rgba(0,0,0,.8);
  stroke-width: 2.5;
  fill: none;
}

/* ── Brand logo pin (white bg + colored border + img logo) ── */
.map-pin--brand {
  background: #fff !important;
  border-width: 2px !important;
}
.map-pin--brand .map-pin-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 2px;
  display: block;
  pointer-events: none;
}

/* Pulsing animation for pending locations */
.map-pin--pulse {
  animation: pinPulse 1.6s ease-in-out infinite;
}
@keyframes pinPulse {
  0%, 100% { box-shadow: 0 2px 6px rgba(0,0,0,.5), 0 0 0 0 rgba(251,191,36,.5); }
  50%       { box-shadow: 0 2px 6px rgba(0,0,0,.5), 0 0 0 8px rgba(251,191,36,0); }
}

/* ── Map container ── */
/* Mobile-first: relative inside sidebar flow */
#map-container {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  flex: 1;
  background: var(--bg);
  z-index: auto;
}
#map {
  width: 100%;
  height: 100%;
  touch-action: none; /* prevent browser from hijacking pinch/pan gestures */
}

/* ── Info panel (shown on marker/card click) ── */
/* Mobile-first: bottom sheet */
#info-panel {
  position: absolute;
  top: auto;
  bottom: 0;
  right: 0;
  left: 0;
  width: 100%;
  background: rgba(10,14,22,.8);
  backdrop-filter: blur(36px) saturate(1.6);
  -webkit-backdrop-filter: blur(36px) saturate(1.6);
  border: 1px solid var(--glass-border);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 24px 64px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.05);
  padding: 14px 14px env(safe-area-inset-bottom, 14px);
  display: none;
  z-index: var(--z-base);
  animation: slideUp .25s ease;
  max-height: 55vh;
  overflow-y: auto;
}
.info-name { font-size: 16px; }
.info-btn  { padding: 11px; min-height: 44px; }
[data-theme="light"] #info-panel {
  background: rgba(255,255,255,.82);
  box-shadow: 0 24px 64px rgba(0,0,0,.1);
}
#info-panel.show { display: block; }

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}

.info-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  transition: background .15s, color .15s, transform .15s;
  z-index: 1;
}
.info-close:hover {
  background: var(--surface3);
  color: var(--text);
  transform: scale(1.08);
}

.info-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: var(--font-lg);
  font-weight: 700;
  margin-bottom: 3px;
  padding-right: 20px;
  line-height: 1.25;
}
.info-addr {
  font-size: var(--font-sm);
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.4;
}
.info-stars {
  color: var(--yellow);
  font-size: var(--font-sm);
  margin-bottom: 8px;
}
.info-amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}
.info-ai-box {
  background: linear-gradient(135deg,rgba(167,139,250,.06),rgba(56,189,248,.03));
  backdrop-filter: blur(8px);
  border: 1px solid rgba(167,139,250,.15);
  border-radius: 14px;
  padding: 9px 10px;
  font-size: var(--font-sm);
  color: #c4b5fd;
  line-height: 1.6;
  margin-bottom: 10px;
}
.info-ai-box strong {
  color: var(--ai);
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.info-hours {
  padding: 8px 10px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  font-size: var(--font-sm);
  line-height: 1.7;
  margin-bottom: 10px;
}
.info-btn {
  width: 100%;
  padding: 9px;
  min-height: var(--touch-min);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  border-radius: 8px;
  font-family: 'Rajdhani', sans-serif;
  font-size: var(--font-md);
  font-weight: 700;
  color: #000;
  cursor: pointer;
  transition: opacity .15s, box-shadow .3s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(var(--accent-rgb),.25);
}
.info-btn::before {
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(135deg,transparent 30%,rgba(255,255,255,.2) 50%,transparent 70%);
  transform:translateX(-100%);
  transition:transform .5s;
}
.info-btn:hover { opacity: .9; box-shadow: 0 6px 28px rgba(var(--accent-rgb),.35); }
.info-btn:hover::before { transform: translateX(100%); }

/* ── Map modal close button (hidden on desktop) ── */
.map-modal-close { display: none; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === DESKTOP LAYOUT (activează când ai design desktop) ===
@media (min-width: 801px) {
  #map-container {
    position: fixed;
    top: var(--topbar-h);
    left: var(--sidebar-w);
    right: 0;
    bottom: 0;
    flex: none;
    z-index: 1;
  }
  #info-panel {
    top: 14px;
    bottom: auto;
    right: 14px;
    left: auto;
    width: clamp(240px, 22vw, 320px);
    border-radius: 22px;
    max-height: calc(100% - 28px);
    padding: 14px;
    animation: slideInLeft .2s ease;
  }
  .info-name { font-size: var(--font-lg); }
  .info-btn  { padding: 9px; min-height: var(--touch-min); }
}
=== END DESKTOP LAYOUT === */

/* === DESKTOP LAYOUT (activează când ai design desktop) ===
@media (min-width: 801px) {
  .map-fab-row {
    display: flex;
    position: absolute;
    bottom: 16px;
    left: 16px;
    gap: 8px;
    z-index: calc(var(--z-drawer-overlay, 599) + 1);
    pointer-events: none;
  }
  .map-fab.fab-hidden { display: none !important; }
  .map-fab {
    display: flex;
    height: 38px;
    padding: 0 12px;
    border-radius: 19px;
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    color: var(--text);
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
    transition: transform .2s, background .2s;
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: auto;
  }
  .map-fab:hover {
    background: rgba(255,255,255,.12);
    transform: translateY(-1px);
  }
  .map-fab:active { transform: scale(.95); }
  .map-fab i, .map-fab svg { width: 18px; height: 18px; flex-shrink: 0; }

  .map-fab-locate {
    color: var(--blue, #3b82f6);
    padding: 0;
    width: 38px;
  }
  .map-fab-locate:hover { background: rgba(59,130,246,.15); border-color: rgba(59,130,246,.4); }
  .map-fab-panel { color: var(--accent, #4fc3f7); padding: 0; width: 38px; }
  .map-fab-panel:hover { background: rgba(79,195,247,.15); border-color: rgba(79,195,247,.4); }
  .map-fab-locate.locating { animation: locatePulseD 1s ease-in-out infinite; }
  @keyframes locatePulseD {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59,130,246,.4); }
    50%      { box-shadow: 0 0 0 8px rgba(59,130,246,0); }
  }

  #map-fab-add {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #000;
    border: none;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(var(--accent-rgb),.35);
  }

  .map-fab-ghost {
    color: var(--text);
    padding: 0;
    width: 38px;
  }
  .map-fab-ghost.ghost-active {
    background: rgba(239,68,68,.2);
    border-color: rgba(239,68,68,.5);
    color: #ef4444;
  }
}
=== END DESKTOP LAYOUT === */
