/* ═══════════════════════════════════════════════════════
   map.css — Map Panel, Slot Grid, Legend
═══════════════════════════════════════════════════════ */

/* ── Map HUD: legend ── */
.map-legend {
  position: absolute;
  top: 1rem;
  left: 4.2rem;
  z-index: 20;
  max-width: min(280px, calc(100% - 5.2rem));
  background: rgba(17, 24, 42, 0.86);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.75rem 0.9rem;
  pointer-events: none;
  box-shadow: var(--shadow-md);
}
.map-legend-title {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.map-legend-hint {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 0.5rem 0;
}
.map-legend-hint strong { color: var(--accent); font-weight: 700; }
.map-legend-scale {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--muted);
}
.map-legend-scale li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

@media (max-width: 500px) {
  .map-legend {
    top: auto;
    bottom: 5.5rem;
    left: 0.8rem;
    max-width: min(240px, calc(100% - 1.6rem));
    padding: 0.55rem 0.65rem;
  }
  .map-legend-hint { display: none; }
}
.lg-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid #0a0c10;
  flex-shrink: 0;
}

/* ── Parking markers (Leaflet + Mapbox) ── */
.ps-marker-leaflet-root { background: transparent !important; border: none !important; }

.ps-marker {
  position: relative;
  width: 44px;
  height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
  pointer-events: auto;
  outline: none;
}
.ps-marker:focus-visible .ps-marker-dot {
  box-shadow: 0 0 0 2px var(--accent2), 0 0 12px rgba(0, 229, 160, 0.5) !important;
}
.ps-marker-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2.5px solid #0a0c10;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ps-marker-p {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 12px;
  color: #0a0c10;
  line-height: 1;
}
.ps-marker-badge {
  position: absolute;
  bottom: 18px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #0a0c10;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(0, 229, 160, 0.35);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
.ps-marker-sub {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
  line-height: 1;
}

.ps-hover-pop {
  position: absolute;
  left: 50%;
  bottom: 58px;
  transform: translateX(-50%) translateY(4px);
  width: 150px;
  background: rgba(17, 24, 42, 0.96);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  padding: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast), transform var(--t-fast);
  z-index: 25;
}
.ps-hover-pop::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -6px;
  width: 10px;
  height: 10px;
  background: rgba(17, 24, 42, 0.96);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  rotate: 45deg;
}
.ps-marker.popup-open .ps-hover-pop,
.ps-marker:hover .ps-hover-pop,
.ps-marker:focus-within .ps-hover-pop {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.ps-pop-line {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  line-height: 1.4;
}
.ps-pop-title {
  color: var(--text);
  font-weight: 700;
  margin-bottom: 2px;
}
.ps-pop-actions {
  display: flex;
  gap: 6px;
  margin-top: 7px;
}
.ps-pop-btn {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 0;
  cursor: pointer;
}
.ps-pop-btn.yes {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0c10;
}

.street-pin {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px dashed #8bb2ff;
  background: rgba(80, 132, 255, 0.2);
  color: #bfd3ff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ps-user-marker {
  width: 26px;
  height: 26px;
  border-radius: 50% 50% 50% 0;
  background: rgba(101, 188, 219, 0.18);
  border: 2px solid rgba(101, 188, 219, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 10px rgba(101, 188, 219, 0.12), 0 0 14px rgba(101, 188, 219, 0.45);
  transform: rotate(-45deg);
  z-index: 50;
}
.ps-user-pin {
  transform: rotate(45deg);
  font-size: 15px;
  line-height: 1;
  filter: drop-shadow(0 0 4px rgba(101, 188, 219, 0.75));
}

/* ── Map Detail Panel ── */
.map-panel {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 2rem));
  background: #12161e;
  border: 1px solid #2a3348;
  border-radius: 16px;
  padding: 1.35rem;
  z-index: 700;
  display: none;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.42);
  max-height: calc(100vh - var(--header-h) - 2rem);
  overflow-y: auto;
}
.map-panel.open {
  display: block;
  animation: slideUp var(--t-normal) ease;
}

.mp-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.95rem;
}
.mp-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.3;
}
.mp-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 5px;
}
.mp-close {
  width: 25px; height: 25px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  transition: all var(--t-fast);
}
.mp-close:hover { border-color: var(--accent); color: var(--accent); }

.mp-disclaimer {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 0.95rem 0;
  padding: 0.55rem 0.65rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}
.mp-disclaimer strong { color: var(--reserved); }

.mp-details {
  display: none;
}
.mp-row {
  display: grid;
  grid-template-columns: minmax(88px, 34%) 1fr;
  gap: 6px 10px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.62rem;
}
.mp-row:last-child { border-bottom: none; }
.mp-row dt {
  font-family: var(--font-mono);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}
