/* =================================== */
/* 1. ZÁKLADNÍ STYLY & TYPOGRAFIE
/* =================================== */
html, body {
  height: 100%; /* Důležité pro mapu */
  margin: 0;
  padding: 0;
  font-family: "Inter", "Poppins", "Segoe UI", sans-serif;
  background: #fafafa;
  color: #222;
}

/* === FIX PRO STICKY FOOTER === */
/* Pro všechny stránky KROMĚ mapy (ta má vlastní logiku) */
body:not(#map-page) {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Roztáhne body na celou výšku okna */
}

/* Mapa musí být fixní, aby se nescrollovala */
body#map-page {
    overflow: hidden;
    display: block; 
}

#map {
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* =================================== */
/* 2. LAYOUT (HEADER, FOOTER, CONTENT)
/* =================================== */
.header {
  text-align: center;
  padding: 20px 10px;
  border-bottom: 1px solid #eee;
  background: white;
  position: relative;
  z-index: 100;
  flex-shrink: 0; /* Header se nesmí smrsknout */
}

.header h1 {
  margin: 0;
  font-size: 20px;
  color: #222;
}

/* Tlačítko zpět (domeček) */
.home-button {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #f0f0f0;
  color: #333;
  border-radius: 50%;
  text-decoration: none;
  transition: background 0.2s ease;
}

.home-button:hover {
  background: #e0e0e0;
}

.home-button svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
}

.content {
  flex: 1; /* Tímto říkáme: "Zaber veškeré volné místo" */
  width: 100%;
  max-width: 900px;
  margin: 25px auto; /* Centrování a mezery */
  padding: 0 15px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column; /* Aby i obsah uvnitř fungoval hezky */
}

.footer {
  flex-shrink: 0; /* Footer se nesmí smrsknout */
  text-align: center;
  font-size: 13px;
  color: #777;
  padding: 20px 20px;
  border-top: 1px solid #eee;
  margin-top: auto; /* Pojistka: Odstrčí footer dolů */
  background: #fafafa;
}

/* =================================== */
/* 3. MAPA & OVLÁDACÍ PRVKY (LEAFLET)
/* =================================== */
#map {
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* Popupy - Design */
.leaflet-popup-content-wrapper {
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  padding: 0;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 10px;
  line-height: 1.4;
  cursor: pointer;
  user-select: text;
}

.leaflet-popup-content > div { /* Blur wrapper */
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.leaflet-popup-content > div::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--popup-bg-img);
  background-size: cover;
  background-position: center;
  filter: blur(10px) brightness(0.9);
  transform: scale(1.1);
  z-index: 0;
}

.leaflet-popup-content img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 180px;
  object-fit: contain;
}

.leaflet-popup-content strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.leaflet-popup-content span {
  font-size: 13px;
  color: #666;
}

/* Vyhledávání (Search Bar) */
#search-bar {
  position: absolute;
  top: 15px;
  left: 60px;
  right: 135px;
  z-index: 1500;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(6px);
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 8px;
}

#search-bar input {
  border: none;
  background: transparent;
  width: 100%;
  outline: none;
  font-size: 14px;
  color: #222;
}

/* Filtry (Dropdown) */
#difficulty-dropdown {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 1500;
}

#difficulty-toggle {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  border: none;
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

#difficulty-options {
  position: absolute;
  right: 0;
  top: 40px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: 0.2s;
  pointer-events: none;
}

#difficulty-options.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

#difficulty-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

#difficulty-options hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 6px 0;
}

#difficulty-options .select-all {
  font-weight: 600;
  color: #007bff;
}

/* Legenda & FAB tlačítka */
#legend {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 1500;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 10px 14px;
  width: 180px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#legend .gradient {
  width: 100%;
  height: 10px;
  background: linear-gradient(to right, #a8e6a3, #ffbf00, #ff3232);
  border-radius: 5px;
  margin-bottom: 8px;
}

#legend .labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 500;
  color: #333;
}

#locate-me,
#add-spot-fab {
  position: fixed;
  right: 20px;
  z-index: 1500;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s;
}

#locate-me {
  bottom: 85px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.9);
  color: #007bff;
  backdrop-filter: blur(8px);
}

#add-spot-fab {
  bottom: 140px;
  width: 50px;
  height: 50px;
  background: #28a745;
  color: white;
}

#locate-me:hover,
#add-spot-fab:hover {
  transform: scale(1.1);
}

/* =================================== */
/* 4. HLAVNÍ MENU & PROFIL BTN
/* =================================== */
#menu-toggle {
  position: fixed;
  bottom: 20px;
  left: 15px;
  z-index: 1500;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  color: #333;
  line-height: 44px;
  padding: 0;
}

