/* FlatFinder Trójmiasto - Nowoczesne style i motyw */

:root {
  --primary-blue: #2563eb;
  --primary-purple: #7c3aed;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --bg-card: #ffffff;
  --bg-subtle: #f8fafc;
  --border-color: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
}

.dark {
  --primary-blue: #3b82f6;
  --primary-purple: #8b5cf6;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --bg-card: #1e293b;
  --bg-subtle: #0f172a;
  --border-color: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-subtle);
  overflow-x: hidden;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.dark ::-webkit-scrollbar-thumb {
  background: #475569;
}

/* Karta oferty */
.offer-card {
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.18s ease;
}
.offer-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}
.dark .offer-card:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.offer-card.active-selected {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}

/* Zapewnienie 100% czytelności przycisków w kartach */
.offer-card a[href],
.leaflet-popup a[href] {
  text-decoration: none;
}

/* Custom Leaflet Map Markers */
.custom-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}
.custom-pin:hover {
  transform: scale(1.18);
  z-index: 9999 !important;
}

.pin-intersection {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: 2px solid #ffffff;
  width: 32px;
  height: 32px;
}

.pin-u1 {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border: 2px solid #ffffff;
  width: 28px;
  height: 28px;
}

.pin-u2 {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: white;
  border: 2px solid #ffffff;
  width: 28px;
  height: 28px;
}

.pin-uni-u1 {
  background: #1e40af;
  color: #ffffff;
  border: 3px solid #60a5fa;
  width: 44px;
  height: 44px;
  box-shadow: 0 0 22px rgba(37, 99, 235, 0.7);
  cursor: grab;
}

.pin-uni-u2 {
  background: #5b21b6;
  color: #ffffff;
  border: 3px solid #c084fc;
  width: 44px;
  height: 44px;
  box-shadow: 0 0 22px rgba(124, 58, 237, 0.7);
  cursor: grab;
}

.pin-skm {
  background: #0284c7;
  color: white;
  border: 1.5px solid white;
  width: 22px;
  height: 22px;
  border-radius: 4px;
}

/* Styl popupu Leaflet */
.leaflet-popup-content-wrapper {
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.15);
}
.dark .leaflet-popup-content-wrapper {
  background: #1e293b;
  color: #f8fafc;
}
.leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.4;
}
.leaflet-popup-tip {
  display: none;
}

/* Gwarancja, że modale ZAWSZE znajdują się nad mapą Leaflet i nad wszystkimi warstwami */
#modal-settings,
#modal-import {
  z-index: 99999 !important;
  position: fixed !important;
  inset: 0 !important;
}

#scanner-toast {
  z-index: 9999 !important;
}