.mp-row dd {
  margin: 0;
  font-family: var(--font-mono);
  color: var(--text);
  word-break: break-word;
}
.mp-row dd a {
  color: var(--accent);
  text-decoration: none;
}
.mp-row dd a:hover { text-decoration: underline; }

/* Stats Row */
.mp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 1rem;
}
.mp-stat {
  background: #1a2030;
  border: 1px solid #2a3348;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}
.mp-stat-val {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
}
.mp-stat-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--muted);
  margin-top: 4px;
}

/* Slot Legend */
.slot-legend {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.slot-section {
  margin-top: 6px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.slot-section-title {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.slot-live-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(101,188,219,0.12);
  border: 1px solid rgba(101, 188, 219, 0.32);
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 0.58rem;
  color: var(--accent);
}
.slot-live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: none;
}
.slot-live-badge.live-on {
  border-color: rgba(101, 188, 219, 0.45);
  color: var(--accent);
}
.slot-live-badge.live-on .slot-live-dot {
  animation: slotblink 1.4s infinite;
}
.slot-live-badge:not(.live-on) {
  opacity: 0.88;
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--muted2);
}
.slot-live-badge:not(.live-on) .slot-live-dot {
  background: var(--muted2);
}
@keyframes slotblink { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }
.sl-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.sl-box {
  width: 10px; height: 10px;
  border-radius: 3px;
  border: 1.5px solid;
}
.sl-free     { background: rgba(57,216,255,0.12);  border-color: rgba(57,216,255,0.35); }
.sl-taken    { background: rgba(255,68,68,0.08); border-color: rgba(255,68,68,0.2); }
.sl-reserved { background: rgba(255,159,0,0.08); border-color: rgba(255,159,0,0.2); }
.sl-chosen   { background: var(--accent2);        border-color: var(--accent2); }
.sl-unknown  { background: rgba(144, 163, 207, 0.1); border-color: rgba(144, 163, 207, 0.35); }

/* Slot Grid */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 12px;
}

/* Individual Slot */
.slt,
.ps-slot {
  aspect-ratio: 0.78;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--t-fast);
  user-select: none;
}
.slt.free,
.ps-slot.free {
  background: rgba(57,216,255,0.12);
  color: var(--free);
  border-color: rgba(57,216,255,0.35);
}
.slt.free:hover,
.ps-slot.free:hover {
  background: rgba(57,216,255,0.24);
  border-color: var(--free);
  transform: scale(1.1);
  z-index: 1;
}
.slt.taken,
.ps-slot.taken {
  background: rgba(255,68,68,0.07);
  color: rgba(255,68,68,0.35);
  border-color: rgba(255,68,68,0.12);
  cursor: not-allowed;
}
.slt.reserved,
.ps-slot.reserved {
  background: rgba(255,159,0,0.08);
  color: rgba(255,159,0,0.45);
  border-color: rgba(255,159,0,0.15);
  cursor: not-allowed;
}
.slt.chosen,
.ps-slot.selected {
  background: var(--accent2) !important;
  border-color: var(--accent2) !important;
  color: #fff !important;
  box-shadow: 0 0 9px rgba(0,92,255,0.4);
}
.slt.booked,
.ps-slot.booked {
  background: rgba(0,92,255,0.1);
  color: rgba(0,92,255,0.4);
  border-color: rgba(0,92,255,0.15);
  cursor: not-allowed;
}
.slt.unknown,
.ps-slot.unknown {
  background: rgba(144, 163, 207, 0.08);
  color: var(--unknown);
  border-color: rgba(144, 163, 207, 0.22);
  cursor: not-allowed;
  font-size: 0.62rem;
}
.ps-slot-soon {
  border-style: dashed;
  border-width: 1.5px;
}
.ps-slot.taken.ps-slot-soon,
.ps-slot.reserved.ps-slot-soon {
  cursor: pointer;
}
.ps-slot-soon.ps-slot.taken {
  border-color: rgba(255, 68, 68, 0.45);
}
.ps-slot-soon.ps-slot.reserved {
  border-color: rgba(255, 159, 0, 0.45);
}
.ps-slot-soon:hover {
  transform: scale(1.06);
  z-index: 1;
  filter: brightness(1.08);
}
.ps-slot-eta {
  font-size: 0.5rem;
  margin-left: 1px;
  line-height: 1;
  vertical-align: super;
}
.slot-soon-hint {
  font-size: 0.62rem;
  line-height: 1.4;
  color: var(--muted);
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.18);
  border: 1px dashed rgba(255, 255, 255, 0.08);
}
.slots-empty-msg {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  line-height: 1.45;
  color: var(--muted);
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.22);
}
.slots-empty-msg strong { color: var(--text); }
.ps-slot.booked::after {
  content: '✓';
  font-size: 0.65rem;
}