#main-menu {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  max-width: 80%;
  background: #fff;
  z-index: 4000;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.2);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
}

#main-menu.visible {
  transform: translateX(0);
}

.menu-header {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-content {
  flex: 1;
  overflow-y: auto;
  padding: 15px 0;
}

.menu-link {
  display: block;
  padding: 12px 20px;
  border-bottom: 1px solid #f5f5f5;
  text-decoration: none;
  color: #222;
}

.menu-link strong {
  display: block;
  font-size: 16px;
  margin-bottom: 3px;
  font-weight: 600;
}

.menu-link span {
  font-size: 13px;
  color: #666;
}

.menu-link.active {
  color: #f0422b;
}

#menu-close {
  background: transparent;  /* Odstraní šedé pozadí */
  border: none;             /* Odstraní rámeček */
  box-shadow: none;         /* Odstraní případný stín */
  -webkit-appearance: none; /* Fix pro Safari/iOS */
  
  font-size: 28px;
  color: #555;
  cursor: pointer;
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  
  border-radius: 50%;       /* Kulaté při najetí */
  transition: background 0.2s, color 0.2s;
}

#menu-close:hover {
  background: #f0f0f0;      /* Jemné šedé kolečko při najetí */
  color: #000;
}

#profile-toggle {
  position: fixed;
  bottom: 75px;
  left: 15px;
  z-index: 1500;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: white;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

#mini-avatar {
  width: 80%;
  height: 80%;
  border-radius: 50%;
  object-fit: cover;
}

/* =================================== */
/* 5. MODÁLNÍ OKNA & LIGHTBOX
/* =================================== */

/* Detail Overlay */
#detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: 0.3s;
}

#detail-overlay.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#detail-modal {
  background: #fafafa;
  width: 100%;
  max-width: 900px;
  height: 90vh;
  border-radius: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

#detail-overlay.visible #detail-modal {
  transform: scale(1);
}

#detail-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  color: #777;
  z-index: 10;
  cursor: pointer;
  padding: 5px;
  font-weight: bold;
}

#detail-close:hover {
  color: #111;
}

#detail-content {
  flex: 1;
  overflow-y: auto;
}

/* Lightbox (Galerie) */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox-content {
  margin: auto;
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  animation: zoomIn 0.3s ease-out;
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

/* Modal pro Přidání spotu */
#add-spot-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  z-index: 5000 !important;
  display: none;
  align-items: center;
  justify-content: center;
}

/* =================================== */
/* 6. UI PRVKY: AUTH FORMS & ALERTY
/* =================================== */

/* Auth Formuláře (Sjednocené pro celou appku) */
#auth-container {
  background: #fff;
  border: 1px solid #e0e9f5;
  border-radius: 12px;
  padding: 25px;
  max-width: 400px;
  margin: 20px auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  text-align: center;
}

.auth-title {
  margin: 0 0 15px 0;
  font-weight: 600;
  text-align: center;
  font-size: 15px;
}

.auth-input {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 14px;
}

.auth-btn {
  width: 100%;
  padding: 10px 15px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  transition: opacity 0.2s;
}

.auth-btn:hover {
  opacity: 0.9;
}

.google-btn {
  background: #fff;
  color: #333;
  border: 1px solid #ddd;
  margin-bottom: 15px;
}

.email-btn {
  background: #007bff;
  color: white;
}

.register-btn {
  background: #28a745;
  color: white;
}

.auth-buttons-row {
  display: flex;
  gap: 10px;
}

.auth-separator {
  text-align: center;
  font-size: 12px;
  color: #888;
  margin: 10px 0 15px 0;
  position: relative;
}

.auth-separator::before,
.auth-separator::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 35%;
  height: 1px;
  background: #eee;
}

.auth-separator::before {
  left: 0;
}

.auth-separator::after {
  right: 0;
}

/* Toast Notifikace */
#toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: #333;
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: 0.3s;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  background: #28a745;
}

.toast.error {
  background: #dc3545;
}

/* Custom Confirm Modal */
.custom-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  z-index: 7000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: 0.2s;
}

.custom-modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.custom-modal-box {
  background: white;
  padding: 25px;
  border-radius: 16px;
  width: 90%;
  max-width: 350px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  text-align: center;
  transform: scale(0.9);
  transition: 0.2s;
}

.custom-modal-overlay.visible .custom-modal-box {
  transform: scale(1);
}

.custom-modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.modal-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

.modal-btn.confirm {
  background: #dc3545;
  color: white;
}

.modal-btn.cancel {
  background: #f0f0f0;
  color: #333;
}

/* Welcome Overlay (OPRAVENÝ SEZNAM) */
.welcome-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  padding: 20px;
}

.welcome-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.welcome-box {
  background: white;
  border-radius: 20px;
  padding: 30px;
  max-width: 450px;
  width: 100%;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  transform: scale(0.95);
  transition: 0.3s;
}

.welcome-overlay.visible .welcome-box {
  transform: scale(1);
}

.welcome-box h2 {
  margin: 0 0 20px 0;
  color: #222;
  font-size: 24px;
}

.welcome-content {
  text-align: left;
  color: #555;
  margin-bottom: 25px;
  line-height: 1.6;
  font-size: 15px;
}

.welcome-content ul {
  margin: 10px 0 20px 0;
  padding-left: 25px;
}

.welcome-content li {
  margin-bottom: 6px;
  list-style-type: disc;
}

.welcome-news {
  background: #f0f7ff;
  border: 1px solid #cce5ff;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  color: #004085;
  text-align: center;
}

.welcome-btn {
  background: #222;
  color: white;
  border: none;
  padding: 14px 30px;
  border-radius: 50px;
  cursor: pointer;
  width: 100%;
  margin-top: 25px;
  font-size: 16px;
  font-weight: 600;
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
  }
  to {
    transform: scale(1);
  }
}

/* Desktop úpravy */
@media (min-width: 768px) {
  .header h1 {
    font-size: 28px;
  }

  .content {
    padding: 0 20px;
    margin: 40px auto;
  }

  #search-bar {
    top: 18px;
    left: 65px;
    right: auto;
  }

  #search-bar input {
    width: 180px;
  }

  #difficulty-dropdown {
    top: 18px;
    right: 20px;
  }

  #legend {
    bottom: 25px;
    right: 25px;
    width: 200px;
  }

  #add-spot-fab {
    bottom: 150px;
    right: 25px;
  }

  #locate-me {
    bottom: 90px;
    right: 25px;
  }
}

/* =================================== */
/* ÚPRAVY PRO WELCOME & ONBOARDING TOUR (FINAL DESIGN)
/* =================================== */

/* --- 1. Welcome Modal (Úvodní okno) --- */
.welcome-box {
    border-radius: 24px;
    padding: 35px 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    border: 1px solid rgba(0,0,0,0.05);
    font-family: "Inter", sans-serif;
}

.welcome-box h2 {
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-size: 26px;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
    color: #111;
}

.welcome-box .welcome-icon {
    font-size: 50px; 
    display: block;
    margin-bottom: 20px;
    animation: wave 2s infinite;
    transform-origin: 70% 70%;
}

@keyframes wave {
    0% { transform: rotate( 0.0deg) }
    10% { transform: rotate(14.0deg) }  
    20% { transform: rotate(-8.0deg) }
    30% { transform: rotate(14.0deg) }
    40% { transform: rotate(-4.0deg) }
    50% { transform: rotate(10.0deg) }
    60% { transform: rotate( 0.0deg) }  
    100% { transform: rotate( 0.0deg) }
}

.welcome-news {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f0ff 100%);
    color: #0056b3;
    padding: 15px;
    border-radius: 16px;
    font-size: 13px;
    margin-top: 20px;
    line-height: 1.5;
}

.welcome-box .welcome-btn {
    border-radius: 50px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    border: none;
    cursor: pointer;
}

.welcome-box .welcome-btn:active {
    transform: scale(0.98);
}

#start-tour-btn {
    background: #007bff !important; 
    color: white !important;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}
#start-tour-btn:hover {
    background: #0069d9 !important;
}

#welcome-close-btn {
    background: #f7f7f7 !important;
    color: #555 !important;
    margin-top: 10px;
    box-shadow: none;
}
#welcome-close-btn:hover {
    background: #eeeeee !important;
    color: #333 !important;
}


/* --- 2. Driver.js Popover (Průvodce) --- */

/* Hlavní kontejner bubliny */
.driver-popover {
    background-color: #ffffff;
    color: #333;
    border-radius: 16px;
    padding: 24px 20px 20px 20px; /* Větší padding nahoře kvůli křížku */
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    border: 1px solid rgba(0,0,0,0.05);
    font-family: "Inter", sans-serif;
    max-width: 300px; /* Aby to nebylo moc široké */
}

/* Nadpis */
.driver-popover-title {
    font-family: "Poppins", sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #111;
    margin-bottom: 10px;
    line-height: 1.3;
}