@media (max-width: 820px) {
  .slots-grid {
    grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
    gap: 6px;
    max-height: 190px;
  }
  .slt {
    font-size: 0.6rem;
    border-width: 2px;
  }
}

/* Panel Actions */
.mp-actions {
  display: flex;
  gap: 7px;
}
.slot-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.ps-btn {
  flex: 1;
  padding: 12px 10px;
  border-radius: 12px;
  border: none;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all var(--t-fast);
}
.ps-btn-auto {
  background: #1a2030;
  color: var(--text);
  border: 1px solid #2a3348;
}
.ps-btn-auto:hover { border-color: var(--accent2); color: var(--accent2); }
.ps-btn-reserve {
  background: var(--accent);
  color: #0a0c10;
}
.ps-btn-reserve:hover {
  background: #7bd2f2;
  box-shadow: 0 0 16px rgba(101,188,219,0.34);
}
.ps-btn-reserve:disabled {
  background: #2a3348;
  color: var(--muted);
  border: 1px solid #2a3348;
  cursor: not-allowed;
  box-shadow: none;
}

.ps-booking-card {
  background: rgba(57,216,255,0.08);
  border: 1px solid rgba(57,216,255,0.24);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 2px 0 10px;
  display: none;
  font-family: var(--font-mono);
  font-size: 0.68rem;
}
.ps-booking-card.show { display: block; }
.ps-booking-card-title {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 8px;
}
.ps-booking-ref {
  font-size: 0.7rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ps-booking-ref span { display: flex; justify-content: space-between; }
.ps-booking-ref b { color: var(--text); }
.ps-btn-cancel-booking {
  margin-top: 10px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 68, 68, 0.35);
  background: rgba(255, 68, 68, 0.08);
  color: #f0a0a0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.ps-btn-cancel-booking:hover {
  background: rgba(255, 68, 68, 0.16);
  border-color: rgba(255, 68, 68, 0.5);
}

.ps-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.78);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.ps-modal-overlay.open { display: flex; }
.ps-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.8rem;
  width: min(430px, 92vw);
  position: relative;
}
.ps-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
}
.ps-modal-sub { font-family: var(--font-mono); font-size: 0.63rem; color: var(--muted); margin-bottom: 1rem; }
.ps-confirm-box {
  background: rgba(101,188,219,0.08);
  border: 1px solid rgba(101,188,219,0.22);
  border-radius: 10px;
  padding: 11px 13px;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.63rem;
}
.ps-confirm-row { display: flex; justify-content: space-between; padding: 3px 0; }
.ps-confirm-label { color: var(--muted); }
.ps-confirm-value { color: var(--accent); font-weight: 700; }
.ps-form-group { margin-bottom: 0.85rem; }
.ps-form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 5px;
}
.ps-form-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 13px;
  color: var(--text);
}
select.ps-form-input {
  cursor: pointer;
}
.ps-form-input.error { border-color: #ff4444; }
.ps-payment-hint {
  font-size: 0.58rem;
  color: var(--muted);
  margin: 6px 0 0;
  line-height: 1.35;
}
.ps-duration-chips { display: flex; gap: 6px; margin-top: 6px; }
.ps-dur-chip {
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
}
.ps-dur-chip.on { border-color: var(--accent); color: var(--accent); background: rgba(101,188,219,0.12); }
.ps-modal-btns { display: flex; gap: 8px; margin-top: 1rem; }

@media (max-width: 1080px) and (min-width: 821px) {
  .map-panel {
    width: min(650px, calc(100% - 1.2rem));
    padding: 1rem;
    max-height: calc(100vh - var(--header-h) - 1.2rem);
  }
  .mp-title {
    font-size: 1.18rem;
  }
  .mp-sub {
    font-size: 0.66rem;
  }
  .slots-grid {
    grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
    max-height: 195px;
  }
}

.ps-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--surface2);
  border-left: 3px solid var(--accent);
  border-radius: 11px;
  padding: 13px 17px;
  z-index: 10000;
  display: none;
  max-width: 310px;
}
.ps-toast.show { display: block; }
.ps-toast.error { border-left-color: #ff4444; }
.ps-toast-title { font-weight: 700; font-size: 0.82rem; color: var(--text); margin-bottom: 2px; }
.ps-toast-body  { font-family: var(--font-mono); font-size: 0.63rem; color: var(--muted); line-height: 1.4; }

/* Hide Leaflet attribution box to prevent overlap */
.leaflet-control-attribution,
.leaflet-control-container .leaflet-control-attribution {
  display: none !important;
}

/* Ensure Leaflet map + tiles fill the container (no half-height grey area) */
#map,
.map-wrap,
#gmap .leaflet-container,
.leaflet-container {
  height: 100% !important;
  min-height: 100% !important;
}

@media (max-width: 820px) {
  .map-panel {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: calc(100vw - 0.8rem);
    max-width: 720px;
    bottom: 0.4rem;
    max-height: 86vh;
    overflow-y: auto;
    border-radius: 14px;
    z-index: 700;
    padding: 1rem;
  }
  .slots-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    max-height: 230px;
  }
  .mp-title {
    font-size: 1.05rem;
  }
  .mp-sub {
    font-size: 0.64rem;
  }
  .mp-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .slot-actions,
  .mp-actions {
    flex-wrap: wrap;
  }
  .slot-actions .ps-btn,
  .mp-actions .btn {
    min-height: 42px;
  }
  .ps-modal {
    width: min(430px, calc(100vw - 1rem));
    max-height: calc(100vh - 1rem);
    overflow-y: auto;
    padding: 1.2rem;
  }
  .ps-toast {
    right: 0.7rem;
    left: 0.7rem;
    bottom: 0.8rem;
    max-width: none;
  }
}

@media (max-width: 600px) {
  .map-panel {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: calc(100vw - 0.5rem);
    bottom: 0.25rem;
    max-height: 88vh;
    padding: 0.9rem;
    border-radius: 12px;
  }
  .mp-head {
    margin-bottom: 0.7rem;
    gap: 10px;
  }
  .mp-title {
    font-size: 0.98rem;
    line-height: 1.25;
  }
  .mp-sub {
    font-size: 0.58rem;
  }
  .mp-grid {
    grid-template-columns: 1fr;
    margin-bottom: 0.7rem;
  }
  .slot-section-title {
    gap: 8px;
    align-items: flex-start;
  }
  .slot-live-badge {
    font-size: 0.54rem;
    padding: 2px 7px;
  }
  .slot-legend {
    gap: 0.45rem 0.7rem;
    font-size: 0.62rem;
  }
  .slot-soon-hint {
    font-size: 0.58rem;
    padding: 7px 8px;
  }
  .slots-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    max-height: 210px;
  }
  .ps-slot {
    aspect-ratio: 1;
    font-size: 0.56rem;
    border-radius: 7px;
  }
  .slot-actions,
  .mp-actions,
  .ps-modal-btns {
    flex-direction: column;
    gap: 7px;
  }
  .ps-btn,
  .btn {
    width: 100%;
    font-size: 0.72rem;
  }
  .ps-booking-card {
    padding: 10px 11px;
    font-size: 0.63rem;
  }
  .ps-booking-ref {
    font-size: 0.62rem;
  }
  .ps-booking-ref span {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
  }
  .ps-btn-cancel-booking {
    font-size: 0.6rem;
    padding: 7px 10px;
  }
  .ps-modal {
    padding: 0.9rem;
    border-radius: 12px;
  }
  .ps-modal h2 {
    font-size: 1rem;
    padding-right: 30px;
  }
  .ps-modal-close {
    top: 10px;
    right: 10px;
  }
  .ps-confirm-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .ps-confirm-value {
    text-align: left;
    word-break: break-word;
  }
  .ps-duration-chips {
    flex-wrap: wrap;
  }
  .ps-dur-chip {
    min-width: 62px;
    text-align: center;
  }
  .ps-dur-chip {
    font-size: 0.56rem;
    padding: 4px 8px;
  }
  .map-legend {
    bottom: 0.35rem;
    left: 0.55rem;
    max-width: min(230px, calc(100% - 1.1rem));
  }
}

@media (max-width: 380px) {
  .map-panel {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: calc(100vw - 0.35rem);
    bottom: 0.15rem;
    max-height: 90vh;
    padding: 0.75rem;
  }
  .slots-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-height: 200px;
  }
  .ps-btn,
  .btn {
    padding: 10px 8px;
    font-size: 0.66rem;
  }
  .ps-modal {
    width: calc(100vw - 0.5rem);
    max-height: calc(100vh - 0.5rem);
    padding: 0.75rem;
  }
}

@media (max-height: 760px) {
  .map-panel {
    max-height: min(86vh, 620px);
  }
  .slots-grid {
    max-height: 170px;
  }
  .mp-grid {
    margin-bottom: 0.7rem;
  }
  .slot-section {
    padding-top: 9px;
  }
}