/* Text popisu */
.driver-popover-description {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px; /* Více místa pod textem */
}

/* Zavírací KŘÍŽEK (X) vpravo nahoře */
/* Důležité: Resetujeme styly, aby nevypadal jako tlačítko */
button.driver-popover-close-btn {
    background: transparent !important;
    color: #aaa !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    width: 24px !important;
    height: 24px !important;
    font-size: 20px !important;
    top: 15px !important;
    right: 15px !important;
    position: absolute !important;
    border-radius: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

button.driver-popover-close-btn:hover {
    background: transparent !important;
    color: #000 !important;
}

/* Patička s tlačítky */
.driver-popover-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0;
}

/* Text postupu (1 z 6) */
.driver-popover-progress-text {
    font-size: 12px;
    color: #999;
    font-weight: 500;
}

/* --- Tlačítka v patičce (Dolní) --- */

/* Reset pro všechna tlačítka v patičce */
.driver-popover-footer button {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 14px !important; /* Zvětšeno z 13px */
    line-height: 1.2 !important;
    padding: 8px 18px !important; /* Širší tlačítka */
    border-radius: 8px !important;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    box-shadow: none !important;
    text-shadow: none !important; /* Důležité: Odstraní rozmazání textu */
    -webkit-font-smoothing: antialiased; /* Důležité: Ostré písmo */
    -moz-osx-font-smoothing: grayscale;
}

/* Tlačítko Další (Next) a Hotovo (Done) -> ČERNÉ */
.driver-popover-next-btn,
.driver-popover-done-btn {
    background-color: #111 !important; /* Téměř černá */
    color: #fff !important;
    border: 1px solid #111 !important;
    font-weight: 500 !important; /* Střední tučnost je čitelnější než bold */
    letter-spacing: 0.5px; /* Lehké roztažení pro čitelnost */
}

.driver-popover-next-btn:hover,
.driver-popover-done-btn:hover {
    background-color: #000 !important;
    transform: translateY(-1px);
}

/* Tlačítko Zpět (Prev) -> BÍLÉ s RÁMEČKEM */
.driver-popover-prev-btn {
    background-color: #fff !important;
    color: #222 !important; /* Tmavě šedá/černá místo světlé */
    border: 1px solid #ddd !important; /* Jemný rámeček */
    font-weight: 500 !important;
    margin-right: 8px; 
}

.driver-popover-prev-btn:hover {
    background-color: #f5f5f5 !important;
    border-color: #ccc !important;
    color: #000 !important;
}

/* Šipka bubliny (Arrow) - bílá */
.driver-popover-arrow-side-left.driver-popover-arrow { border-left-color: #fff; }
.driver-popover-arrow-side-right.driver-popover-arrow { border-right-color: #fff; }
.driver-popover-arrow-side-top.driver-popover-arrow { border-top-color: #fff; }
.driver-popover-arrow-side-bottom.driver-popover-arrow { border-bottom-color: #fff; }

/* =================================== */
/* EDGE MARKERS (UKAZATELE NA OKRAJI) - FIXED
/* =================================== */

/* 1. OBAL - Řeší pozici a rotaci (JS) */
.edge-marker-wrapper {
  position: absolute;
  width: 34px;
  height: 34px;
  z-index: 800;
  pointer-events: auto; /* Aby šlo klikat */
  display: flex;
  align-items: center;
  justify-content: center;
  /* Důležité: Transition jen pro left/top, ne pro transform (aby se to nehádalo) */
  transition: left 0.1s linear, top 0.1s linear; 
}

.edge-marker-wrapper:hover {
  z-index: 801; /* Při najetí nad ostatní */
}

/* 2. VIZUÁL - Řeší vzhled a zvětšování (CSS) */
.edge-marker-visual {
  width: 100%;
  height: 100%;
  background: white;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  cursor: pointer;
  border: 2px solid white;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Pružný efekt */
}

/* Zvětšení při najetí na OBAL */
.edge-marker-wrapper:hover .edge-marker-visual {
  transform: scale(1.2);
  border-color: #f0f0f0;
}

/* Šipka (trojúhelník) */
.edge-marker-visual::after {
  content: '';
  width: 0; 
  height: 0; 
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 8px solid currentColor; /* Barva z JS */
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
}

/* Číslo uvnitř */
.marker-count {
  font-size: 11px;
  font-weight: 800;
  color: #333;
  position: absolute;
  top: 50%;
  left: 50%;
  /* Transform se nastavuje v JS (protirotace), zde jen centrování */
  /* line-height: 1; */
  margin-top: 3px; 
}

#edge-markers-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 800;
  overflow: hidden;
}