/* === Cross-platform mobile / WebView polish (iOS Capacitor, Android, web) === */
html {
  height: 100%;
  overflow: hidden;
  background-color: #ffffff;
  -webkit-tap-highlight-color: transparent;
}

body {
  height: 100%;
  margin: auto;
  padding: 0;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
  -webkit-touch-callout: none;
  background-color: #ffffff;
}

.user-location-marker {
  background: transparent;
  border: 0;
}

.leaflet-ebmNavArrowPane-pane {
  z-index: 660;
  pointer-events: none;
}
.custom-nav-arrow {
  background: transparent;
  border: 0;
}

.leaflet-ebmRouteArrowsPane-pane {
  z-index: 556;
  pointer-events: none;
}

.leaflet-ebmGl-pane {
  z-index: 200;
  pointer-events: none;
}

.leaflet-rotate-pane {
  z-index: 400;
}

.leaflet-norotate-pane {
  z-index: 600;
}

.ebm-route-dir-arrow-icon {
  background: none !important;
  border: 0 !important;
}

.ebm-route-dir-arrow {
  position: relative;
  width: 14px;
  height: 18px;
  margin: 0 auto;
  filter: drop-shadow(0 0 0.6px rgba(0, 0, 0, 0.55));
  transform-origin: 50% 50%;
}

.ebm-route-dir-arrow svg {
  display: block;
  width: 14px;
  height: 18px;
}

.ebm-route-dir-arrow-tail {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 2px;
  height: 8px;
  margin-left: -1px;
  background: #ffffff;
  border-radius: 1px;
}

.ebm-route-dir-arrow-head {
  position: absolute;
  left: 50%;
  top: 0;
  width: 0;
  height: 0;
  margin-left: -4px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 6px solid #ffffff;
}

.user-location-wrap {
  position: relative;
  width: 44px;
  height: 44px;
}

.user-location-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  margin-top: -9px;
  border-radius: 50%;
  background: #0d6efd;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.35), 0 2px 8px rgba(0, 0, 0, 0.35);
}

.user-location-heading {
  display: none;
  position: absolute;
  left: 50%;
  top: 1px;
  width: 0;
  height: 0;
  margin-left: -9px;
  transform-origin: 9px 21px;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 20px solid #0d6efd;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.user-location-wrap.has-heading .user-location-heading {
  display: block;
}

/* Android WebView: scrolling HTML over a live MapLibre canvas stutters.
   Isolate panels and drop expensive blur; the GL canvas is paused from JS
   while a covering offcanvas is open, but #map stays visible for drawing. */
body.is-android-app .offcanvas-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  contain: layout paint;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}
body.is-android-app .offcanvas,
body.is-android-app .modern-map-toolbar,
body.is-android-app .ebm-nav-banner,
body.is-android-app .ebm-route-map-bar {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.is-android-app .user-location-heading {
  transition: none;
}

.ebm-offline-vip-storage {
  margin: 10px 0 4px;
  padding: 10px 12px;
  border: 1px solid rgba(13, 110, 253, 0.16);
  border-radius: 12px;
  background: rgba(13, 110, 253, 0.06);
  color: #1f2937;
  font-size: 0.84rem;
}

.ebm-offline-vip-storage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ebm-offline-vip-storage-row + .ebm-offline-vip-storage-row {
  margin-top: 6px;
}

.ebm-offline-vip-storage-row span {
  color: #4b5563;
}

.ebm-offline-vip-storage-row strong {
  white-space: nowrap;
}

button,
.btn,
.toolbar-btn,
.toolbar-label,
.offcanvas-header,
.accordion-button,
.list-group-item,
.filter-list label,
.modern-selector-label,
.lang-dropdown-link,
.poi-controls span,
[role="button"] {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

a,
button,
.btn,
.toolbar-btn,
.toolbar-item,
.offcanvas-header .btn-close,
.list-group-item,
.accordion-button,
input[type="checkbox"],
input[type="radio"],
label {
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

button,
.btn,
.toolbar-btn,
a {
  touch-action: manipulation;
}

input,
textarea,
select,
.form-control,
.form-select,
#chat-messages,
#stationDetailBody,
.leaflet-popup-content,
[contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}

.station-manufacturer-logo {
  display: inline-block;
  max-height: 50px;
  max-width: 170px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 3px;
  vertical-align: middle;
}

.station-manufacturer-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.offcanvas-body,
#poi-filter-container,
#chat-messages,
#filterPanel .offcanvas-body,
#suggest-results.search-suggest-dropdown {
  overscroll-behavior: contain;
}

.lang-dropdown-link {
  transition: background 0.2s;
}
.lang-dropdown-link:active {
  background-color: #f8f8f8 !important;
}
.lang-dropdown-link--active {
  background: #f0f0f0;
  font-weight: bold;
}

/* Only the link is fixed — #logo must stay in-flow so the white pad wraps pin + text. */
a:has(> #logo) {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  position: fixed;
  z-index: 1125;
  top: calc(8px + env(safe-area-inset-top));
  left: calc(10px + env(safe-area-inset-left));
  height: 46px;
  margin: 0;
  padding: 6px 14px;
  box-sizing: border-box;
  pointer-events: auto;
  /* Same glass as compass / layers controls */
  background: rgba(255, 255, 255, 0.92);
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  opacity: 0.72;
  transition: opacity 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
a:has(> #logo):hover {
  opacity: 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}
#logo {
  display: block !important;
  position: static;
  height: 34px;
  width: auto;
  max-width: min(220px, 40vw);
  max-height: none;
  margin: 0;
  object-fit: contain;
  object-position: left center;
}
@media (max-width: 760px) {
  #logo,
  a:has(> #logo) {
    display: none !important;
  }
}

body.ebm-nav-active #ebm-topbar,
body.ebm-nav-active #modern-map-toolbar,
body.ebm-nav-active #suggest-results,
body.ebm-nav-active .ebm-place-suggest,
body.ebm-nav-active .leaflet-popup {
  display: none !important;
}

.ebm-topbar {
  position: fixed;
  z-index: 1120;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) 8px calc(10px + env(safe-area-inset-left));
  pointer-events: none;
}
.ebm-topbar-search,
.ebm-topbar-menu,
.ebm-support-btn {
  pointer-events: auto;
}
.ebm-topbar-stack {
  flex: 0 1 900px;
  width: 100%;
  min-width: 0;
  max-width: 900px;
  margin: 0 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}
.ebm-topbar-search {
  flex: 0 1 auto;
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
}
.ebm-support-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  margin: 0;
  padding: 8px 14px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
  color: #1e3a5f;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.ebm-support-btn[hidden] {
  display: none !important;
}
.ebm-support-btn:hover {
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}
.ebm-support-btn:active {
  transform: translateY(0);
}
.ebm-support-btn-ico {
  color: #c2410c;
  font-size: 13px;
  flex-shrink: 0;
}
.ebm-support-btn span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 420px) {
  .ebm-support-btn {
    font-size: 12px;
    padding: 7px 11px;
    gap: 6px;
  }
}
.ebm-topbar-field {
  position: relative;
  display: flex;
  align-items: center;
  height: 46px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}
.ebm-topbar-search-ico {
  position: absolute;
  left: 14px;
  color: #64748b;
  font-size: 15px;
  pointer-events: none;
}
.ebm-topbar-input {
  display: block;
  width: 100%;
  height: 46px;
  border: 0;
  outline: none;
  box-shadow: none !important;
  background: transparent;
  padding: 0 168px 0 40px;
  font-size: 16px;
  color: #1e293b;
  border-radius: 14px;
}
.ebm-topbar-clear {
  position: absolute;
  right: 128px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #64748b;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ebm-topbar-clear[hidden] {
  display: none !important;
}
.ebm-topbar-mic {
  position: absolute;
  right: 88px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #334155;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.ebm-topbar-mic.is-listening {
  color: #fff;
  background: #dc3545;
  animation: ebm-mic-pulse 1.1s ease-in-out infinite;
}
@keyframes ebm-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(220, 53, 69, 0); }
}
.ebm-topbar-profile {
  position: absolute;
  right: 46px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: #e8eef5;
  color: #1e3a5f;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ebm-topbar-profile-face {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
}
.ebm-topbar-profile-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ebm-topbar-menu {
  position: absolute;
  right: 4px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #334155;
  box-shadow: none;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.ebm-ruler-ico {
  width: 22px;
  height: 22px;
  display: block;
}
.ebm-topbar-menu.is-open {
  background: #0d6efd;
  color: #fff;
}
.ebm-topbar-input {
  padding-right: 128px;
}
.ebm-topbar-clear {
  right: 88px;
}
.ebm-topbar {
  padding-left: calc(252px + env(safe-area-inset-left));
}
@media (max-width: 760px) {
  .ebm-topbar {
    padding-left: calc(10px + env(safe-area-inset-left));
  }
}
.offcanvas {
  z-index: 1200;
}
.offcanvas-backdrop {
  z-index: 1190;
}

/* Support / donate panel */
.ebm-support-header {
  background: linear-gradient(135deg, #fff7ed 0%, #f8fafc 100%);
  border-bottom: 1px solid rgba(194, 65, 12, 0.12);
}
.ebm-support-title-ico {
  color: #c2410c;
  margin-right: 4px;
}
.ebm-support-body {
  background: linear-gradient(180deg, #fffefb 0%, #f8fafc 48%, #f1f5f9 100%);
}
.ebm-support-hero {
  margin-bottom: 1.1rem;
}
.ebm-support-lead,
.ebm-support-text {
  font-size: 0.92rem;
  line-height: 1.55;
  color: #334155;
  margin-bottom: 0.75rem;
}
.ebm-support-thanks {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 0;
}
.ebm-support-qr-card {
  background: #fff;
  border: 1px solid rgba(30, 58, 95, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  padding: 1rem 1rem 1.15rem;
  text-align: center;
  margin-bottom: 1rem;
}
.ebm-support-scan {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.85rem;
}
.ebm-support-qr-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.ebm-support-qr {
  display: block;
  width: min(220px, 68vw);
  height: auto;
  max-width: 100%;
}
.ebm-support-details {
  background: #fff;
  border: 1px solid rgba(30, 58, 95, 0.08);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}
.ebm-support-row + .ebm-support-row {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid #eef2f7;
}
.ebm-support-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.3rem;
}
.ebm-support-value {
  display: block;
  font-size: 0.95rem;
  color: #1e293b;
  font-weight: 600;
}
.ebm-support-iban-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}
.ebm-support-iban {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  word-break: break-all;
}
.ebm-support-copy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 10px;
  background: #1e3a5f;
  color: #fff;
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  white-space: nowrap;
}
.ebm-support-copy:hover {
  background: #16304f;
  color: #fff;
}
.ebm-support-copy.is-copied {
  background: #15803d;
}
.ebm-support-copy.is-copy-fail {
  background: #b91c1c;
}
.ebm-support-legal {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #475569;
  background: rgba(255, 247, 237, 0.7);
  border-left: 3px solid #c2410c;
  border-radius: 0 10px 10px 0;
  padding: 0.75rem 0.9rem;
  margin: 0;
}
.ebm-support-dismiss {
  display: block;
  width: 100%;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
  padding: 0.35rem 0.25rem;
  border: none;
  background: none;
  color: #6c757d;
  font-size: 0.72rem;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.ebm-support-dismiss:hover,
.ebm-support-dismiss:focus {
  color: #495057;
  text-decoration: underline;
}
.ebm-support-bank[hidden] {
  display: none !important;
}
.ebm-support-stripe {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(99, 91, 255, 0.08) 0%, rgba(255, 255, 255, 0.95) 42%, #fff 100%);
  border: 1px solid rgba(99, 91, 255, 0.18);
  border-radius: 18px;
  padding: 1rem 1rem 1.05rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 28px rgba(99, 91, 255, 0.08);
}
.ebm-support-stripe[hidden] {
  display: none !important;
}
.ebm-support-stripe-head {
  margin-bottom: 0.7rem;
}
.ebm-support-stripe-title {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #0f172a;
  margin: 0;
}
.ebm-support-stripe-sub {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0.2rem 0 0;
}
.ebm-support-stripe-methods {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.45rem;
  margin-bottom: 0.85rem;
}
.ebm-support-stripe-methods .ebm-pay-logo {
  display: block;
  width: 52px;
  height: 34px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
  background: #fff;
}
.ebm-support-stripe-methods-text {
  flex: 1 1 100%;
  font-size: 0.72rem;
  color: #64748b;
}
.ebm-support-stripe-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.ebm-support-stripe-btn {
  flex: 1 1 auto;
  min-width: 4.5rem;
  border: 1px solid rgba(99, 91, 255, 0.28);
  border-radius: 12px;
  background: #fff;
  color: #312e81;
  font-weight: 800;
  padding: 0.58rem 0.75rem;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.ebm-support-stripe-btn:hover {
  background: rgba(99, 91, 255, 0.08);
  border-color: #635bff;
  color: #312e81;
  transform: translateY(-1px);
}
.ebm-support-stripe-btn:disabled,
.ebm-support-stripe-pay:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}
.ebm-support-stripe-custom-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}
.ebm-support-stripe-input {
  flex: 1 1 7rem;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  background: #fff;
}
.ebm-support-stripe-input:focus {
  outline: 2px solid rgba(99, 91, 255, 0.28);
  outline-offset: 1px;
  border-color: #635bff;
}
.ebm-support-stripe-pay {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #635bff 0%, #4f46e5 100%);
  color: #fff;
  font-weight: 800;
  padding: 0.55rem 1rem;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(99, 91, 255, 0.28);
}
.ebm-support-stripe-pay:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #fff;
}
.ebm-support-stripe-hint {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0.45rem 0 0;
}
.ebm-support-stripe-status {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.65rem 0 0;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
}
.ebm-support-stripe-status.is-ok {
  color: #166534;
  background: #dcfce7;
}
.ebm-support-stripe-status.is-cancel,
.ebm-support-stripe-status.is-err {
  color: #9a3412;
  background: #ffedd5;
}

.ebm-operator-imprint .ebm-operator-block {
  line-height: 1.55;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}
.ebm-operator-imprint .ebm-operator-block a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* SweetAlert2 above offcanvas / lightbox / finder (esp. mobile Capacitor) */
.swal2-container {
  z-index: 40000 !important;
}

#map {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  touch-action: none;
}
body.ebm-rd-drawing,
body.ebm-rd-drawing #map,
#map.ebm-rd-drawing,
#map.ebm-rd-drawing *,
.leaflet-container.ebm-rd-drawing,
.leaflet-container.ebm-rd-drawing * {
  touch-action: none !important;
}

/* Krok späť – prejazdy (nad dlaždicami, pod UI mapy kde treba) */
.elegant-undo-btn {
  position: absolute;
  bottom: calc(30px + env(safe-area-inset-bottom));
  left: calc(15px + env(safe-area-inset-left));
  z-index: 1000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #ffffff;
  color: #333333;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  font-size: 18px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 0;
}

.ebm-map-compass {
  position: fixed;
  top: calc(74px + env(safe-area-inset-top));
  left: calc(12px + env(safe-area-inset-left));
  z-index: 1000;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.ebm-map-compass.is-rotated {
  opacity: 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.ebm-map-compass-needle {
  position: relative;
  width: 16px;
  height: 32px;
  transform-origin: 50% 50%;
  will-change: transform;
}

.ebm-map-compass-needle::before,
.ebm-map-compass-needle::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 0;
  height: 0;
  margin-left: -5px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
}

.ebm-map-compass-needle::before {
  top: 11px;
  border-bottom: 9px solid #d32f2f;
}

.ebm-map-compass-needle::after {
  bottom: 1px;
  border-top: 9px solid #5a5a5a;
}

.ebm-map-compass-n {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  color: #d32f2f;
  letter-spacing: 0;
  z-index: 1;
}

body.ebm-overlay-open .ebm-map-compass {
  visibility: visible;
}

.ebm-map-compass-lock {
  display: none;
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #0d6efd;
  color: #fff;
  font-size: 8px;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
}
.ebm-map-compass.is-locked {
  opacity: 1;
  box-shadow: 0 0 0 2px #0d6efd, 0 4px 10px rgba(0, 0, 0, 0.2);
}
.ebm-map-compass.is-locked .ebm-map-compass-lock {
  display: flex;
}

.ebm-map-layers-btn {
  position: fixed;
  top: calc(178px + env(safe-area-inset-top));
  left: calc(12px + env(safe-area-inset-left));
  z-index: 1000;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  color: #333333;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.92;
  -webkit-tap-highlight-color: transparent;
}

body.ebm-overlay-open .ebm-map-layers-btn {
  visibility: visible;
}

/* Moja poloha – medzi kompasom a vrstvami (predtým v menu). */
.ebm-map-locate-btn {
  position: fixed;
  top: calc(126px + env(safe-area-inset-top));
  left: calc(12px + env(safe-area-inset-left));
  z-index: 1000;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  color: #333333;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.92;
  -webkit-tap-highlight-color: transparent;
}
.ebm-map-locate-btn.location-active {
  animation: none;
  background: #0d6efd;
  color: #ffffff !important;
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.35), 0 4px 12px rgba(13, 110, 253, 0.35);
}
body.ebm-overlay-open .ebm-map-locate-btn {
  visibility: visible;
}

/* 3D pohľad – medzi vrstvami a radarom. */
.ebm-map-3d-btn {
  position: fixed;
  top: calc(230px + env(safe-area-inset-top));
  left: calc(12px + env(safe-area-inset-left));
  z-index: 1000;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  color: #333333;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.92;
  -webkit-tap-highlight-color: transparent;
}
.ebm-map-3d-txt {
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}
body.ebm-overlay-open .ebm-map-3d-btn {
  visibility: visible;
}

.ebm-map-radar-btn {
  position: fixed;
  top: calc(282px + env(safe-area-inset-top));
  left: calc(12px + env(safe-area-inset-left));
  z-index: 1000;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  color: #333333;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.92;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.ebm-map-radar-btn.is-active {
  background: #2563eb;
  color: #fff;
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35), 0 4px 12px rgba(37, 99, 235, 0.35);
}
body.ebm-overlay-open .ebm-map-radar-btn {
  visibility: visible;
}

#map .leaflet-bottom.leaflet-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
#map .leaflet-bottom.leaflet-right .leaflet-control {
  float: none;
  clear: none;
}
#map .leaflet-control-zoom {
  margin: 0 calc(10px + env(safe-area-inset-right)) 8px 0 !important;
  border: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
#map .leaflet-control-zoom a {
  width: 44px;
  height: 44px;
  line-height: 42px;
  font-size: 22px;
  color: #334155;
}
#map .leaflet-control-zoom-in {
  border-bottom: 1px solid #e5e7eb;
}

/* Spodný panel trasy na mape: + / − a mierka 8 px nad ním (ako medzery tlačidiel vľavo), tlačidlo (i) ostáva dole.
   Výšku nastavuje ebmSyncMapBottomUi (app.js); .leaflet-bottom je už posunutý o safe-area-inset-bottom (index.html). */
body.ebm-map-bottom-ui #map .leaflet-bottom.leaflet-right .leaflet-control-zoom {
  position: absolute;
  right: 0;
  bottom: calc(var(--ebm-map-bottom-ui, 0px) + 8px - env(safe-area-inset-bottom));
  margin-bottom: 0 !important;
}
body.ebm-map-bottom-ui #map .leaflet-bottom.leaflet-left .leaflet-control-scale {
  position: absolute;
  left: 0;
  bottom: calc(var(--ebm-map-bottom-ui, 0px) + 8px - env(safe-area-inset-bottom));
  margin-bottom: 0;
}

/* Atribúcia v pravom dolnom rohu: (i) vpravo, po kliknutí text v jednom riadku vľavo od ikony */
#map .leaflet-control-container,
#map .leaflet-bottom.leaflet-right,
#map .leaflet-bottom.leaflet-right .leaflet-control.leaflet-control-attribution {
  overflow: visible;
}
#map .leaflet-bottom.leaflet-right .leaflet-control.leaflet-control-attribution {
  margin: 0 calc(10px + env(safe-area-inset-right)) 10px 0 !important;
  max-width: none;
  background: transparent !important;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  z-index: 1001;
}
#map .leaflet-control.leaflet-control-attribution .ebm-map-attrib {
  position: relative;
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 0.68rem;
  line-height: 1.2;
  vertical-align: middle;
  max-width: none;
}
#map .leaflet-control-attribution .ebm-map-attrib-summary {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
#map .leaflet-control-attribution .ebm-map-attrib-summary .fa-info-circle {
  font-size: 0.95rem;
  line-height: 1;
}
#map .leaflet-control-attribution .ebm-map-attrib-summary::-webkit-details-marker,
#map .leaflet-control-attribution .ebm-map-attrib-summary::marker {
  display: none;
}
#map .leaflet-control.leaflet-control-attribution .ebm-map-attrib-body {
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(calc(100vw - 56px), 85vw);
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  z-index: 2000;
  background: rgba(255, 255, 255, 0.97) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  border-radius: 6px;
  padding: 4px 8px;
  text-align: left;
  margin: 0;
  border: 1px solid rgba(0, 0, 0, 0.06);
  pointer-events: auto;
  -webkit-overflow-scrolling: touch;
}
#map .leaflet-control.leaflet-control-attribution .ebm-map-attrib .ebm-map-attrib-body a {
  white-space: nowrap;
  word-break: normal;
}

.map-icons {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: white;
  padding: 8px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 1000;
}

.map-icons i {
  font-size: 24px;
  color: #333;
  cursor: pointer;
  transition: color 0.2s;
  width: 30px;
  text-align: center;
}

.offline-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 12px;
}
.offline-section h3 i {
    margin-right: 4px;
}
.offline-section .btn i {
    margin-right: 4px;
}
.offline-section .progress {
    background-color: #e9ecef;
    border-radius: 999px;
    overflow: hidden;
}
.offline-section #offline-progress-bar {
    transition: width 0.2s ease;
}
.offline-section #offline-stored {
    word-break: break-word;
}
.offline-section button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

#offlineMapsPanel #offline-vip-section {
    padding: 0;
}
#offlineMapsPanel .ebm-offline-vip-list {
    max-height: none;
    overflow: visible;
}
.ebm-offline-vip-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: min(62vh, 520px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.ebm-offline-vip-country {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}
.ebm-offline-vip-country.is-expanded {
    border-color: #b6d4fe;
    box-shadow: 0 1px 0 rgba(13, 110, 253, 0.08);
}
.ebm-offline-vip-country.is-downloading {
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
}
.ebm-offline-vip-country.is-downloading .ebm-offline-vip-country-hd {
    background: linear-gradient(90deg, rgba(13, 110, 253, 0.06) 0%, rgba(13, 110, 253, 0.02) 100%);
}
.ebm-offline-vip-layer.is-downloading {
    background: rgba(13, 110, 253, 0.08);
}
.ebm-offline-vip-layer.is-downloading .ebm-offline-vip-layer-name {
    color: #0d6efd;
    font-weight: 600;
}
.ebm-offline-vip-country-dl {
    padding: 0 8px 8px;
    background: #f8fafc;
    border-top: 1px solid #eef1f4;
}
.ebm-offline-vip-country-dl .progress {
    height: 6px;
    background-color: #e9ecef;
}
.ebm-offline-vip-country-dl-label {
    font-size: 0.68rem;
    color: #0d6efd;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ebm-offline-vip-country-dl-label .fa-spin {
    font-size: 0.75rem;
}
.ebm-offline-vip-progress-card {
    background: #f0f7ff;
    border: 1px solid #b6d4fe;
    border-radius: 10px;
    padding: 10px 12px;
}
#offline-vip-cancel-btn {
    flex-shrink: 0;
    touch-action: manipulation;
    cursor: pointer;
    position: relative;
    z-index: 2;
}
#offline-vip-cancel-btn:disabled {
    opacity: 0.55;
    cursor: wait;
}
.ebm-offline-vip-progress-track {
    height: 10px;
    background-color: #dbeafe;
    border-radius: 999px;
    overflow: hidden;
}
.ebm-offline-vip-progress-track .progress-bar {
    transition: width 0.25s ease;
}
.ebm-offline-vip-progress-track.is-indeterminate .progress-bar {
    width: 40% !important;
    animation: ebm-offline-vip-indeterminate 1.2s ease-in-out infinite;
}
@keyframes ebm-offline-vip-indeterminate {
    0% { margin-left: 0; }
    50% { margin-left: 60%; }
    100% { margin-left: 0; }
}
.ebm-offline-vip-progress-spin {
    margin-top: 2px;
    flex-shrink: 0;
}
#offlineMapsPanel .ebm-offline-vip-progress {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #fff;
    padding-bottom: 4px;
}
.ebm-offline-vip-country-hd {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 6px 8px 8px;
    cursor: pointer;
    user-select: none;
    min-height: 44px;
    max-width: 100%;
}
.ebm-offline-vip-flag {
    width: 28px;
    height: 21px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ebm-offline-vip-flag-img {
    width: 28px;
    height: 21px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    display: block;
}
.ebm-offline-vip-flag-fallback {
    display: block;
    width: 28px;
    height: 21px;
    border-radius: 3px;
    background: #e9ecef;
}
.ebm-offline-vip-country-main {
    flex: 1;
    min-width: 0;
}
.ebm-offline-vip-country-name {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
}
.ebm-offline-vip-country-meta {
    font-size: 0.72rem;
    color: #6c757d;
    margin-top: 2px;
    line-height: 1.3;
    word-break: break-word;
}
.ebm-offline-vip-country-meta .text-warning {
    color: #b78103 !important;
}
.ebm-offline-vip-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}
.ebm-offline-vip-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: #0d6efd;
    border-radius: 8px;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
}
.ebm-offline-vip-icon-btn i {
    font-size: 1rem;
    line-height: 1;
    pointer-events: none;
}
.ebm-offline-vip-icon-btn:active {
    background: rgba(13, 110, 253, 0.1);
}
.ebm-offline-vip-icon-btn.is-done {
    color: #198754;
    cursor: default;
}
.ebm-offline-vip-icon-btn.is-update {
    color: #b78103;
}
.ebm-offline-vip-icon-btn:disabled {
    opacity: 0.45;
    pointer-events: none;
}
.ebm-offline-vip-chevron {
    color: #adb5bd;
    font-size: 0.75rem;
    width: 24px;
    text-align: center;
    transition: transform 0.15s ease;
}
.ebm-offline-vip-country.is-expanded .ebm-offline-vip-chevron {
    transform: rotate(90deg);
}
.ebm-offline-vip-layers {
    display: none;
    border-top: 1px solid #eef1f4;
    padding: 4px 8px 8px;
    background: #f8fafc;
}
.ebm-offline-vip-country.is-expanded .ebm-offline-vip-layers {
    display: block;
}
.ebm-offline-vip-layer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 2px 6px 6px;
    border-radius: 8px;
    max-width: 100%;
}
.ebm-offline-vip-layer + .ebm-offline-vip-layer {
    border-top: 1px solid #eef1f4;
}
.ebm-offline-vip-layer-status {
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}
.ebm-offline-vip-layer-status.is-current {
    color: #198754;
}
.ebm-offline-vip-layer-status.is-outdated {
    color: #b78103;
}
.ebm-offline-vip-layer-status.is-missing {
    color: #ced4da;
}
.ebm-offline-vip-layer-info {
    flex: 1;
    min-width: 0;
}
.ebm-offline-vip-layer-name {
    font-size: 0.82rem;
    line-height: 1.25;
}
.ebm-offline-vip-layer-sub {
    font-size: 0.68rem;
    color: #6c757d;
}
.ebm-offline-vip-layer.is-required .ebm-offline-vip-layer-sub::before {
    content: "";
}
.ebm-offline-vip-progress .progress {
    background-color: #e9ecef;
}

#nav-info-panel {
    position: absolute;
    bottom: calc(20px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border-radius: 10px;
}

@media (max-width: 576px) {
    .map-icons { top: 60px; right: 10px; }
    .leaflet-control-zoom { display: block; }
}

.elevation-hover-marker {
    background-color: #dc3545;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0,0,0,0.5);
    width: 14px !important;
    height: 14px !important;
    margin-left: -7px !important;
    margin-top: -7px !important;
}


.location-active {
    color: #0d6efd !important;
    animation: pulse-blue 2s infinite;
}

@keyframes pulse-blue {
    0% { transform: scale(1); text-shadow: 0 0 0 rgba(13, 110, 253, 0.7); }
    50% { transform: scale(1.2); text-shadow: 0 0 10px rgba(13, 110, 253, 0); }
    100% { transform: scale(1); text-shadow: 0 0 0 rgba(13, 110, 253, 0); }
}

@keyframes pulse-ring {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.weather-marker-container {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ccc;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    padding: 2px;
    font-family: Arial, sans-serif;
    font-size: 10px;
    width: 50px !important;
    height: auto !important;
    margin-left: -25px !important;
    margin-top: -25px !important;
}
.weather-marker-container img {
    width: 30px;
    height: 30px;
    display: block;
    margin: 0 auto;
}
.weather-temp {
    font-weight: bold;
    color: #333;
}

/* Kompaktný navigačný panel (spustitNavigacnyRezim) – spodný panel */
.ebm-nav-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    transform: none;
    width: 100%;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #1f2937;
    border-top: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -6px 26px rgba(15, 23, 42, 0.16);
    padding: 0;
    font-size: 0.82rem;
    line-height: 1.25;
    pointer-events: auto;
}
.ebm-nav-inner {
    max-height: min(46vh, 340px);
    max-height: min(46dvh, 340px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 9px max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left));
}
.ebm-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(248, 250, 252, 0.92);
}
.ebm-nav-camera,
.ebm-nav-voice {
    position: static;
    top: auto;
    right: auto;
    z-index: 2;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    padding: 0;
    line-height: 1;
    border: none;
    border-radius: 14px;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ebm-nav-camera {
    background: #ecfdf3;
    color: #047857;
}
.ebm-nav-camera.d-none {
    display: none !important;
}
.ebm-nav-camera:active {
    background: #d1fae5;
}
.ebm-nav-voice {
    background: #e7f0ff;
    color: #0d6efd;
}
.ebm-nav-voice.is-off {
    background: #eef1f5;
    color: #9aa3af;
}
.ebm-nav-voice:active {
    background: #d7e5ff;
}
.ebm-nav-pause,
.ebm-nav-end {
    flex: 1 1 0;
    min-width: 0;
    height: 46px;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 8px;
    white-space: nowrap;
}
.ebm-nav-pause {
    background: #fef3c7;
    color: #92400e;
}
.ebm-nav-pause.is-paused {
    background: #dcfce7;
    color: #166534;
}
.ebm-nav-pause:active {
    filter: brightness(0.96);
}
.ebm-nav-end {
    background: #fee2e2;
    color: #b91c1c;
}
.ebm-nav-end:disabled {
    background: #eef1f5;
    color: #9aa3af;
    pointer-events: none;
    opacity: 0.7;
}
.ebm-nav-end:not(:disabled):active {
    background: #fecaca;
}
.ebm-nav-banner--paused .ebm-nav-turn {
    opacity: 0.55;
}
.ebm-nav-muted {
    color: #6b7280;
}
.ebm-nav-warn {
    color: #b45309;
}
.ebm-nav-climb {
    color: #9a3412;
    font-weight: 700;
}
.ebm-nav-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    align-items: baseline;
}
.ebm-nav-stat {
    white-space: nowrap;
}
.ebm-nav-stat-lbl {
    color: #6b7280;
    font-size: 0.7rem;
    margin-right: 2px;
}
.ebm-nav-stat--dest {
    flex: 1 1 120px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ebm-nav-turn {
    margin-top: 6px;
    font-weight: 600;
    font-size: 1.05rem;
    text-align: center;
    color: #111827;
    line-height: 1.35;
}
.ebm-nav-turn-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    width: 100%;
}
.ebm-nav-turn-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
}
.ebm-nav-turn-right {
    width: 100%;
    min-width: 0;
    text-align: center;
}
.ebm-nav-turn-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
}
.ebm-nav-turn-text {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.3;
    color: #111827;
}
.ebm-nav-turn-dist {
    font-size: 1.08rem;
    font-weight: 600;
    color: #0b5ed7;
    line-height: 1.25;
}
.ebm-nav-turn-main {
    font-size: 1.32rem;
    font-weight: 700;
    line-height: 1.38;
    color: #111827;
    max-width: 100%;
}
.ebm-nav-then {
    margin-top: 3px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #4b5563;
    line-height: 1.3;
}
.ebm-nav-hint-ico {
    margin-right: 6px;
    color: #b45309;
    font-size: 0.92em;
    vertical-align: -1px;
}
.ebm-nav-turn-straight,
.ebm-nav-turn-generic {
    font-size: 1.75rem;
    color: #0d6efd;
}
.ebm-nav-itin-icon {
    display: inline-flex;
    vertical-align: middle;
    margin-right: 4px;
    width: 22px;
    justify-content: center;
}
.ebm-nav-turn .ebm-nav-turn-dist {
    display: inline-block;
    background: #eaf1ff;
    color: #0b5ed7;
    border-radius: 6px;
    padding: 1px 7px;
    font-size: 0.72rem;
    font-weight: 700;
    vertical-align: middle;
}
.ebm-nav-back-arrow {
    display: inline-block;
    color: #b45309;
}
.ebm-nav-back-dir {
    display: inline-block;
    font-weight: 600;
    color: #b45309;
    white-space: nowrap;
}
.ebm-nav-hints {
    margin-top: 2px;
    font-size: 0.92rem;
    color: #4b5563;
    text-align: center;
    line-height: 1.3;
}
.ebm-nav-hint-line + .ebm-nav-hint-line {
    margin-top: 4px;
}
#nav-itinerary-details {
    margin-top: 4px;
    border-top: 1px solid rgba(15, 23, 42, 0.1);
}
.nav-itin-step {
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}
.ebm-nav-itin-next {
    color: #0b5ed7;
}
.ebm-nav-itin-done {
    opacity: 0.55;
}
#nav-itinerary-details > summary {
    font-size: 0.72rem;
    padding: 3px 0;
}
#nav-itinerary-list {
    max-height: min(28vh, 180px) !important;
    font-size: 0.72rem !important;
    overflow-y: auto;
}
@media (max-width: 380px) {
    .ebm-nav-banner {
        font-size: 0.78rem;
    }
    .ebm-nav-pause,
    .ebm-nav-end {
        font-size: 0.82rem;
        gap: 4px;
    }
    .ebm-nav-camera,
    .ebm-nav-voice,
    .ebm-nav-pause,
    .ebm-nav-end {
        height: 44px;
    }
    .ebm-nav-camera,
    .ebm-nav-voice {
        width: 44px;
        flex-basis: 44px;
    }
    .ebm-nav-stats {
        gap: 3px 7px;
    }
}
@media (orientation: landscape) {
    .ebm-nav-banner {
        font-size: 0.92rem;
        line-height: 1.3;
    }
    .ebm-nav-inner {
        max-height: min(62vh, 210px);
        max-height: min(62dvh, 210px);
        padding: 7px max(12px, env(safe-area-inset-right)) 6px max(12px, env(safe-area-inset-left));
    }
    .ebm-nav-actions {
        padding: 6px max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
        gap: 7px;
    }
    .ebm-nav-stats {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 3px 14px;
        font-size: 0.88rem;
    }
    .ebm-nav-stats::-webkit-scrollbar {
        display: none;
    }
    .ebm-nav-stat--dest {
        flex: 0 1 auto;
        white-space: nowrap;
    }
    .ebm-nav-stat-lbl {
        font-size: 0.78rem;
    }
    .ebm-nav-turn {
        margin-top: 0;
        font-size: 1rem;
    }
    .ebm-nav-turn-wrap {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        margin-top: 4px;
        width: 100%;
    }
    .ebm-nav-turn {
        width: auto;
        max-width: 100%;
    }
    .ebm-nav-turn-row {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 12px;
        text-align: center;
        width: auto;
        max-width: 100%;
    }
    .ebm-nav-turn-left {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 10px;
        flex-shrink: 0;
        width: auto;
    }
    .ebm-nav-turn-icon {
        width: 52px;
        height: 52px;
    }
    .ebm-nav-turn-right {
        flex: 0 1 auto;
        min-width: 0;
        text-align: center;
        width: auto;
    }
    .ebm-nav-turn-main {
        font-size: 1.48rem;
        line-height: 1.28;
        text-align: center;
    }
    .ebm-nav-then {
        font-size: 1.05rem;
        text-align: center;
    }
    .ebm-nav-turn .ebm-nav-turn-dist {
        font-size: 1.22rem;
        padding: 3px 10px;
        white-space: nowrap;
    }
    .ebm-nav-turn-straight,
    .ebm-nav-turn-generic {
        font-size: 1.75rem;
    }
    #nav-extra-hints.ebm-nav-hints {
        margin-top: 0;
        font-size: 1.05rem;
        text-align: center;
        line-height: 1.28;
        width: auto;
        max-width: 100%;
        padding-left: 0;
    }
    #nav-itinerary-details {
        margin-top: 3px;
    }
    #nav-itinerary-details > summary {
        font-size: 0.78rem;
        padding: 2px 0;
    }
    #nav-itinerary-list {
        max-height: min(30vh, 120px) !important;
        max-height: min(30dvh, 120px) !important;
        font-size: 0.78rem !important;
    }
    body.ebm-nav-active #map {
        top: 0;
        right: 0;
        bottom: 0;
        left: 50%;
        width: 50%;
        height: 100%;
    }
    body.ebm-nav-active .ebm-nav-banner {
        top: 0;
        bottom: 0;
        left: 0;
        right: auto;
        width: 50%;
        height: 100%;
        max-height: none;
        border-radius: 0;
        border-top: none;
        border-right: 1px solid rgba(15, 23, 42, 0.08);
        box-shadow: 8px 0 28px rgba(15, 23, 42, 0.14);
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
    }
    body.ebm-nav-active .ebm-nav-inner {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: max(10px, env(safe-area-inset-top)) 12px 8px max(12px, env(safe-area-inset-left));
    }
    body.ebm-nav-active .ebm-nav-turn-wrap {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        width: 100%;
        margin-top: 6px;
    }
    body.ebm-nav-active .ebm-nav-turn,
    body.ebm-nav-active .ebm-nav-turn-row,
    body.ebm-nav-active .ebm-nav-turn-left,
    body.ebm-nav-active .ebm-nav-turn-right {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        text-align: center;
        gap: 8px;
    }
    body.ebm-nav-active .ebm-nav-turn-icon {
        width: 68px;
        height: 68px;
    }
    body.ebm-nav-active .ebm-nav-turn-icon svg {
        width: 68px;
        height: 68px;
    }
    body.ebm-nav-active .ebm-nav-turn-straight,
    body.ebm-nav-active .ebm-nav-turn-generic {
        font-size: 2.35rem;
    }
    body.ebm-nav-active .ebm-nav-turn .ebm-nav-turn-dist {
        display: block;
        font-size: 1.42rem;
        line-height: 1.2;
        padding: 3px 12px;
        white-space: nowrap;
    }
    body.ebm-nav-active .ebm-nav-turn-main {
        font-size: 1.22rem;
        line-height: 1.28;
        text-align: center;
    }
    body.ebm-nav-active .ebm-nav-then {
        display: block;
        margin-top: 2px;
        font-size: 1.05rem;
        text-align: center;
    }
    body.ebm-nav-active #nav-extra-hints.ebm-nav-hints {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        width: 100%;
        margin-top: 2px;
        font-size: 1.02rem;
        line-height: 1.3;
        text-align: center;
    }
    body.ebm-nav-active .ebm-nav-hint-line {
        display: block;
        width: 100%;
        text-align: center;
    }
    body.ebm-nav-active .ebm-nav-actions {
        flex: 0 0 auto;
        flex-wrap: wrap;
        padding: 8px 12px max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    }
    body.ebm-nav-active .ebm-nav-stats {
        flex-wrap: wrap;
        overflow: visible;
    }
    body.ebm-nav-active #nav-itinerary-list {
        max-height: min(28vh, 180px) !important;
        max-height: min(28dvh, 180px) !important;
    }
    body.ebm-nav-active #map .leaflet-top.leaflet-right {
        margin-top: env(safe-area-inset-top);
        margin-right: env(safe-area-inset-right);
    }
    body.ebm-nav-active #map .leaflet-bottom.leaflet-right,
    body.ebm-nav-active #map .leaflet-bottom.leaflet-left {
        margin-bottom: env(safe-area-inset-bottom) !important;
    }
}

/* Odhad povrchu trasy (ORS) – prémiový panel, zapína sa ENABLE_SURFACE_ANALYSIS v route.js */
.route-surface-card {
  padding: 10px 12px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}
.route-surface-title {
  font-size: 0.85rem;
  color: #343a40;
}

.route-chargers-card {
  padding: 10px 12px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}
.route-chargers-details > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  position: sticky;
  top: -1px;
  z-index: 2;
  background: #f8f9fa;
  padding: 2px 0 8px;
}
.route-chargers-details > summary::-webkit-details-marker {
  display: none;
}
.route-chargers-details > summary::before {
  content: "▸";
  color: #6c757d;
  font-size: 0.85rem;
  line-height: 1.4;
  margin-top: 1px;
}
.route-chargers-details[open] > summary::before {
  content: "▾";
}
.route-chargers-list {
  margin-top: 2px;
  overflow: visible;
  max-height: none;
  touch-action: pan-y;
}
.route-chargers-item {
  padding: 12px 0;
  border-top: 1px solid #e9ecef;
}
.route-chargers-item:first-child {
  border-top: 0;
  padding-top: 4px;
}
.route-chargers-name {
  font-size: 0.86rem;
}
.route-chargers-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  font-size: 0.75rem;
  color: #6c757d;
}
.route-chargers-batt-ok { color: #198754; }
.route-chargers-batt-warn { color: #b8860b; }
.route-chargers-batt-low { color: #dc3545; font-weight: 700; }
.route-chargers-actions .btn {
  font-size: 0.75rem;
}
.route-surface-bar {
  display: flex;
  width: 100%;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
  background: #dee2e6;
}
.route-surface-seg {
  min-width: 2px;
  height: 100%;
  transition: filter 0.15s ease;
}
.route-surface-seg--paved {
  background: #6c757d;
}
.route-surface-seg--gravel {
  background: #8d6e63;
}
.route-surface-seg--dirt {
  background: #5d4037;
}
.route-surface-seg--natural {
  background: #2e7d32;
}
.route-surface-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
  align-items: center;
}
.route-surface-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: #495057;
}
.route-surface-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.route-surface-swatch.route-surface-seg--paved {
  background: #6c757d;
}
.route-surface-swatch.route-surface-seg--gravel {
  background: #8d6e63;
}
.route-surface-swatch.route-surface-seg--dirt {
  background: #5d4037;
}
.route-surface-swatch.route-surface-seg--natural {
  background: #2e7d32;
}
.route-slope-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.route-slope-swatch--flat {
  background: #0d6efd;
}
.route-slope-swatch--moderate {
  background: #fd7e14;
}
.route-slope-swatch--steep {
  background: #dc3545;
}
.route-slope-swatch--extreme {
  background: #4a148c;
}
#mapLayerRouteLineSection.ebm-route-line-mode-slope .ebm-map-route-legend--surface,
#mapLayerRouteLineSection.ebm-route-line-mode-slope .ebm-map-route-hint--surface {
  display: none !important;
}
#mapLayerRouteLineSection.ebm-route-line-mode-surface .ebm-map-route-legend--slope,
#mapLayerRouteLineSection.ebm-route-line-mode-surface .ebm-map-route-hint--slope {
  display: none !important;
}

.ebm-layer-basemap,
.ebm-layer-toggles,
.ebm-layer-route {
  position: relative;
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.ebm-layer-basemap input,
.ebm-layer-toggles input,
.ebm-layer-route input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.ebm-layer-basemap-card,
.ebm-layer-toggle,
.ebm-layer-route-card {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 2px solid #e6e8ee;
  border-radius: 16px;
  background: #f7f8fb;
  color: #243040;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ebm-layer-preview {
  display: block;
  width: 100%;
  height: 78px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.ebm-layer-preview svg,
.ebm-layer-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ebm-layer-basemap-name,
.ebm-layer-toggle > span:last-child,
.ebm-layer-route-card > span:last-child {
  display: block;
  padding: 0 2px 2px;
}
.ebm-layer-check {
  display: none;
  position: absolute;
  top: 14px;
  right: 14px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #4f46e5;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.35);
}
.ebm-layer-check svg {
  display: block;
  width: 20px;
  height: 20px;
}
.ebm-layer-basemap input:checked + .ebm-layer-basemap-card,
.ebm-layer-route input:checked + .ebm-layer-route-card,
.ebm-layer-toggles input:checked + .ebm-layer-toggle {
  border-color: #4f46e5;
  background: #eef2ff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.12);
}
.ebm-layer-basemap input:checked + .ebm-layer-basemap-card .ebm-layer-check {
  display: block;
}
.ebm-layer-basemap input:focus-visible + .ebm-layer-basemap-card,
.ebm-layer-route input:focus-visible + .ebm-layer-route-card,
.ebm-layer-toggles input:focus-visible + .ebm-layer-toggle {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}
.ebm-layer-toggle {
  padding: 12px 8px 10px;
}
.ebm-layer-toggle-ico {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #5c6570;
  box-shadow: 0 2px 8px rgba(20, 24, 40, 0.08);
}
.ebm-layer-toggle-ico svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#mapLayerWind:checked + .ebm-layer-toggle .ebm-layer-toggle-ico {
  background: #0ea5e9;
  color: #fff;
}
.ebm-radar-hud {
  position: absolute;
  z-index: 650;
  left: calc(12px + env(safe-area-inset-left));
  bottom: calc(28px + env(safe-area-inset-bottom));
  width: min(220px, calc(100vw - 24px));
  min-width: 196px;
  box-sizing: border-box;
  padding: 8px 10px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: auto;
  color: #0f172a;
}
.ebm-radar-hud-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.ebm-radar-hud-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  color: #334155;
}
.ebm-radar-hud-time {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ebm-radar-hud-forecast {
  min-height: 1.1em;
  margin-top: 1px;
  margin-bottom: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  color: #b45309;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ebm-radar-hud-forecast:empty {
  visibility: hidden;
}
.ebm-radar-hud-time.is-forecast {
  color: #b45309;
}
.ebm-radar-pause-btn {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: #eef2ff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  -webkit-tap-highlight-color: transparent;
}
.ebm-radar-pause-btn.is-paused {
  background: #2563eb;
  color: #fff;
}
.ebm-radar-hud-legend {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ebm-radar-hud-legend-lbl {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  flex-shrink: 0;
}
.ebm-radar-hud-bar {
  flex: 1 1 auto;
  height: 8px;
  border-radius: 999px;
  /* Universal Blue–style ramp (light → heavy) */
  background: linear-gradient(90deg, #a8d5ff 0%, #3b82f6 28%, #22c55e 48%, #eab308 68%, #ef4444 86%, #a855f7 100%);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}
.ebm-radar-hud-meta {
  margin-top: 5px;
  font-size: 0.62rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.25;
}
.ebm-radar-hud-credit {
  margin-top: 3px;
  font-size: 0.6rem;
  line-height: 1.3;
}
.ebm-radar-hud-credit a {
  color: #2563eb;
  text-decoration: none;
}
.ebm-radar-hud-credit a:hover {
  text-decoration: underline;
}
body.ebm-nav-active .ebm-radar-hud {
  bottom: calc(118px + env(safe-area-inset-bottom));
}
.leaflet-tile-pane .ebm-radar-tiles,
.leaflet-overlay-pane .ebm-radar-tiles,
.leaflet-ebmRadar-pane .ebm-radar-tiles {
  transition: opacity 0.35s ease;
}
#mapLayerCyclingTrails + .ebm-layer-toggle .ebm-layer-toggle-ico {
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.ebm-layer-toggle-ico svg.ebm-cycle-mark {
  width: 46px;
  height: 46px;
  fill: none;
  stroke: none;
}
.ebm-cycle-mark .ebm-cycle-box {
  fill: #e10613;
  stroke: none;
}
.ebm-cycle-mark .ebm-cycle-ring {
  fill: #fff;
  stroke: none;
}
.ebm-cycle-mark .ebm-cycle-c {
  fill: none;
  stroke: #e10613;
  stroke-width: 2.7;
  stroke-linecap: round;
}
/* Hikeplan: prepínač turistických trás – turistická značka (biela – červená – biela) */
.ebm-layer-toggle-ico svg.ebm-hike-mark {
  width: 46px;
  height: 46px;
}
.ebm-hike-mark .ebm-hike-box {
  fill: #fff;
  stroke: #c9c9c9;
  stroke-width: 1;
}
.ebm-hike-mark .ebm-hike-stripe {
  fill: #e3001b;
}
.ebm-layer-route-card {
  padding: 12px 8px 10px;
}
.ebm-layer-route-ico {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ebm-layer-route-ico svg {
  width: 72px;
  height: 44px;
}
.route-surface-legend-pct {
  font-weight: 600;
  color: #212529;
  margin-left: 2px;
}
.route-surface-legend-text {
  max-width: 160px;
  line-height: 1.2;
}

/* Tooltip pri hoveri na farebný segment trasy (route.js) */
.route-seg-gradient-tooltip {
  position: fixed;
  z-index: 10050;
  max-width: 280px;
  padding: 8px 11px;
  font-size: 12px;
  line-height: 1.4;
  color: #fff;
  background: rgba(22, 26, 34, 0.93);
  border-radius: 7px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Map popups: width from screen minus side toolbar, wrap long labels */
.ebm-map-popup.leaflet-popup,
.route-seg-leaflet-popup.leaflet-popup {
  z-index: 1100;
}

.ebm-map-popup .leaflet-popup-content-wrapper,
.route-seg-leaflet-popup .leaflet-popup-content-wrapper {
  min-width: var(--ebm-map-popup-min-width, 200px) !important;
  max-width: var(--ebm-map-popup-max-width, 300px) !important;
  width: auto !important;
  box-sizing: border-box;
}

.ebm-map-popup:not(.ebm-route-weather-popup) .leaflet-popup-content-wrapper {
  width: min(250px, 94vw) !important;
  min-width: min(250px, 94vw) !important;
  max-width: min(250px, 94vw) !important;
}

.ebm-map-popup .leaflet-popup-content,
.route-seg-leaflet-popup .leaflet-popup-content {
  margin: 10px 34px 10px 10px;
  min-width: 0 !important;
  width: auto !important;
  max-width: none !important;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: normal;
}

.ebm-map-popup .leaflet-popup-content > div,
.ebm-map-popup .ebm-map-popup-inner,
.route-seg-leaflet-popup .leaflet-popup-content > div,
.map-weather-popup-card {
  min-width: 0 !important;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: normal;
}

.ebm-map-popup.ebm-route-weather-popup .leaflet-popup-content-wrapper {
  min-width: min(340px, 92vw) !important;
  max-width: min(380px, 92vw) !important;
}

.ebm-map-popup.ebm-route-weather-popup .leaflet-popup-content {
  width: auto !important;
  max-width: min(360px, 88vw) !important;
}

.ebm-map-popup.ebm-route-weather-popup .ebm-weather-facts {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  column-gap: 18px;
  row-gap: 4px;
  padding-left: 0 !important;
}

.ebm-map-popup.ebm-route-weather-popup .ebm-weather-facts > div {
  margin-bottom: 0 !important;
  white-space: nowrap;
}

.map-weather-popup-card {
  min-width: 0 !important;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: normal;
}

.ebm-map-popup .leaflet-popup-content .btn,
.ebm-map-popup .leaflet-popup-content button,
.route-seg-leaflet-popup .leaflet-popup-content .btn,
.route-seg-leaflet-popup .leaflet-popup-content button {
  white-space: normal;
  max-width: 100%;
  text-align: center;
  line-height: 1.25;
}

.ebm-map-popup:not(.ebm-route-weather-popup) .leaflet-popup-content {
  width: auto !important;
  max-width: none !important;
}

.ebm-map-popup:not(.ebm-route-weather-popup) .leaflet-popup-content .btn,
.ebm-map-popup:not(.ebm-route-weather-popup) .leaflet-popup-content button {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.ebm-map-popup a.leaflet-popup-close-button,
.route-seg-leaflet-popup a.leaflet-popup-close-button {
  width: 30px;
  height: 30px;
  font-size: 22px;
  line-height: 30px;
  padding: 0;
  right: 0;
  top: 0;
  z-index: 2;
  color: #666;
}

.ebm-map-popup #popup-address-display,
.ebm-map-popup #popup-elevation-display,
.ebm-map-popup #popup-wind-display,
.ebm-map-popup #popup-coords-display {
  overflow-wrap: break-word;
  word-break: normal;
  white-space: normal;
}

.route-seg-leaflet-popup .leaflet-popup-content-wrapper {
  border-radius: 8px;
}

/* Plánovač: pill výber bicykla a režimu motora */
.modern-selector-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}
.modern-selector-group input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.modern-selector-label {
  flex: 1 1 calc(50% - 8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  min-width: 0;
}
.modern-selector-group input[type="radio"]:focus-visible + .modern-selector-label {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}
.modern-selector-group input[type="radio"]:checked + .modern-selector-label {
  background: #eef2ff;
  border-color: #4f46e5;
  box-shadow: 0 4px 6px rgba(79, 70, 229, 0.1);
}
.modern-selector-title {
  font-weight: bold;
  font-size: 14px;
  color: #333;
}
.modern-selector-desc {
  font-size: 11px;
  color: #666;
  margin-top: 4px;
}
.info-btn-small {
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  font-size: 14px;
  margin-left: 5px;
  padding: 0;
  vertical-align: middle;
}
@media (hover: hover) and (pointer: fine) {
  .elegant-undo-btn:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
    transform: scale(1.05);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
  }
  .map-icons i:hover {
    color: #007bff;
  }
  .route-surface-seg:hover {
    filter: brightness(1.08);
  }
  .modern-selector-label:hover {
    background: #e2e6ea;
  }
  .info-btn-small:hover {
    color: #0d6efd;
  }
}

/* Plánovač / účet — posuvníky váhy a batérie (pod sebou) */
.ebm-planner-sliders .ebm-slider-field,
.ebm-account-sliders .ebm-slider-field {
  margin-bottom: 0.15rem;
}
.ebm-planner-sliders > .col-12 + .col-12,
.col-12.ebm-account-sliders + .col-12.ebm-account-sliders {
  margin-top: 0.5rem;
}
.ebm-slider-field .form-range,
input[type="range"].form-range,
input[type="range"].ebm-pref-range {
  margin: 0.15rem 0 0.35rem;
  height: 1.5rem;
  touch-action: pan-x;
  pointer-events: auto;
  -webkit-user-select: none;
  user-select: none;
  -webkit-appearance: none;
  appearance: none;
}
.ebm-slider-field .form-range::-webkit-slider-thumb {
  cursor: pointer;
  pointer-events: auto;
  -webkit-appearance: none;
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
}
.ebm-slider-field .form-range::-webkit-slider-runnable-track {
  pointer-events: auto;
}
#accountPanel .account-tab-stack > .tab-pane.active {
  pointer-events: auto;
}
.ebm-battery-custom-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ebm-battery-custom-row .ebm-battery-custom-input {
  max-width: 7rem;
}
.ebm-battery-custom-input.ebm-battery-custom-offlist {
  border-color: #86b7fe;
  background-color: #f8fbff;
}

/* Nad zoom +/− vpravo dole (mimo radar HUD vľavo) */
.ebm-route-reopen {
    position: fixed;
    z-index: 900;
    left: auto;
    right: calc(10px + env(safe-area-inset-right));
    /* atribúcia (~36) + zoom 88 + medzera 10 + margin zoom 8 */
    bottom: calc(142px + env(safe-area-inset-bottom));
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.ebm-route-reopen[hidden],
body.ebm-nav-active .ebm-route-reopen {
    display: none !important;
}
.ebm-route-reopen:active {
    transform: scale(0.96);
}
.ebm-route-reopen i {
    font-size: 20px;
    color: #111827;
    line-height: 1;
}

/* Spodný panel trasy na mape (po zatvorení plánovača) */
/* Nad mapou, pod bočnými panelmi (offcanvas ~1045), popupmi a modálmi */
.ebm-route-map-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 950;
    max-height: min(42vh, 340px);
    max-height: min(42dvh, 340px);
    transform: translateY(100%);
    transition: transform 0.28s ease-out;
    pointer-events: none;
}
.ebm-route-map-bar:not(.d-none) {
    pointer-events: auto;
}
.ebm-route-map-bar.ebm-route-map-bar--open {
    transform: translateY(0);
}
.ebm-route-map-bar.ebm-route-map-bar--profile,
.ebm-route-map-bar.ebm-route-map-bar--profile .ebm-route-map-bar-inner {
    max-height: min(78vh, 640px);
    max-height: min(78dvh, 640px);
}
.ebm-route-map-bar-inner {
    max-height: min(42vh, 340px);
    max-height: min(42dvh, 340px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding: 10px max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    border-radius: 14px 14px 0 0;
}
.ebm-route-map-bar-head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}
.ebm-route-map-bar-head-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 6px;
}
.ebm-route-map-bar-undo {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #e7f1ff;
    color: #0d6efd;
    font-size: 0.82rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.ebm-route-map-bar-undo:active {
    background: #cfe2ff;
}
.ebm-route-map-bar-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #e9ecef;
    color: #495057;
    font-size: 0.85rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.ebm-route-map-bar-close:active {
    background: #dee2e6;
}
.ebm-route-map-bar-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: #212529;
}
.ebm-rmb-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.ebm-rmb-stat i {
    opacity: 0.75;
    font-size: 0.78rem;
}
.ebm-rmb-stat--mode {
    font-size: 0.75rem;
    color: #4f46e5;
    background: #eef2ff;
    border-radius: 999px;
    padding: 2px 8px;
}
.ebm-route-map-bar-bikes,
.ebm-route-map-bar-modes {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin-bottom: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}
.ebm-route-map-bar-bikes input[type="radio"],
.ebm-route-map-bar-modes input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.ebm-rmb-mode-label {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.ebm-route-map-bar-bikes input[type="radio"]:checked + .ebm-rmb-mode-label,
.ebm-route-map-bar-modes input[type="radio"]:checked + .ebm-rmb-mode-label {
    background: #eef2ff;
    border-color: #4f46e5;
    color: #312e81;
}
.ebm-rmb-mode-txt {
    max-width: 4.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ebm-route-map-bar-actions {
    display: flex;
    gap: 8px;
}
.ebm-route-map-bar-actions .btn {
    flex: 1 1 0;
    min-width: 0;
}

.ebm-route-map-bar-weather,
.ebm-route-map-bar-draw,
.ebm-route-map-bar-delete,
.ebm-route-map-bar-elev {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 0.82rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ebm-route-map-bar-weather:active,
.ebm-route-map-bar-draw:active,
.ebm-route-map-bar-elev:active {
    background: #e0e7ff;
}
.ebm-route-map-bar-delete {
    background: #fde8e8;
    color: #dc3545;
}
.ebm-route-map-bar-delete:active {
    background: #f8d0d0;
}
.ebm-route-map-bar-weather.is-on,
.ebm-route-map-bar-elev.is-on {
    background: #d1e7dd;
    color: #146c43;
}
.ebm-route-map-bar-profile {
    margin-top: 10px;
}
.ebm-route-map-bar-profile-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6c757d;
    margin-bottom: 4px;
}
.ebm-route-map-bar-profile-chart {
    position: relative;
    height: 210px;
    width: 100%;
}
.ebm-route-map-bar-profile-empty {
    margin: 8px 0 0;
    font-size: 0.8rem;
    color: #6c757d;
}

/* Kreslenie trasy prstom priamo na mape.
   Do NOT use a full-screen inset:0 overlay — Android WebView still hits that
   layer even with pointer-events:none, so map drawing and the toolbar die. */
.ebm-rd {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    height: 0;
    overflow: visible;
    z-index: 1200;
    pointer-events: none;
}
.ebm-rd-top {
    pointer-events: auto;
    position: relative;
    z-index: 1201;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    padding-top: max(10px, env(safe-area-inset-top));
    background: rgba(17, 24, 39, 0.92);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.ebm-rd-top-main {
    flex: 1 1 auto;
    min-width: 0;
}
.ebm-rd-title {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
}
.ebm-rd-hint {
    margin-top: 3px;
    font-size: 0.74rem;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.8);
}
.ebm-rd-len {
    flex-shrink: 0;
    align-self: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: #a5b4fc;
    white-space: nowrap;
}
.ebm-rd-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 0.95rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ebm-rd-close:active {
    background: rgba(255, 255, 255, 0.26);
}
.ebm-rd-bar {
    pointer-events: auto;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1201;
    max-height: min(46vh, 320px);
    max-height: min(46dvh, 320px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 14px 14px 0 0;
    padding: 10px max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
.ebm-rd-tools {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.ebm-rd-tools::-webkit-scrollbar {
    display: none;
}
.ebm-rd-tool {
    flex: 1 0 auto;
    min-width: 66px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 7px 4px;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    background: #fff;
    color: #495057;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.1;
}
.ebm-rd-tool i {
    font-size: 0.95rem;
}
.ebm-rd-tool.is-active {
    background: #eef2ff;
    border-color: #4f46e5;
    color: #312e81;
}
.ebm-rd-tool:disabled {
    opacity: 0.45;
}
.ebm-rd-tool-txt {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.leaflet-container.ebm-rd-drawing {
    cursor: crosshair;
    touch-action: none;
}

.ebm-ms {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    height: 0;
    overflow: visible;
    z-index: 1200;
    pointer-events: none;
}
.ebm-ms-top {
    pointer-events: auto;
    position: relative;
    z-index: 1201;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    padding-top: max(10px, env(safe-area-inset-top));
    background: rgba(17, 24, 39, 0.92);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.ebm-ms-top-main {
    flex: 1 1 auto;
    min-width: 0;
}
.ebm-ms-title {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
}
.ebm-ms-hint {
    margin-top: 3px;
    font-size: 0.74rem;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.8);
}
.ebm-ms-stats {
    flex-shrink: 0;
    align-self: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
}
.ebm-ms-stat {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.ebm-ms-stat-lbl {
    font-size: 0.64rem;
    color: rgba(255, 255, 255, 0.7);
}
.ebm-ms-stat-val {
    font-size: 0.86rem;
    font-weight: 700;
    color: #a5b4fc;
    white-space: nowrap;
}
.ebm-ms-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 0.95rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ebm-ms-close:active {
    background: rgba(255, 255, 255, 0.26);
}
.ebm-ms-bar {
    pointer-events: auto;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1201;
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 14px 14px 0 0;
    padding: 10px max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
.ebm-ms-tools {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}
.ebm-ms-tool {
    flex: 1 0 auto;
    min-width: 66px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 7px 4px;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    background: #fff;
    color: #495057;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.1;
}
.ebm-ms-tool i {
    font-size: 0.95rem;
}
.ebm-ms-tool:disabled {
    opacity: 0.45;
}
.ebm-ms-tool-txt {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.leaflet-container.ebm-measure-on,
body.ebm-measure-on #map,
body.ebm-measure-on .leaflet-container {
    cursor: crosshair;
}
.ebm-ms-vertex {
    background: transparent;
    border: none;
}
.ebm-ms-vertex-n {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #4f46e5;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(15, 23, 42, 0.28);
}

/* Spodné panely na šírku: nižšie, posuvné, nástroje v jednom riadku */
@media (orientation: landscape) {
    .ebm-route-map-bar,
    .ebm-route-map-bar-inner {
        max-height: min(66vh, 210px);
        max-height: min(66dvh, 210px);
    }
    .ebm-route-map-bar-inner {
        padding-top: 8px;
    }
    .ebm-route-map-bar-head {
        margin-bottom: 6px;
    }
    .ebm-route-map-bar-stats {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        gap: 6px 14px;
    }
    .ebm-route-map-bar-stats::-webkit-scrollbar {
        display: none;
    }
    .ebm-route-map-bar-bikes,
    .ebm-route-map-bar-modes {
        margin-bottom: 6px;
    }
    .ebm-rmb-mode-label {
        padding: 4px 9px;
    }

    .ebm-rd-top {
        padding: 6px max(12px, env(safe-area-inset-right)) 6px max(12px, env(safe-area-inset-left));
        padding-top: max(6px, env(safe-area-inset-top));
        gap: 8px;
    }
    .ebm-rd-title {
        font-size: 0.84rem;
    }
    .ebm-rd-hint {
        margin-top: 1px;
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .ebm-rd-close {
        width: 28px;
        height: 28px;
    }
    .ebm-rd-bar {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        max-height: min(70vh, 150px);
        max-height: min(70dvh, 150px);
        padding-top: 7px;
    }
    .ebm-rd-tools {
        flex: 1 1 auto;
        min-width: 0;
        margin-bottom: 0;
    }
    .ebm-rd-tool {
        min-width: 62px;
        padding: 5px 6px;
    }
    .ebm-rd-bar > .btn {
        flex: 0 0 auto;
        width: auto !important;
        align-self: stretch;
        padding-left: 14px;
        padding-right: 14px;
    }

    .ebm-ms-top {
        padding: 6px max(12px, env(safe-area-inset-right)) 6px max(12px, env(safe-area-inset-left));
        padding-top: max(6px, env(safe-area-inset-top));
        gap: 8px;
    }
    .ebm-ms-title {
        font-size: 0.84rem;
    }
    .ebm-ms-hint {
        margin-top: 1px;
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .ebm-ms-close {
        width: 28px;
        height: 28px;
    }
    .ebm-ms-bar {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        padding-top: 7px;
    }
    .ebm-ms-tools {
        flex: 1 1 auto;
        min-width: 0;
        margin-bottom: 0;
    }
    .ebm-ms-tool {
        min-width: 62px;
        padding: 5px 6px;
    }
    .ebm-ms-bar > .btn {
        flex: 0 0 auto;
        width: auto !important;
        align-self: stretch;
        padding-left: 14px;
        padding-right: 14px;
    }
}

/* Kamera: nabíjačky podľa smeru (nearest top 10) */
.ebm-charger-finder {
    position: fixed;
    inset: 0;
    z-index: 20000;
    background: #0b0f14;
    color: #fff;
    display: flex;
    flex-direction: column;
}
.ebm-charger-finder.d-none {
    display: none !important;
}
.ebm-cf-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #111;
}
.ebm-cf-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.1) 35%, rgba(0,0,0,0.15) 55%, rgba(0,0,0,0.72) 100%);
    pointer-events: none;
}
.ebm-cf-top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: max(10px, env(safe-area-inset-top)) 12px 8px;
}
.ebm-cf-title {
    font-weight: 700;
    font-size: 1rem;
}
.ebm-cf-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    color: #fff;
    font-size: 1.1rem;
}
.ebm-charger-finder--nav .ebm-cf-reticle {
    display: none;
}
.ebm-cf-hud {
    position: absolute;
    left: 0;
    right: 0;
    top: 18%;
    height: 48%;
    pointer-events: none;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}
.ebm-cf-hud.d-none {
    display: none !important;
}
.ebm-cf-hud-stage {
    width: 260px;
    height: 260px;
    perspective: 900px;
    perspective-origin: 50% 58%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
}
.ebm-cf-arrow3d {
    width: 152px;
    height: 204px;
    transform-origin: 50% 72%;
    transform-style: preserve-3d;
    will-change: transform;
}
.ebm-cf-a3 {
    position: relative;
    width: 152px;
    height: 204px;
    transform-style: preserve-3d;
}
.ebm-cf-a3-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}
.ebm-cf-a3-mesh {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
}
.ebm-cf-a3-mesh svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    transform-style: preserve-3d;
}
.ebm-cf-a3-slab:nth-child(1) { transform: translateZ(-24px); }
.ebm-cf-a3-slab:nth-child(2) { transform: translateZ(-21px); }
.ebm-cf-a3-slab:nth-child(3) { transform: translateZ(-18px); }
.ebm-cf-a3-slab:nth-child(4) { transform: translateZ(-15px); }
.ebm-cf-a3-slab:nth-child(5) { transform: translateZ(-12px); }
.ebm-cf-a3-slab:nth-child(6) { transform: translateZ(-9px); }
.ebm-cf-a3-slab:nth-child(7) { transform: translateZ(-6px); }
.ebm-cf-a3-slab:nth-child(8) { transform: translateZ(-3px); }
.ebm-cf-a3-cap {
    transform: translateZ(0.5px);
}
.ebm-cf-arrow3d--aimed .ebm-cf-a3-cap {
    filter: drop-shadow(0 0 16px rgba(16, 185, 129, 0.85));
}
.ebm-cf-arrow3d--aimed .ebm-cf-a3-cap-fill {
    fill: url(#ebmArrFaceAimed);
    stroke: #a7f3d0;
}
.ebm-cf-arrow3d--aimed .ebm-cf-a3-slab:nth-child(1) use { fill: #064e3b; stroke: #064e3b; }
.ebm-cf-arrow3d--aimed .ebm-cf-a3-slab:nth-child(2) use { fill: #065f46; stroke: #065f46; }
.ebm-cf-arrow3d--aimed .ebm-cf-a3-slab:nth-child(3) use { fill: #047857; stroke: #047857; }
.ebm-cf-arrow3d--aimed .ebm-cf-a3-slab:nth-child(4) use { fill: #059669; stroke: #059669; }
.ebm-cf-arrow3d--aimed .ebm-cf-a3-slab:nth-child(5) use { fill: #10b981; stroke: #10b981; }
.ebm-cf-arrow3d--aimed .ebm-cf-a3-slab:nth-child(6) use { fill: #34d399; stroke: #34d399; }
.ebm-cf-arrow3d--aimed .ebm-cf-a3-slab:nth-child(7) use { fill: #6ee7b7; stroke: #6ee7b7; }
.ebm-cf-arrow3d--aimed .ebm-cf-a3-slab:nth-child(8) use { fill: #a7f3d0; stroke: #a7f3d0; }
.ebm-cf-a3-shadow {
    position: absolute;
    left: 50%;
    bottom: 6px;
    width: 96px;
    height: 26px;
    margin-left: -48px;
    background: rgba(0, 0, 0, 0.38);
    border-radius: 50%;
    filter: blur(5px);
    transform: rotateX(84deg) translateZ(-26px);
}
.ebm-cf-nav-card {
    text-align: center;
    padding: 8px 4px 2px;
}
.ebm-cf-nav-card-dir {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.ebm-cf-dir-glyph {
    display: inline-block;
    line-height: 1;
    transform-origin: 50% 50%;
}
.ebm-cf-nav-card-turn {
    font-size: 0.95rem;
    font-weight: 650;
    margin-top: 4px;
}
.ebm-cf-nav-card-dist {
    opacity: 0.85;
    font-size: 0.88rem;
    margin-top: 2px;
}
.ebm-cf-nav-card-warn {
    color: #fbbf24;
    font-size: 0.8rem;
    margin-top: 6px;
}
.ebm-cf-reticle {
    position: absolute;
    left: 50%;
    top: 38%;
    width: 54px;
    height: 54px;
    margin: -27px 0 0 -27px;
    border: 2px solid rgba(255, 193, 7, 0.9);
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
    pointer-events: none;
    z-index: 2;
}
.ebm-cf-reticle::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    border-radius: 50%;
    background: #ffc107;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}
.ebm-cf-reticle {
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ebm-cf-reticle--aimed {
    border-color: rgba(16, 185, 129, 0.95);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25), 0 0 14px rgba(16, 185, 129, 0.8);
}
.ebm-cf-reticle--aimed::after {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.95);
}
.ebm-cf-cam-status {
    position: relative;
    z-index: 2;
    padding: 0 14px;
    font-size: 0.82rem;
    color: #ffe08a;
    min-height: 1.1em;
}
.ebm-cf-rotate {
    position: relative;
    z-index: 3;
    margin: 8px 12px 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 193, 7, 0.92);
    color: #1a1a1a;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
}
.ebm-cf-rotate.d-none {
    display: none !important;
}
.ebm-cf-panel {
    position: relative;
    z-index: 2;
    margin-top: auto;
    max-height: 46vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0 10px max(12px, env(safe-area-inset-bottom));
}
.ebm-cf-hint {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 6px;
    padding: 0 4px;
}
.ebm-cf-accuracy {
    font-size: 0.72rem;
    line-height: 1.35;
    color: rgba(255,255,255,0.62);
    margin: 0 4px 8px;
}
.ebm-cf-open-wrap {
    display: flex;
    flex-direction: column;
}
.ebm-cf-accuracy-inline {
    font-size: 0.72rem;
    line-height: 1.35;
    color: #6c757d;
    margin-top: 6px;
    text-align: center;
}
.btn.ebm-btn-camera {
    background-color: #5c6bc0;
    border-color: #5c6bc0;
    color: #fff;
}
.btn.ebm-btn-camera:hover,
.btn.ebm-btn-camera:focus {
    background-color: #4a58a8;
    border-color: #4a58a8;
    color: #fff;
}
.btn.ebm-btn-camera:active {
    background-color: #3f4d96;
    border-color: #3f4d96;
    color: #fff;
}
.ebm-cf-list {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ebm-cf-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 12px;
    background: rgba(20, 24, 30, 0.82);
    color: #fff;
    padding: 10px 12px;
}
.ebm-cf-item--ahead {
    border-color: rgba(255, 193, 7, 0.85);
    background: rgba(70, 52, 8, 0.88);
    box-shadow: 0 0 0 1px rgba(255, 193, 7, 0.25);
}
.ebm-cf-item-main {
    flex: 1 1 auto;
    min-width: 0;
}
.ebm-cf-item-name {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ebm-cf-item-meta {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ebm-cf-item-dir {
    flex: 0 0 auto;
    min-width: 3.2rem;
    text-align: right;
    font-weight: 700;
    color: #ffc107;
    font-variant-numeric: tabular-nums;
}
.ebm-cf-empty {
    padding: 16px;
    text-align: center;
    color: rgba(255,255,255,0.75);
}
.ebm-cf-panel--poi {
    max-height: 62vh;
}
.ebm-cf-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
    border: 0;
    border-radius: 12px;
    background: #198754;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 11px 14px;
}
.ebm-cf-nav.d-none {
    display: none !important;
}
.ebm-cf-nav:disabled {
    opacity: 0.55;
}
.ebm-cf-nav:not(:disabled):active {
    background: #157347;
}
.ebm-cf-poi-card {
    background: rgba(12, 16, 22, 0.9);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 14px;
    padding: 12px 14px 14px;
}
.ebm-cf-poi-card.ebm-cf-item--ahead {
    border-color: rgba(255, 193, 7, 0.85);
    background: rgba(70, 52, 8, 0.9);
}
.ebm-cf-poi-dirline {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.ebm-cf-poi-dir {
    font-size: 1.55rem;
    font-weight: 800;
    color: #ffc107;
    font-variant-numeric: tabular-nums;
}
.ebm-cf-poi-vert {
    font-size: 1.45rem;
    font-weight: 800;
    color: #7dd3fc;
    font-variant-numeric: tabular-nums;
}
.ebm-cf-poi-vert--aimed {
    color: #86efac;
}
.ebm-cf-poi-dist {
    font-size: 1.2rem;
    font-weight: 700;
}
.ebm-cf-poi-name {
    font-weight: 800;
    font-size: 1.05rem;
    line-height: 1.25;
    margin-bottom: 4px;
}
.ebm-cf-poi-type {
    display: inline-block;
    font-size: 0.75rem;
    background: rgba(255,255,255,0.14);
    border-radius: 999px;
    padding: 2px 8px;
    margin-bottom: 8px;
}
.ebm-cf-poi-addr {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.78);
    margin-bottom: 8px;
}
.ebm-cf-poi-bike {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.88);
    margin-bottom: 6px;
}
.ebm-cf-poi-details .poi-popup-details,
.ebm-cf-poi-details .text-muted {
    color: rgba(255,255,255,0.8) !important;
}
.ebm-cf-poi-details a {
    color: #9ecbff !important;
}
.ebm-cf-poi-details hr {
    border-color: rgba(255,255,255,0.18);
}
.ebm-cf-poi-stats {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.16);
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
}
.ebm-cf-poi-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    justify-content: space-between;
    margin-top: 2px;
}
.ebm-cf-poi-stats--muted {
    color: rgba(255,255,255,0.72);
    font-size: 0.78rem;
}

.ebm-planner-place-group {
    min-height: 48px;
}
.ebm-planner-place-group > .form-control {
    font-size: 1.05rem;
    min-height: 48px;
}
.ebm-planner-place-group > .input-group-text,
.ebm-planner-place-group > .btn {
    min-height: 48px;
}
.ebm-place-clear {
    min-width: 44px;
}

/* ===== Plánovač trasy – nový dizajn (2026-10-31): karty ako v navigácii, zadanie a výsledok ako dva pohľady
   (planner-ui.js), výsledok s kartami Prehľad / Profil / Povrch / Zastávky. Len #routeSettingsPanel. ===== */
#routeSettingsPanel {
    --pl-bg: #f1f5f9;
    --pl-card: #ffffff;
    --pl-text: #0f172a;
    --pl-muted: #64748b;
    --pl-line: #e2e8f0;
    --pl-blue: #0d6efd;
    --pl-blue-soft: #e7f0ff;
    --pl-green: #198754;
    background: #ffffff;
    color: var(--pl-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
#routeSettingsPanel .ebm-pl-head {
    background: #ffffff;
    border-bottom: 1px solid var(--pl-line);
    padding: 12px 16px;
    gap: 8px;
}
#routeSettingsPanel .ebm-pl-head-form,
#routeSettingsPanel .ebm-pl-head-result {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
#routeSettingsPanel .ebm-pl-head-result,
#routeSettingsPanel.ebm-pl-view-result .ebm-pl-head-form {
    display: none;
}
#routeSettingsPanel.ebm-pl-view-result .ebm-pl-head-result {
    display: flex;
}
#routeSettingsPanel .ebm-pl-title {
    flex: 1;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.2px;
}
#routeSettingsPanel .ebm-pl-round {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    border: 0;
    background: var(--pl-bg);
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
#routeSettingsPanel .ebm-pl-head-pill {
    height: 34px;
    padding: 0 12px;
    border-radius: 17px;
    border: 0;
    background: var(--pl-blue-soft);
    color: var(--pl-blue);
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
#routeSettingsPanel .ebm-pl-head-route {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
#routeSettingsPanel .ebm-pl-head-kicker {
    font-size: 12px;
    font-weight: 600;
    color: var(--pl-muted);
}
#routeSettingsPanel .ebm-pl-head-name {
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#routeSettingsPanel .ebm-pl-body {
    display: flex;
    flex-direction: column;
    padding: 0 16px;
    background: var(--pl-bg);
}
#routeSettingsPanel .ebm-pl-form {
    padding-top: 14px;
}
#routeSettingsPanel #nav-info-panel-inner {
    flex: 1 0 auto;
    padding-top: 14px;
}
#routeSettingsPanel.ebm-pl-route-ready #nav-info-panel-inner {
    padding-top: 0;
}
#routeSettingsPanel .ebm-pl-form,
#routeSettingsPanel .ebm-pl-ov {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
#routeSettingsPanel.ebm-pl-view-result .ebm-pl-form {
    display: none;
}
#routeSettingsPanel .ebm-pl-form {
    flex: 1 0 auto;
}
#routeSettingsPanel .ebm-pl-form > .ebm-pl-foot {
    margin-top: auto;
}
#routeSettingsPanel:not(.ebm-pl-view-result) #nav-info-panel-inner {
    display: none !important;
}

/* Karty */
#routeSettingsPanel .ebm-pl-card {
    background: var(--pl-card);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
#routeSettingsPanel .ebm-pl-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--pl-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
#routeSettingsPanel .ebm-pl-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
#routeSettingsPanel .ebm-pl-card-title {
    font-size: 15px;
    font-weight: 700;
}

/* Štart / zastávky / cieľ */
#routeSettingsPanel .ebm-pl-route {
    gap: 0;
    padding: 4px 8px 10px 12px;
}
#routeSettingsPanel .ebm-pl-route-row,
#routeSettingsPanel .ebm-pl-waypoints > .input-group {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #eef2f7;
}
#routeSettingsPanel .ebm-pl-route-end {
    border-bottom: 0;
}
#routeSettingsPanel .ebm-pl-route-dot {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    border-radius: 7px;
    background: var(--pl-green);
    box-shadow: 0 0 0 3px #d1e7dd;
}
#routeSettingsPanel .ebm-pl-route-dot.is-end {
    border-radius: 3px;
    background: #dc3545;
    box-shadow: 0 0 0 3px #f8d7da;
}
#routeSettingsPanel .ebm-pl-route .ebm-planner-place-group {
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
}
#routeSettingsPanel .ebm-pl-route .ebm-planner-place-group > .form-control {
    border: 0;
    background: transparent;
    box-shadow: none;
    padding-left: 2px;
    font-size: 16px;
    font-weight: 600;
    color: var(--pl-text);
}
#routeSettingsPanel .ebm-pl-route .ebm-planner-place-group > .btn,
#routeSettingsPanel .ebm-pl-route .ebm-planner-place-group > .input-group-text {
    flex-shrink: 0;
    min-width: 40px;
    border: 0 !important;
    border-radius: 12px !important;
    background: transparent;
    color: var(--pl-muted);
    padding: 0 8px;
}
#routeSettingsPanel .ebm-pl-route .ebm-planner-place-group > .ebm-pl-gps {
    background: var(--pl-blue-soft);
    color: var(--pl-blue);
}
/* Prejazdové body (riadky z updateWaypointsUI) */
#routeSettingsPanel .ebm-pl-waypoints > .input-group {
    margin: 0 !important;
    padding-left: 24px;
}
#routeSettingsPanel .ebm-pl-waypoints > .input-group::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 50%;
    width: 10px;
    height: 10px;
    margin-top: -5px;
    border-radius: 5px;
    border: 2px solid var(--pl-muted);
    background: #ffffff;
}
#routeSettingsPanel .ebm-pl-waypoints > .input-group > .form-control {
    font-size: 15px;
    font-weight: 500;
}
#routeSettingsPanel .ebm-pl-waypoints .drag-handle {
    color: #94a3b8;
    min-width: 28px;
    padding: 0 4px;
}
#routeSettingsPanel .ebm-pl-waypoints .btn-outline-danger {
    color: #dc3545;
}
#routeSettingsPanel .ebm-pl-route-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
}
#routeSettingsPanel .ebm-pl-chip-btn {
    height: 36px;
    padding: 0 12px;
    border-radius: 18px;
    border: 0;
    background: var(--pl-bg);
    color: var(--pl-blue);
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Bicykel (dlaždice) a režim (segmentový prepínač) */
#routeSettingsPanel .modern-selector-group {
    margin: 0;
}
#routeSettingsPanel .ebm-pl-bikes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}
#routeSettingsPanel .ebm-pl-bikes .modern-selector-label {
    height: 68px;
    padding: 6px 2px;
    border: 1px solid var(--pl-line);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: none;
}
#routeSettingsPanel .ebm-pl-bikes .modern-selector-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    line-height: 1.1;
}
#routeSettingsPanel .ebm-pl-bike-ico {
    font-size: 24px;
    line-height: 1;
}
/* Ikony bicyklov: trieda .ebm-pl-bikes--svg na #bikeTypeGroup (index.html) zapína čiarové SVG ikony.
   Návrat k pôvodným emoji = odstrániť túto triedu (emoji ostali v markupe). */
#routeSettingsPanel .ebm-pl-bike-svg {
    display: none;
}
#routeSettingsPanel .ebm-pl-bikes--svg .ebm-pl-bike-ico {
    display: none;
}
#routeSettingsPanel .ebm-pl-bikes--svg .ebm-pl-bike-svg {
    display: block;
    color: #475569;
}
#routeSettingsPanel .ebm-pl-bikes--svg input[type="radio"]:checked + .modern-selector-label .ebm-pl-bike-svg {
    color: var(--pl-blue);
}
#routeSettingsPanel .ebm-pl-head-pill[hidden] {
    display: none;
}
#routeSettingsPanel .ebm-pl-bikes input[type="radio"]:checked + .modern-selector-label {
    border: 2px solid var(--pl-blue);
    background: var(--pl-blue-soft);
    box-shadow: none;
}
#routeSettingsPanel .ebm-pl-bikes input[type="radio"]:checked + .modern-selector-label .modern-selector-title {
    color: var(--pl-blue);
    font-weight: 700;
}
#routeSettingsPanel .ebm-pl-modes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: var(--pl-bg);
}
#routeSettingsPanel .ebm-pl-modes .modern-selector-label {
    height: 40px;
    padding: 0 2px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    box-shadow: none;
}
#routeSettingsPanel .ebm-pl-modes .modern-selector-title {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
#routeSettingsPanel .ebm-pl-modes .modern-selector-desc {
    display: none;
}
#routeSettingsPanel .ebm-pl-modes input[type="radio"]:checked + .modern-selector-label {
    background: #ffffff;
    border: 0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
}
#routeSettingsPanel .ebm-pl-modes input[type="radio"]:checked + .modern-selector-label .modern-selector-title {
    color: var(--pl-text);
    font-weight: 700;
}
#routeSettingsPanel .ebm-pl-mode-desc {
    margin-top: -4px;
    font-size: 13px;
    color: var(--pl-muted);
}
#routeSettingsPanel .ebm-pl-mode-desc:empty {
    display: none;
}

/* Posuvníky */
#routeSettingsPanel .ebm-pl-sliders {
    gap: 14px;
}
#routeSettingsPanel .ebm-pl-sliders .ebm-slider-field {
    margin: 0;
}
#routeSettingsPanel .ebm-pl-sliders .ebm-slider-field > label {
    font-size: 15px !important;
    font-weight: 600;
    color: var(--pl-text) !important;
    margin-bottom: 4px;
}
#routeSettingsPanel .ebm-pl-sliders .ebm-slider-field > label i {
    display: none;
}
#routeSettingsPanel .ebm-pl-sliders .ebm-slider-value {
    font-size: 17px;
    font-weight: 800;
    color: var(--pl-blue) !important;
}
#routeSettingsPanel .ebm-pl-sliders .ebm-slider-value.ebm-pl-val-green {
    color: var(--pl-green) !important;
}

/* Zoznam prepínačov + Ďalšie nastavenia */
#routeSettingsPanel .ebm-pl-list {
    padding: 0;
    gap: 0;
    overflow: hidden;
}
#routeSettingsPanel .ebm-pl-list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 0 14px;
    margin: 0;
    border-bottom: 1px solid #eef2f7;
    cursor: pointer;
}
#routeSettingsPanel .ebm-pl-list-ico {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--pl-bg);
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
}
#routeSettingsPanel .ebm-pl-list-ico.is-amber {
    background: #fff3cd;
    color: #b45309;
}
#routeSettingsPanel .ebm-pl-list-ico.is-blue {
    background: var(--pl-blue-soft);
    color: var(--pl-blue);
}
#routeSettingsPanel .ebm-pl-list-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    font-size: 15px;
    font-weight: 600;
}
#routeSettingsPanel .ebm-pl-list-text small {
    font-size: 12px;
    font-weight: 400;
    color: var(--pl-muted);
}
#routeSettingsPanel .ebm-pl-list .form-switch .form-check-input {
    width: 2.6em;
    height: 1.45em;
    margin: 0;
    cursor: pointer;
}
#routeSettingsPanel .ebm-pl-list .form-check-input:checked {
    background-color: var(--pl-green);
    border-color: var(--pl-green);
}
#routeSettingsPanel .ebm-pl-more {
    margin: 0;
}
#routeSettingsPanel .ebm-pl-more > summary {
    list-style: none;
    border-bottom: 0;
}
#routeSettingsPanel .ebm-pl-more > summary::-webkit-details-marker {
    display: none;
}
#routeSettingsPanel .ebm-pl-more-chev {
    color: #94a3b8;
    transition: transform 0.2s ease;
}
#routeSettingsPanel .ebm-pl-more[open] > summary .ebm-pl-more-chev {
    transform: rotate(90deg);
}
#routeSettingsPanel .ebm-pl-more-body {
    padding: 4px 14px 14px;
    border-top: 1px solid #eef2f7;
}
#routeSettingsPanel .ebm-pl-field-label {
    display: block;
    margin: 10px 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--pl-muted);
}
#routeSettingsPanel .ebm-pl-more-body .form-select {
    min-height: 44px;
    border-radius: 12px;
}

/* Pätička s hlavným tlačidlom (vždy dole na palec) */
#routeSettingsPanel .ebm-pl-foot {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    gap: 10px;
    margin: 0 -16px;
    padding: 12px 16px 14px;
    background: #ffffff;
    border-top: 1px solid var(--pl-line);
}
#routeSettingsPanel .ebm-pl-primary {
    flex: 1;
    height: 54px;
    border-radius: 16px;
    border: 0;
    background: var(--pl-blue);
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
#routeSettingsPanel .ebm-pl-primary.is-green {
    background: var(--pl-green);
}
#routeSettingsPanel .ebm-pl-primary:disabled {
    opacity: 0.6;
}
#routeSettingsPanel .ebm-pl-secondary {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    border: 1px solid #cfe0ff;
    background: var(--pl-blue-soft);
    color: var(--pl-blue);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#routeSettingsPanel .ebm-pl-result-foot {
    display: none;
    margin-top: auto;
}
#routeSettingsPanel.ebm-pl-route-ready .ebm-pl-result-foot {
    display: flex;
}

/* Výsledok: karty (taby) */
#routeSettingsPanel .ebm-pl-result {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
#routeSettingsPanel .ebm-pl-tabs {
    position: sticky;
    top: 0;
    z-index: 6;
    display: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin: 0 -16px;
    padding: 10px 16px;
    background: #ffffff;
    border-bottom: 1px solid var(--pl-line);
}
#routeSettingsPanel.ebm-pl-route-ready .ebm-pl-tabs {
    display: grid;
}
#routeSettingsPanel .ebm-pl-tabs button {
    height: 36px;
    border-radius: 11px;
    border: 0;
    background: var(--pl-bg);
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#routeSettingsPanel .ebm-pl-tabs button.is-active {
    background: var(--pl-text);
    color: #ffffff;
    font-weight: 700;
}
/* Skrytá karta zachová šírku (graf sa meria podľa šírky kontajnera). */
#routeSettingsPanel[data-ebm-pl-active="overview"] #nav-info-panel-inner [data-ebm-pl-tab]:not([data-ebm-pl-tab="overview"]),
#routeSettingsPanel[data-ebm-pl-active="profile"] #nav-info-panel-inner [data-ebm-pl-tab]:not([data-ebm-pl-tab="profile"]),
#routeSettingsPanel[data-ebm-pl-active="surface"] #nav-info-panel-inner [data-ebm-pl-tab]:not([data-ebm-pl-tab="surface"]),
#routeSettingsPanel[data-ebm-pl-active="stops"] #nav-info-panel-inner [data-ebm-pl-tab]:not([data-ebm-pl-tab="stops"]) {
    position: absolute !important;
    left: 0;
    right: 0;
    top: 0;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    visibility: hidden;
    pointer-events: none;
}
#routeSettingsPanel #nav-text {
    font-size: 14px;
}
#routeSettingsPanel #nav-text:empty {
    display: none;
}

/* Prehľad */
#routeSettingsPanel .ebm-pl-hero {
    background: #111827;
    color: #ffffff;
    border-radius: 20px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
#routeSettingsPanel .ebm-pl-hero-top {
    display: flex;
    align-items: flex-end;
    gap: 18px;
}
#routeSettingsPanel .ebm-pl-hero-km {
    font-size: 40px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
}
#routeSettingsPanel .ebm-pl-hero-km span {
    font-size: 18px;
    font-weight: 700;
    color: #cbd5e1;
    letter-spacing: 0;
}
#routeSettingsPanel .ebm-pl-hero-time {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 2px;
}
#routeSettingsPanel .ebm-pl-hero-time strong {
    font-size: 20px;
}
#routeSettingsPanel .ebm-pl-hero-time span {
    font-size: 12px;
    color: #cbd5e1;
}
#routeSettingsPanel .ebm-pl-hero-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* Hikeplan: bez „S nabíjaním“ */
    gap: 8px;
}
#routeSettingsPanel .ebm-pl-hero-grid > div {
    background: #1f2937;
    border-radius: 12px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
#routeSettingsPanel .ebm-pl-hero-grid span {
    font-size: 11px;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#routeSettingsPanel .ebm-pl-hero-grid strong {
    font-size: 15px;
    white-space: nowrap;
}
#routeSettingsPanel .ebm-pl-hero-grid strong.is-up {
    color: #86efac;
}
#routeSettingsPanel .ebm-pl-hero-grid strong.is-down {
    color: #93c5fd;
}
#routeSettingsPanel .ebm-pl-tag-btn {
    height: 30px;
    padding: 0 10px;
    border-radius: 15px;
    border: 0;
    background: var(--pl-bg);
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
#routeSettingsPanel .ebm-pl-bat {
    gap: 10px;
}
#routeSettingsPanel .ebm-pl-bat-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    font-size: 15px;
    color: #334155;
}
#routeSettingsPanel .ebm-pl-bat-row.is-small {
    font-size: 13px;
    color: var(--pl-muted);
}
#routeSettingsPanel .ebm-pl-bat-row strong {
    color: var(--pl-text);
}
#routeSettingsPanel .ebm-pl-bat-row strong.is-green {
    color: var(--pl-green);
}
#routeSettingsPanel .ebm-pl-bat-row .is-danger,
#routeSettingsPanel .ebm-pl-bat-row .is-danger strong {
    color: #b91c1c;
}
#routeSettingsPanel .ebm-pl-bat-finish {
    font-size: 22px;
}
#routeSettingsPanel .ebm-pl-batbar {
    position: relative;
    height: 14px;
    border-radius: 7px;
    background: var(--pl-line);
    overflow: hidden;
}
#routeSettingsPanel .ebm-pl-batbar span {
    position: absolute;
    top: 0;
    bottom: 0;
}
#routeSettingsPanel .ebm-pl-batbar-left {
    left: 0;
}
#routeSettingsPanel .ebm-pl-batbar-used {
    background: repeating-linear-gradient(135deg, #bbf7d0 0 6px, #dcfce7 6px 12px);
}
#routeSettingsPanel .ebm-pl-warn {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 10px;
    border-radius: 12px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 13px;
}
#routeSettingsPanel .ebm-pl-warn i {
    color: #c2410c;
    margin-top: 2px;
}
#routeSettingsPanel .ebm-pl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
#routeSettingsPanel .ebm-pl-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 14px;
    background: var(--pl-bg);
    font-size: 12px;
    color: #475569;
}
#routeSettingsPanel .ebm-pl-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
#routeSettingsPanel .ebm-pl-tile {
    background: var(--pl-card);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
#routeSettingsPanel .ebm-pl-tile span {
    font-size: 12px;
    color: var(--pl-muted);
}
#routeSettingsPanel .ebm-pl-tile strong {
    font-size: 20px;
    font-weight: 800;
}
#routeSettingsPanel .ebm-pl-tile strong.is-text {
    font-size: 16px;
    font-weight: 700;
}
#routeSettingsPanel .ebm-pl-ai {
    gap: 8px;
}
#routeSettingsPanel .ebm-pl-ai-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
}
#routeSettingsPanel .ebm-pl-ai-head > i {
    color: var(--pl-blue);
}
#routeSettingsPanel .ebm-pl-ai-head > span {
    flex: 1;
}
#routeSettingsPanel .ebm-pl-ai-head small {
    font-size: 11px;
    font-weight: 400;
    color: var(--pl-muted);
    text-align: right;
}
#routeSettingsPanel .ebm-pl-ai #route-ai-description-box {
    font-size: 14px;
    line-height: 1.45;
    color: #334155;
}
#routeSettingsPanel .ebm-pl-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}
#routeSettingsPanel .ebm-pl-actions button {
    height: 64px;
    border-radius: 16px;
    border: 0;
    background: var(--pl-card);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
#routeSettingsPanel .ebm-pl-actions i {
    font-size: 18px;
}
#routeSettingsPanel .ebm-pl-actions .is-blue {
    color: var(--pl-blue);
}
#routeSettingsPanel .ebm-pl-actions .is-green {
    color: var(--pl-green);
}
#routeSettingsPanel .ebm-pl-actions button.is-danger {
    color: #b91c1c;
}
#routeSettingsPanel .ebm-pl-name {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
#routeSettingsPanel .ebm-pl-name label {
    font-size: 13px;
    font-weight: 600;
    color: var(--pl-muted);
}
#routeSettingsPanel .ebm-pl-name .form-control {
    height: 48px;
    border-radius: 14px;
    border: 1px solid var(--pl-line);
    font-size: 15px;
}

/* Profil, povrch, zastávky, nabíjačky */
#routeSettingsPanel .ebm-pl-profile-host {
    height: 300px;
    margin-bottom: 92px;
    width: 100%;
}
#routeSettingsPanel .ebm-pl-profile .ebm-prof {
    padding: 0;
    background: transparent;
}
/* Hlavička grafu (výška, ↑ ↓) ostáva; pod grafom miesto pre nápovedu, pri posúvaní ju prekryje karta bodu. */
#routeSettingsPanel .ebm-pl-profile .ebm-prof-hint,
#routeSettingsPanel .ebm-pl-profile .ebm-prof-card {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    height: 84px;
    box-sizing: border-box;
    border-radius: 12px;
}
#routeSettingsPanel .ebm-pl-profile .ebm-prof-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px dashed #cbd5e1;
    font-size: 13px;
}
#routeSettingsPanel .ebm-pl-profile .ebm-prof-card {
    z-index: 3;
    overflow: hidden;
    background: #eff6ff;
    box-shadow: none;
}
#routeSettingsPanel #route-surface-panel .route-surface-card,
#routeSettingsPanel #route-chargers-panel .route-chargers-card {
    padding: 14px;
    background: var(--pl-card);
    border: 0;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
#routeSettingsPanel #route-surface-panel:not(.d-none) {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
#routeSettingsPanel #route-surface-panel .route-surface-title {
    font-size: 15px;
    color: var(--pl-text);
}
#routeSettingsPanel #route-surface-panel .route-surface-bar {
    height: 14px;
    border-radius: 7px;
}
#routeSettingsPanel .ebm-pl-stops {
    font-size: 14px;
}
#routeSettingsPanel .ebm-pl-stops > div {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}
#routeSettingsPanel .ebm-pl-stops .fw-bold.text-warning,
#routeSettingsPanel .ebm-pl-stops .fw-bold.text-info {
    color: var(--pl-text) !important;
    font-size: 15px;
    margin-bottom: 6px !important;
}
#routeSettingsPanel .ebm-pl-stops .fw-bold.text-warning i,
#routeSettingsPanel .ebm-pl-stops .fw-bold.text-info i {
    display: none;
}
#routeSettingsPanel .ebm-pl-stops .border-bottom {
    border-color: #eef2f7 !important;
    padding: 10px 0 !important;
}
#routeSettingsPanel .ebm-pl-stops .badge.bg-warning {
    border-radius: 10px;
    padding: 5px 8px;
    background: #fff3cd !important;
    color: #92400e !important;
}

/* ===== Spodný panel trasy na mape – nový dizajn (2026-11-01): posuvný panel ako v navigácii.
   Zbalený (.ebm-rmb-collapsed): štatistiky + Spustiť navigáciu / Upraviť; rozbalený: bicykel, režim, nástroje, profil. ===== */
.ebm-route-map-bar:not(.ebm-rmb-collapsed),
.ebm-route-map-bar:not(.ebm-rmb-collapsed) .ebm-route-map-bar-inner {
    max-height: min(78vh, 640px);
    max-height: min(78dvh, 640px);
}
.ebm-route-map-bar .ebm-route-map-bar-inner {
    max-width: 560px;
    margin: 0 auto;
    padding: 0 max(16px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: #ffffff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-top: none;
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.14);
    color: #0f172a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.ebm-rmb-grabber {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.ebm-rmb-grabber span {
    width: 40px;
    height: 5px;
    border-radius: 3px;
    background: #cbd5e1;
}
.ebm-route-map-bar .ebm-route-map-bar-head {
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}
.ebm-route-map-bar .ebm-route-map-bar-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    font-size: 14px;
    color: #0f172a;
}
.ebm-rmb-main {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 14px;
}
.ebm-rmb-km {
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.5px;
}
.ebm-rmb-km small {
    font-size: 15px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0;
}
.ebm-rmb-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 17px;
    font-weight: 700;
}
.ebm-rmb-time i {
    font-size: 15px;
    color: #64748b;
}
.ebm-rmb-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.ebm-rmb-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 10px;
    border-radius: 14px;
    background: #f1f5f9;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
}
.ebm-rmb-chip.is-up {
    color: #15803d;
}
.ebm-rmb-chip.is-down {
    color: #1d4ed8;
}
/* Cestný bicykel: nespevnené úseky trasy (route.js ebmRoadRoughChipHtml; na mape červeno prerušovane + trojuholník) */
.ebm-rmb-chip.is-rough {
    background: #fef3c7;
    color: #b45309;
}
.ebm-route-map-bar .ebm-route-map-bar-close {
    align-self: flex-start;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #475569;
    font-size: 16px;
}
.ebm-route-map-bar .ebm-route-map-bar-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}
.ebm-rmb-primary {
    flex: 1 1 auto;
    min-width: 0;
    height: 52px;
    border: 0;
    border-radius: 16px;
    background: #198754;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.ebm-rmb-primary:active {
    background: #146c43;
}
.ebm-rmb-secondary {
    flex: 0 0 52px;
    height: 52px;
    border: 1px solid #cfe0ff;
    border-radius: 16px;
    background: #e7f0ff;
    color: #0d6efd;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ebm-rmb-more {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #eef2f7;
}
.ebm-route-map-bar.ebm-rmb-collapsed .ebm-rmb-more {
    display: none;
}
.ebm-rmb-label {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.ebm-route-map-bar .ebm-route-map-bar-bikes,
.ebm-route-map-bar .ebm-route-map-bar-modes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 0 0 6px;
    padding: 0;
    overflow: visible;
}
.ebm-route-map-bar .ebm-route-map-bar-bikes .ebm-rmb-mode-label {
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    height: 60px;
    padding: 4px 2px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
}
.ebm-route-map-bar .ebm-route-map-bar-bikes .ebm-rmb-mode-label > span:first-child {
    font-size: 22px;
    line-height: 1;
}
.ebm-route-map-bar .ebm-rmb-mode-txt {
    max-width: 100%;
}
.ebm-route-map-bar .ebm-route-map-bar-bikes input[type="radio"]:checked + .ebm-rmb-mode-label {
    border: 2px solid #0d6efd;
    background: #e7f0ff;
    color: #0d6efd;
    font-weight: 700;
}
.ebm-route-map-bar .ebm-route-map-bar-modes {
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: #f1f5f9;
}
.ebm-route-map-bar .ebm-route-map-bar-modes .ebm-rmb-mode-label {
    justify-content: center;
    height: 38px;
    padding: 0 2px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}
.ebm-route-map-bar .ebm-route-map-bar-modes .ebm-rmb-mode-label > span:first-child {
    display: none;
}
.ebm-route-map-bar .ebm-route-map-bar-modes input[type="radio"]:checked + .ebm-rmb-mode-label {
    background: #ffffff;
    border: 0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
    color: #0f172a;
    font-weight: 700;
}
.ebm-rmb-tools {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}
.ebm-route-map-bar .ebm-rmb-tools button {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    height: 64px;
    padding: 4px 2px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    color: #0d6efd;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.ebm-route-map-bar .ebm-rmb-tools button.d-none {
    display: none;
}
.ebm-route-map-bar .ebm-rmb-tools button i {
    font-size: 18px;
}
.ebm-route-map-bar .ebm-rmb-tools button span {
    max-width: 100%;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.15;
    color: #334155;
    text-align: center;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.ebm-route-map-bar .ebm-rmb-tools .ebm-route-map-bar-delete {
    color: #dc3545;
}
.ebm-route-map-bar .ebm-rmb-tools button.is-on {
    border-color: #a3cfbb;
    background: #d1e7dd;
    color: #146c43;
}
.ebm-route-map-bar .ebm-route-map-bar-profile {
    margin-top: 8px;
}
/* Spodný panel trasy nad tlačidlami mapy (sever, vrstvy, radar = 1000), pod hornou lištou (1120) a panelmi (1200). */
.ebm-route-map-bar {
    z-index: 1050;
}
/* Spodný panel s otvoreným výškovým profilom: vyšší, aby bol graf vidieť celý aj s osou km. */
.ebm-route-map-bar.ebm-route-map-bar--profile,
.ebm-route-map-bar.ebm-route-map-bar--profile .ebm-route-map-bar-inner {
    max-height: min(92vh, 860px);
    max-height: min(92dvh, 860px);
}
.ebm-route-map-bar .ebm-route-map-bar-profile-chart {
    height: 240px;
}

/* ===== Panel Môj účet + registrácia + zabudnuté heslo – nový dizajn (2026-11-01): ako plánovač – biela hlavička, sivé telo, karty, segmentové karty.
   Pripojenie bicykla a záznam jazdy majú vlastnú kartu „Bicykel“ (len v appke). ===== */
.ebm-acc {
    background: #ffffff;
    color: #0f172a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.ebm-acc .ebm-acc-head {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 16px;
    gap: 8px;
}
.ebm-acc .ebm-acc-title {
    flex: 1;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.2px;
}
.ebm-acc .ebm-acc-round {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    border: 0;
    background: #f1f5f9;
    color: #475569;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ebm-acc .ebm-acc-body {
    background: #f1f5f9;
}
.ebm-acc .ebm-acc-tabs {
    flex-shrink: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    margin: 0;
    padding: 10px 16px;
    list-style: none;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}
.ebm-acc .ebm-acc-tabs.d-none,
.ebm-acc .ebm-acc-tabs .nav-item.d-none {
    display: none !important;
}
.ebm-acc .ebm-acc-tabs .nav-item {
    flex: 1 1 0;
    min-width: 0;
}
.ebm-acc .ebm-acc-tabs .nav-link {
    width: 100%;
    height: 36px;
    padding: 0 4px;
    border: 0;
    border-radius: 11px;
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ebm-acc .ebm-acc-tabs .nav-link.active {
    background: #0f172a;
    color: #ffffff;
    font-weight: 700;
}
#accountPanel.ebm-acc .account-tab-stack > .tab-pane {
    display: flex !important;
    flex-direction: column;
    gap: 14px;
    padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
}
.ebm-acc .account-tab-stack > .tab-pane > div:not(.d-none) {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.ebm-acc .ebm-acc-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 14px;
}
.ebm-acc .ebm-acc-card.is-danger {
    background: #fff5f5;
    color: #7f1d1d;
}
.ebm-acc .ebm-acc-card.is-danger p {
    margin: 0;
}
.ebm-acc .ebm-acc-card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: inherit;
}
.ebm-acc .ebm-acc-card-title i {
    color: #0d6efd;
}
.ebm-acc .ebm-acc-muted {
    color: #64748b;
    font-size: 13px;
}
.ebm-acc .ebm-acc-intro {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}
.ebm-acc .ebm-acc-profile {
    flex-direction: row;
    align-items: center;
}
.ebm-acc .ebm-acc-avatar {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 26px;
    background: #e7f0ff;
    color: #0d6efd;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ebm-acc .ebm-acc-profile-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.ebm-acc .ebm-acc-profile-text strong {
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ebm-acc .ebm-acc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ebm-acc .ebm-acc-field > label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}
.ebm-acc .ebm-acc-card .form-control,
.ebm-acc .ebm-acc-card .form-select {
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    font-size: 16px;
}
.ebm-acc .ebm-acc-btn,
.ebm-ride-popup .ebm-acc-btn {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border-radius: 16px;
    border: 0;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ebm-acc .ebm-acc-btn.is-primary,
.ebm-ride-popup .ebm-acc-btn.is-primary {
    background: #0d6efd;
    color: #ffffff;
}
.ebm-acc .ebm-acc-btn.is-secondary,
.ebm-ride-popup .ebm-acc-btn.is-secondary {
    background: #e7f0ff;
    color: #0d6efd;
    border: 1px solid #cfe0ff;
    font-size: 15px;
}
.ebm-acc .ebm-acc-btn.is-dark {
    background: #000000;
    color: #ffffff;
}
.ebm-acc .ebm-acc-btn.is-danger {
    background: #dc3545;
    color: #ffffff;
}
.ebm-acc .ebm-acc-btn.d-none {
    display: none !important;
}
.ebm-acc .ebm-acc-row2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.ebm-acc .ebm-acc-row2 .ebm-acc-btn {
    font-size: 14px;
    min-height: 46px;
}
.ebm-acc .ebm-acc-or {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #64748b;
}
.ebm-acc .ebm-acc-or::before,
.ebm-acc .ebm-acc-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}
.ebm-acc .ebm-acc-danger {
    margin-top: auto;
}
.ebm-acc .ebm-acc-link {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 16px;
    background: #ffffff;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ebm-acc .ebm-acc-link.is-danger {
    color: #dc3545;
}
.ebm-acc #account-delete-details .ebm-acc-card {
    margin-top: 10px;
}
/* Posuvníky v preferenciách ako v plánovači */
.ebm-acc .ebm-account-sliders .ebm-slider-field {
    margin: 0;
}
.ebm-acc .ebm-account-sliders .ebm-slider-field > label {
    font-size: 15px !important;
    font-weight: 600;
    color: #0f172a !important;
}
.ebm-acc .ebm-account-sliders .ebm-slider-field > label i {
    display: none;
}
.ebm-acc .ebm-account-sliders .ebm-slider-value {
    font-size: 17px;
    font-weight: 800;
    color: #0d6efd !important;
}
/* Trasy, bicykel, záznam jazdy – vnútro vykresľujú account.js, ebike-ble.js, ride-logger.js */
.ebm-acc .ebm-acc-routes .list-group-item {
    background: transparent;
    border-color: #eef2f7;
}
.ebm-acc .ebm-acc-routes:empty {
    display: none;
}
.ebm-acc #ebm-bike-panel .btn,
.ebm-acc #ebm-ride-log-panel .btn {
    min-height: 46px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
}
.ebm-acc #ebm-bike-panel .btn-sm.py-0 {
    min-height: 36px;
    border-radius: 10px;
}

.ebm-acc .ebm-acc-pane {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
}
.ebm-acc .ebm-acc-head .ebm-acc-title {
    min-width: 0;
}
.ebm-acc .ebm-acc-code {
    font-size: 22px !important;
    font-weight: 700;
    letter-spacing: 6px;
    text-align: center;
}
.ebm-acc .ebm-acc-btn.is-green {
    background: #198754;
}
.ebm-acc .ebm-acc-field-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}
/* Preferencie: bicykel ako dlaždice, režim ako segmentový prepínač (ako v plánovači) */
.ebm-acc .ebm-acc-bikes,
.ebm-acc .ebm-acc-modes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}
.ebm-acc .ebm-acc-bikes input,
.ebm-acc .ebm-acc-modes input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.ebm-acc .ebm-acc-bikes label {
    height: 64px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    text-align: center;
    line-height: 1.1;
    cursor: pointer;
}
.ebm-acc .ebm-acc-bikes label > span:first-child {
    font-size: 22px;
    line-height: 1;
}
.ebm-acc .ebm-acc-bikes input:checked + label {
    border: 2px solid #0d6efd;
    background: #e7f0ff;
    color: #0d6efd;
    font-weight: 700;
}
.ebm-acc .ebm-acc-modes {
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: #f1f5f9;
}
.ebm-acc .ebm-acc-modes label {
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
}
.ebm-acc .ebm-acc-modes input:checked + label {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
    color: #0f172a;
    font-weight: 700;
}
.ebm-acc .ebm-acc-bikes input:focus-visible + label,
.ebm-acc .ebm-acc-modes input:focus-visible + label {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}
/* Moje trasy: hľadanie, triedenie, kompaktné riadky, „Zobraziť ďalšie“ */
.ebm-acc .ebm-acc-routes {
    padding: 0;
    gap: 0;
    overflow: hidden;
}
.ebm-acc .ebm-acc-routes-offline {
    padding: 10px 14px 0;
    font-size: 12px;
    color: #64748b;
}
.ebm-acc .ebm-acc-routes-tools {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid #eef2f7;
}
.ebm-acc .ebm-acc-routes-search {
    position: relative;
}
.ebm-acc .ebm-acc-routes-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}
.ebm-acc .ebm-acc-routes-search .form-control {
    min-height: 44px;
    padding-left: 38px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 16px;
}
.ebm-acc .ebm-acc-routes-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.ebm-acc .ebm-acc-routes-count {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}
.ebm-acc .ebm-acc-routes-sort {
    width: auto;
    min-height: 36px;
    padding-top: 4px;
    padding-bottom: 4px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
}
.ebm-acc .ebm-acc-routes-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.ebm-acc .ebm-acc-route {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 6px 0 0;
    border-bottom: 1px solid #eef2f7;
}
.ebm-acc .ebm-acc-route:last-child {
    border-bottom: 0;
}
.ebm-acc .ebm-acc-route-main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 6px 10px 14px;
    border: 0;
    background: transparent;
    text-align: left;
    color: #0f172a;
}
.ebm-acc .ebm-acc-route-main:active {
    background: #f1f5f9;
}
.ebm-acc .ebm-acc-route-ico {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #e7f0ff;
    color: #0d6efd;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ebm-acc .ebm-acc-route-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ebm-acc .ebm-acc-route-text strong {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ebm-acc .ebm-acc-route-meta {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ebm-acc .ebm-acc-route-text .badge {
    align-self: flex-start;
    margin: 2px 0 0 !important;
}
.ebm-acc .ebm-acc-route-act {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ebm-acc .ebm-acc-route-act.is-danger {
    color: #dc3545;
}
.ebm-acc .ebm-acc-route-act:active {
    background: #f1f5f9;
}
.ebm-acc .ebm-acc-routes-more {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-top: 1px solid #eef2f7;
    background: #ffffff;
    color: #0d6efd;
    font-size: 15px;
    font-weight: 700;
}
.ebm-acc .ebm-acc-routes-empty {
    margin: 0;
    padding: 18px 14px;
    color: #64748b;
    text-align: center;
    list-style: none;
}
.ebm-acc .ebm-acc-code::placeholder {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0;
}
/* Moje trasy: celé údaje – názov na 2 riadky, údaje sa zalomia (bez orezania „…“). */
.ebm-acc .ebm-acc-route-text strong {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.25;
}
.ebm-acc .ebm-acc-route-meta {
    white-space: normal;
    overflow: visible;
    line-height: 1.35;
}
/* Dlhé preklady (de, hu, es, it, da …): karty účtu s ikonou nad textom a zalomením, nič sa neoreže „…“. */
.ebm-acc .ebm-acc-tabs .nav-link {
    height: auto;
    min-height: 52px;
    padding: 6px 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 11.5px;
    line-height: 1.15;
    white-space: normal;
    overflow: hidden;
    text-overflow: clip;
    text-align: center;
    hyphens: auto;
    -webkit-hyphens: auto;
    overflow-wrap: anywhere;
}
.ebm-acc .ebm-acc-tabs .nav-link i {
    font-size: 15px;
}
/* Dlaždice bicyklov (účet, plánovač, spodný panel): text na 2 riadky, menšie písmo. */
.ebm-acc .ebm-acc-bikes label,
#routeSettingsPanel .ebm-pl-bikes .modern-selector-title,
.ebm-route-map-bar .ebm-route-map-bar-bikes .ebm-rmb-mode-label {
    font-size: 11.5px;
    line-height: 1.1;
}
.ebm-acc .ebm-acc-bikes label > span:last-child,
#routeSettingsPanel .ebm-pl-bikes .modern-selector-title > span:last-child,
.ebm-route-map-bar .ebm-rmb-mode-txt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    text-overflow: clip;
    max-width: 100%;
    padding: 0 2px;
    hyphens: auto;
    -webkit-hyphens: auto;
}
.ebm-acc .ebm-acc-bikes label,
#routeSettingsPanel .ebm-pl-bikes .modern-selector-label {
    height: 68px;
}
/* Režimy (napr. „Izklopljeno“, „Wyłączony“) – menšie písmo, aby sa zmestili. */
.ebm-acc .ebm-acc-modes label,
#routeSettingsPanel .ebm-pl-modes .modern-selector-title,
.ebm-route-map-bar .ebm-route-map-bar-modes .ebm-rmb-mode-label {
    font-size: 12px;
}
.ebm-acc .ebm-acc-tabs .nav-link > span {
    display: block;
    max-width: 100%;
    min-width: 0;
}
/* Prihlásenie cez Google (natívne tlačidlo v appke) – biele, s farebným G, rovnaká veľkosť ako Apple. */
.ebm-acc .ebm-acc-btn.is-google {
    gap: 10px;
    background: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
    font-weight: 600;
}
.ebm-acc .ebm-acc-btn.is-google:active {
    background: #f8f9fa;
}
.ebm-acc .ebm-acc-btn.is-dark {
    gap: 10px;
}
.ebm-acc #ebm-google-signin {
    width: 100%;
}
/* Web: bez navigácie → hlavné tlačidlo spodného panela je „Upraviť trasu“ (modré). */
.ebm-rmb-primary.is-blue {
    background: #0d6efd;
}
.ebm-rmb-primary.is-blue:active {
    background: #0a58ca;
}

/* ===== Web na širokej obrazovke (≥ 900 px): spodný panel trasy ako nízky vodorovný pás – trasa ostane viditeľná.
   Všetko v jednom riadku (štatistiky · bicykel · režim · nástroje · tlačidlá), bez úchytu a zbaľovania;
   výškový profil sa otvorí pod pásom na celú šírku. Na mobile ostáva posuvný panel. ===== */
@media (min-width: 900px) {
    .ebm-route-map-bar,
    .ebm-route-map-bar:not(.ebm-rmb-collapsed),
    .ebm-route-map-bar.ebm-route-map-bar--profile {
        max-height: none;
    }
    .ebm-route-map-bar .ebm-route-map-bar-inner,
    .ebm-route-map-bar:not(.ebm-rmb-collapsed) .ebm-route-map-bar-inner,
    .ebm-route-map-bar.ebm-route-map-bar--profile .ebm-route-map-bar-inner {
        position: relative;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px 18px;
        max-width: min(1320px, calc(100% - 32px));
        max-height: min(70vh, 560px);
        margin: 0 auto 14px;
        padding: 12px 60px 12px 18px;
        border-radius: 22px;
        overflow-y: auto;
    }
    .ebm-route-map-bar .ebm-rmb-grabber {
        display: none;
    }
    .ebm-route-map-bar .ebm-route-map-bar-head {
        flex: 0 0 auto;
    }
    .ebm-route-map-bar .ebm-route-map-bar-close {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }
    .ebm-route-map-bar .ebm-rmb-km {
        font-size: 26px;
    }
    .ebm-route-map-bar .ebm-rmb-more,
    .ebm-route-map-bar.ebm-rmb-collapsed .ebm-rmb-more {
        display: flex;
        flex-direction: row;
        flex: 1 1 auto;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px 18px;
        margin: 0;
        padding: 0;
        border-top: 0;
    }
    .ebm-route-map-bar .ebm-rmb-label {
        display: none;
    }
    .ebm-route-map-bar .ebm-route-map-bar-bikes {
        flex: 0 0 280px;
        margin: 0;
    }
    .ebm-route-map-bar .ebm-route-map-bar-bikes .ebm-rmb-mode-label {
        height: 54px;
    }
    .ebm-route-map-bar .ebm-route-map-bar-modes {
        flex: 0 0 260px;
        margin: 0;
    }
    .ebm-route-map-bar .ebm-rmb-tools {
        flex: 0 0 auto;
        margin: 0;
    }
    .ebm-route-map-bar .ebm-rmb-tools button {
        flex: 0 0 70px;
        height: 56px;
    }
    .ebm-route-map-bar .ebm-route-map-bar-actions {
        order: 5;
        flex: 0 0 auto;
        margin: 0 0 0 auto;
    }
    .ebm-route-map-bar .ebm-rmb-primary {
        flex: 0 0 auto;
        height: 48px;
        padding: 0 20px;
        font-size: 16px;
    }
    .ebm-route-map-bar .ebm-rmb-secondary {
        flex: 0 0 48px;
        height: 48px;
    }
    .ebm-route-map-bar .ebm-route-map-bar-profile {
        flex: 1 1 100%;
        order: 6;
        margin: 0;
    }
}
@media (min-width: 900px) {
    /* Kompaktnejšie, aby sa všetko zmestilo do jedného riadku: nástroje len ako ikony (popis pri prejdení myšou). */
    .ebm-route-map-bar .ebm-route-map-bar-bikes {
        flex-basis: 236px;
    }
    .ebm-route-map-bar .ebm-route-map-bar-bikes .ebm-rmb-mode-label {
        height: 56px;
        font-size: 11px;
    }
    .ebm-route-map-bar .ebm-route-map-bar-modes {
        flex-basis: 212px;
    }
    .ebm-route-map-bar .ebm-rmb-tools {
        gap: 6px;
    }
    .ebm-route-map-bar .ebm-rmb-tools button {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }
    .ebm-route-map-bar .ebm-rmb-tools button span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
    .ebm-route-map-bar .ebm-rmb-tools button i {
        font-size: 17px;
    }
}

/* Režimy v spodnom paneli sa nezalamujú (pravidlo pre názvy bicyklov platí len pre dlaždice bicyklov). */
.ebm-route-map-bar .ebm-route-map-bar-modes .ebm-rmb-mode-txt {
    display: inline;
    white-space: nowrap;
    -webkit-line-clamp: unset;
    hyphens: none;
    -webkit-hyphens: none;
    padding: 0;
}
@media (min-width: 900px) {
    .ebm-route-map-bar .ebm-route-map-bar-inner,
    .ebm-route-map-bar:not(.ebm-rmb-collapsed) .ebm-route-map-bar-inner,
    .ebm-route-map-bar.ebm-route-map-bar--profile .ebm-route-map-bar-inner,
    .ebm-route-map-bar .ebm-rmb-more,
    .ebm-route-map-bar.ebm-rmb-collapsed .ebm-rmb-more {
        column-gap: 14px;
    }
    .ebm-route-map-bar .ebm-route-map-bar-bikes {
        flex-basis: 232px;
    }
    .ebm-route-map-bar .ebm-route-map-bar-bikes .ebm-rmb-mode-label {
        height: 60px;
        font-size: 10.5px;
    }
}
/* AI popis trasy: názov a pod ním poznámka o AI, vpravo vypínač (predvolene vypnutý). */
#routeSettingsPanel .ebm-pl-ai-head {
    align-items: center;
}
#routeSettingsPanel .ebm-pl-ai-title {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
#routeSettingsPanel .ebm-pl-ai-title small {
    text-align: left;
}
#routeSettingsPanel .ebm-pl-ai-head > .form-check {
    flex: 0 0 auto;
}
#routeSettingsPanel .ebm-pl-ai-head .form-check-input {
    width: 2.6em;
    height: 1.45em;
    margin: 0;
    cursor: pointer;
}
#routeSettingsPanel .ebm-pl-ai-head .form-check-input:checked {
    background-color: #198754;
    border-color: #198754;
}
/* Radar zrážok 10 px nad spodným panelom trasy (route.js: --ebm-rmb-h = vzdialenosť hornej hrany panela od spodku
   okna, trieda body.ebm-rmb-visible). Bez panela pôvodné miesto. */
body.ebm-rmb-visible .ebm-radar-hud {
    position: fixed;
    bottom: calc(var(--ebm-rmb-h, 0px) + 10px);
}
@media (min-width: 900px) {
    /* Celé názvy bicyklov a režimov v jednom riadku (napr. „Trekingový“, „Vypnutý“). */
    .ebm-route-map-bar .ebm-route-map-bar-inner,
    .ebm-route-map-bar:not(.ebm-rmb-collapsed) .ebm-route-map-bar-inner,
    .ebm-route-map-bar.ebm-route-map-bar--profile .ebm-route-map-bar-inner {
        max-width: min(1480px, calc(100% - 32px));
    }
    .ebm-route-map-bar .ebm-route-map-bar-bikes {
        flex-basis: 312px;
    }
    .ebm-route-map-bar .ebm-route-map-bar-bikes .ebm-rmb-mode-label {
        height: 56px;
        font-size: 11.5px;
    }
    .ebm-route-map-bar .ebm-route-map-bar-bikes .ebm-rmb-mode-txt {
        display: block;
        -webkit-line-clamp: unset;
        white-space: nowrap;
        overflow: visible;
        hyphens: none;
        -webkit-hyphens: none;
    }
    .ebm-route-map-bar .ebm-route-map-bar-modes {
        flex-basis: 292px;
    }
}

/* ===== Jednotný moderný štýl bočných panelov (2026-11-01): Hľadať, Najbližšie, Okruh, Filter, Offline mapy, Info,
   AI asistent, Detail miesta, Pridať miesto, Návrh úpravy – ako plánovač a Môj účet. Trieda .ebm-ui na paneli,
   .ebm-ui-flat = biele telo (súvislý text / formulár). Markup, ID a texty bez zmeny. ===== */
.offcanvas.ebm-ui {
    background: #ffffff;
    color: #0f172a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.ebm-ui > .offcanvas-header {
    background: #ffffff !important;
    color: #0f172a !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 12px 16px;
    gap: 8px;
}
.ebm-ui > .offcanvas-header .offcanvas-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: #0f172a !important;
}
.ebm-ui > .offcanvas-header .offcanvas-title i {
    margin-right: 6px;
}
.ebm-ui > .offcanvas-header .offcanvas-title i.text-white {
    color: #f59e0b !important;
}
.ebm-ui > .offcanvas-header .btn-close {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border-radius: 20px;
    background-color: #f1f5f9;
    background-size: 13px;
    opacity: 0.8;
    filter: none !important;
}
.ebm-ui > .offcanvas-body {
    background: #f1f5f9 !important;
    padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
    font-size: 15px;
}
.ebm-ui.ebm-ui-flat > .offcanvas-body {
    background: #ffffff !important;
}
/* Formuláre */
.ebm-ui .form-label,
.ebm-ui label.small.fw-bold {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}
.ebm-ui .form-control,
.ebm-ui .form-select {
    min-height: 46px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    font-size: 16px;
    background-color: #ffffff;
}
.ebm-ui textarea.form-control {
    min-height: 90px;
}
.ebm-ui .form-control:focus,
.ebm-ui .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}
.ebm-ui .input-group > .form-control,
.ebm-ui .input-group > .btn,
.ebm-ui .input-group > .input-group-text {
    min-height: 46px;
}
.ebm-ui .input-group > :first-child {
    border-top-left-radius: 14px !important;
    border-bottom-left-radius: 14px !important;
}
.ebm-ui .input-group > :last-child {
    border-top-right-radius: 14px !important;
    border-bottom-right-radius: 14px !important;
}
.ebm-ui .form-check-input {
    cursor: pointer;
}
.ebm-ui .form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}
.ebm-ui .form-switch .form-check-input:checked {
    background-color: #198754;
    border-color: #198754;
}
/* Tlačidlá */
.ebm-ui .btn {
    border-radius: 14px;
    font-weight: 600;
    min-height: 44px;
}
.ebm-ui .btn-sm {
    min-height: 36px;
    border-radius: 11px;
    font-size: 14px;
}
.ebm-ui .btn-link {
    min-height: 0;
}
.ebm-ui .btn-primary {
    background: #0d6efd;
    border-color: #0d6efd;
}
.ebm-ui .btn-success {
    background: #198754;
    border-color: #198754;
}
.ebm-ui .btn-outline-primary {
    background: #e7f0ff;
    border-color: #cfe0ff;
    color: #0d6efd;
}
.ebm-ui .btn-outline-secondary {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #334155;
}
.ebm-ui .btn-outline-danger {
    background: #fff5f5;
    border-color: #fecaca;
    color: #dc3545;
}
/* Zoznamy, akordeón, upozornenia, štítky */
.ebm-ui .list-group {
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.ebm-ui .list-group-flush {
    border-radius: 18px;
}
.ebm-ui .list-group-item {
    border-color: #eef2f7;
    padding: 12px 14px;
}
.ebm-ui .list-group-item-action:active {
    background: #f1f5f9;
}
.ebm-ui .accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ebm-ui .accordion-item {
    border: 0;
    border-radius: 18px !important;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.ebm-ui .accordion-button {
    min-height: 54px;
    font-weight: 700;
    font-size: 15px;
    color: #0f172a;
    background: #ffffff;
    box-shadow: none !important;
}
.ebm-ui .accordion-button:not(.collapsed) {
    background: #ffffff;
    color: #0f172a;
    border-bottom: 1px solid #eef2f7;
}
.ebm-ui .accordion-body {
    padding: 8px 10px 12px;
}
.ebm-ui .alert {
    border: 0;
    border-radius: 14px;
    font-size: 14px;
}
.ebm-ui .alert-info {
    background: #e7f0ff;
    color: #0a4fb3;
}
.ebm-ui .alert-warning {
    background: #fff7ed !important;
    color: #9a3412 !important;
}
.ebm-ui .badge {
    border-radius: 999px;
    padding: 5px 10px;
    font-weight: 600;
}
.ebm-ui hr {
    border-color: #e2e8f0;
    opacity: 1;
}
/* Okruh: sekcie ako karty, bicykel ako dlaždice, hlavné tlačidlo modré */
#loopPanel.ebm-ui > .offcanvas-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
#loopPanel.ebm-ui > .offcanvas-body > div:not(.alert) {
    margin: 0 !important;
    background: #ffffff;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
#loopPanel.ebm-ui > .offcanvas-body > .alert {
    margin: 0;
}
#loopPanel.ebm-ui .rounded-3.bg-white.border {
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}
#loopPanel.ebm-ui .modern-selector-group {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 0;
}
#loopPanel.ebm-ui .modern-selector-label {
    height: 64px;
    padding: 4px 2px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: none;
}
#loopPanel.ebm-ui .modern-selector-title {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    line-height: 1.15;
}
#loopPanel.ebm-ui .modern-selector-group input[type="radio"]:checked + .modern-selector-label {
    border: 2px solid #0d6efd;
    background: #e7f0ff;
    box-shadow: none;
}
#loopPanel.ebm-ui .modern-selector-group input[type="radio"]:checked + .modern-selector-label .modern-selector-title {
    color: #0d6efd;
    font-weight: 700;
}
#loopPanel.ebm-ui #btn-generate-loop {
    min-height: 54px;
    border-radius: 16px !important;
    background: #0d6efd !important;
    font-size: 17px;
}
/* AI asistent */
#aiChatPanel.ebm-ui .ai-chat-disclosure {
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
    border-bottom: 1px solid #e2e8f0;
}
#aiChatPanel.ebm-ui > .offcanvas-body {
    padding: 0;
}
#aiChatPanel.ebm-ui .ai-chat-input-bar {
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)) !important;
}
#aiChatPanel.ebm-ui #chat-input {
    min-height: 48px;
    border-radius: 24px 0 0 24px !important;
    background: #f1f5f9 !important;
}
#aiChatPanel.ebm-ui .ai-chat-input-bar .btn {
    min-width: 54px;
    border-radius: 0 24px 24px 0 !important;
}
/* Detail miesta */
#stationDetailPanel.ebm-ui .station-photo {
    border-radius: 16px;
}
/* Môj účet → Trasy: prepínač Plánované / Jazdy */
.ebm-acc .ebm-acc-seg {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 10px;
    border-radius: 14px;
    background: #eef2f7;
}
.ebm-acc .ebm-acc-seg button {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
}
.ebm-acc .ebm-acc-seg button.is-active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
}
.ebm-acc .ebm-ride-consent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 2px 12px;
    margin-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
}
.ebm-acc .ebm-ride-consent strong {
    display: block;
    font-size: 14px;
}
.ebm-acc .ebm-ride-consent small {
    display: block;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}
.ebm-acc .ebm-ride-consent .form-check-input {
    width: 2.6em;
    height: 1.4em;
}
.ebm-acc .ebm-ride-hrb {
    color: #ef4444;
    font-weight: 700;
    white-space: nowrap;
}
.ebm-acc .ebm-hr-max {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
    color: #475569;
}
.ebm-acc .ebm-hr-max input {
    width: 84px;
    min-height: 38px;
    border-radius: 10px;
    text-align: center;
    font-weight: 700;
}
/* Súhrn jazdy (rides.js) */
.ebm-ride-popup .swal2-actions.ebm-ride-actions {
    width: 100%;
    flex-direction: column;
    gap: 8px;
    margin: 14px 0 0;
}
.ebm-ride-popup .ebm-ride-actions .swal2-deny {
    order: -1;
}
.swal2-popup.ebm-ride-popup {
    width: min(460px, calc(100vw - 24px));
    padding: 14px 14px 18px;
    border-radius: 20px;
}
.ebm-ride-popup .swal2-html-container {
    margin: 6px 0 0;
    padding: 0;
    max-height: 68vh;
    overflow-y: auto;
    text-align: left;
}
.ebm-ride-sum .ebm-ride-head {
    margin-bottom: 8px;
}
.ebm-ride-sum .ebm-ride-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}
.ebm-ride-sum .ebm-ride-date {
    font-size: 13px;
    color: #64748b;
}
.ebm-ride-sum .ebm-ride-track {
    display: block;
    width: 100%;
    height: 170px;
    margin-bottom: 10px;
    border-radius: 14px;
    background: #f1f5f9;
}
.ebm-ride-sum .ebm-ride-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.ebm-ride-sum .ebm-ride-stat {
    display: grid;
    grid-template-columns: 20px 1fr;
    column-gap: 6px;
    align-items: center;
    padding: 9px 10px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.ebm-ride-sum .ebm-ride-stat i {
    grid-row: span 2;
    color: #2563eb;
    text-align: center;
}
.ebm-ride-sum .ebm-ride-stat .fa-heart,
.ebm-ride-sum .ebm-ride-stat .fa-heartbeat {
    color: #ef4444;
}
.ebm-ride-sum .ebm-ride-stat span {
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.2;
}
.ebm-ride-sum .ebm-ride-stat strong {
    font-size: 15.5px;
    color: #0f172a;
    line-height: 1.25;
}
.ebm-ride-sum .ebm-ride-sec {
    margin: 14px 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}
.ebm-ride-sum .ebm-ride-profile {
    display: block;
    width: 100%;
    height: 130px;
    border-radius: 12px;
    background: #f8fafc;
}
.ebm-ride-sum .ebm-ride-prof {
    position: relative;
    touch-action: pan-y;
    cursor: crosshair;
    user-select: none;
    -webkit-user-select: none;
}
.ebm-ride-sum .ebm-ride-prof-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 1.5px solid #2563eb;
    pointer-events: none;
}
.ebm-ride-sum .ebm-ride-prof-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: #2563eb;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
    pointer-events: none;
}
.ebm-ride-sum .ebm-ride-prof-tip {
    position: absolute;
    top: -30px;
    white-space: nowrap;
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(15, 23, 42, .88);
    color: #fff;
    font-size: 12px;
    pointer-events: none;
}
.ebm-ride-sum .ebm-ride-prof-tip .is-hr {
    color: #fca5a5;
}
.ebm-ride-sum .ebm-ride-ax {
    font-size: 10px;
    fill: #64748b;
}
.ebm-ride-sum .ebm-ride-ax.is-hr {
    fill: #ef4444;
}
.ebm-ride-sum .ebm-ride-zbar {
    display: flex;
    height: 12px;
    overflow: hidden;
    border-radius: 6px;
    background: #e2e8f0;
}
.ebm-ride-sum .ebm-ride-zones ul {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}
.ebm-ride-sum .ebm-ride-zones li {
    display: grid;
    grid-template-columns: 12px 1fr auto auto;
    gap: 8px;
    align-items: center;
    padding: 3px 0;
    font-size: 13px;
}
.ebm-ride-sum .ebm-ride-zones li i {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}
.ebm-ride-sum .ebm-ride-zones li em {
    color: #64748b;
    font-style: normal;
    font-size: 12px;
}
.ebm-ride-sum .ebm-ride-zones li strong {
    min-width: 64px;
    text-align: right;
}
.ebm-ride-sum .ebm-ride-note {
    margin-top: 10px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

/* Náhľady trás a jázd v zozname (route-thumb.js): mapka namiesto ikony, keď je hotová */
.ebm-acc .ebm-acc-route-ico.has-thumb {
    width: 72px;
    height: 48px;
    overflow: hidden;
    background: #e5e7eb;
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}
.ebm-acc .ebm-acc-route-ico.has-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Zoznam trás a jázd ako karty: náhľad mapy na šírku hore, údaje pod ním, upraviť/zmazať v rohu náhľadu. */
/* Záložka účtu je flex stĺpec – karta so zoznamom sa nesmie zmenšiť na výšku obrazovky (overflow: hidden by
   zvyšok orezal a zoznam sa nedal posúvať). */
.ebm-acc .ebm-acc-routes {
    flex-shrink: 0;
}
.ebm-acc .ebm-acc-routes-list {
    padding: 12px 12px 0;
}
.ebm-acc .ebm-acc-route {
    position: relative;
    display: block;
    padding: 0;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.ebm-acc .ebm-acc-route:last-child {
    border-bottom: 1px solid #e2e8f0;
}
.ebm-acc .ebm-acc-route-main {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
}
.ebm-acc .ebm-acc-route-ico,
.ebm-acc .ebm-acc-route-ico.has-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 0;
    font-size: 28px;
    box-shadow: none;
}
.ebm-acc .ebm-acc-route-text {
    padding: 10px 14px 12px;
}
.ebm-acc .ebm-acc-route > .ebm-acc-route-act {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
}
.ebm-acc .ebm-acc-route > .ebm-acc-route-act:nth-last-child(2) {
    right: 52px;
}
.ebm-acc .ebm-acc-route > .ebm-acc-route-act:active {
    background: #f1f5f9;
}
/* Súhrn jazdy: mapa s čiarou */
.ebm-ride-sum .ebm-ride-map {
    margin-bottom: 10px;
    border-radius: 14px;
    overflow: hidden;
    background: #f1f5f9;
}
.ebm-ride-sum .ebm-ride-map .ebm-ride-track {
    margin-bottom: 0;
}
.ebm-ride-sum .ebm-ride-map img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* ===== Bubliny na mape (klik na mapu, POI bod, výsledok hľadania) – moderný štýl, 2026-11-09 ===== */
.ebm-map-popup .leaflet-popup-content-wrapper {
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.22);
}
.ebm-map-popup .leaflet-popup-content-wrapper {
  overflow: hidden;
}
/* Odsadenie paddingom, nie marginom – margin „prepadol“ von z bubliny (wrapper bez paddingu) a nadpis
   aj spodný odkaz sa lepili na okraj. */
.ebm-map-popup .leaflet-popup-content {
  margin: 0;
  padding: 16px 16px 14px;
}
.ebm-map-popup a.leaflet-popup-close-button {
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  font-size: 20px;
  line-height: 29px;
  text-align: center;
}
.ebm-pop {
  text-align: left;
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.ebm-pop-head {
  padding-right: 40px;
  margin-bottom: 10px;
}
.ebm-pop-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  color: #0f172a;
  min-height: 1.3em;
}
.ebm-pop-cat {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 11px;
  font-weight: 700;
}
.ebm-pop-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.ebm-pop-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}
/* Výška a počasie (klik na mapu): každé na vlastnom riadku, bez zalamovania; na celú šírku bubliny
   (hlavička má vpravo rezervu pre krížik – tá platí len pre nadpis). */
.ebm-pop-head .ebm-pop-meta.is-stack {
  flex-direction: column;
  align-items: flex-start;
  margin-right: -40px;
}
.ebm-pop-meta.is-stack .ebm-pop-chip {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ebm-pop-meta.is-stack > div {
  max-width: 100%;
}
/* Súradnice: štítok ako tlačidlo – ťuknutie skopíruje „lat, lng“. */
.ebm-map-popup .leaflet-popup-content .ebm-pop-chip.is-copy {
  border: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.ebm-pop-chip.is-copy:active {
  background: #e2e8f0;
}
.ebm-pop-copy-ico {
  margin-left: 4px;
  color: #94a3b8;
}
.ebm-pop-cat {
  margin-top: 8px;
}
.ebm-pop-chip:empty {
  display: none;
}
.ebm-pop-chip.is-warn {
  background: #fffbeb;
  color: #b45309;
}
.ebm-pop-chip.is-muted {
  color: #94a3b8;
}
.ebm-pop-sub {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.3;
  color: #64748b;
  max-height: 48px;
  overflow: hidden;
}
.ebm-pop-coords {
  margin-top: 4px;
  font-size: 11px;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}
.ebm-pop .poi-popup-details {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f8fafc;
}
.ebm-pop hr {
  display: none;
}
.ebm-map-popup .leaflet-popup-content .ebm-pop-route {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 10px;
}
.ebm-map-popup .leaflet-popup-content .ebm-pop-route.is-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 8px;
}
.ebm-map-popup .leaflet-popup-content .ebm-pop-route.is-one {
  grid-template-columns: 1fr;
  margin-top: 8px;
}
.ebm-map-popup .leaflet-popup-content .ebm-pop-rbtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 9px 4px;
  border: 0;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}
.ebm-pop-rbtn i {
  font-size: 15px;
}
.ebm-pop-rbtn.is-start {
  background: #dcfce7;
  color: #15803d;
}
.ebm-pop-rbtn.is-via {
  background: #dbeafe;
  color: #1d4ed8;
}
.ebm-pop-rbtn.is-end {
  background: #fee2e2;
  color: #b91c1c;
}
.ebm-pop-route.is-one .ebm-pop-rbtn,
.ebm-pop-route.is-two .ebm-pop-rbtn {
  flex-direction: row;
  gap: 7px;
  padding: 10px 6px;
  font-size: 13px;
}
.ebm-map-popup .leaflet-popup-content .ebm-pop-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: #16a34a;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(22, 163, 74, 0.25);
}
.ebm-pop-list {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: #f8fafc;
  overflow: hidden;
}
.ebm-pop-list > * + * {
  border-top: 1px solid #eef2f7 !important;
}
.ebm-map-popup .leaflet-popup-content .ebm-pop-list .ebm-pop-item,
.ebm-map-popup .leaflet-popup-content .ebm-pop-list .btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  box-shadow: none;
}
.ebm-map-popup .leaflet-popup-content .ebm-pop-list .ebm-pop-item:active,
.ebm-map-popup .leaflet-popup-content .ebm-pop-list .btn:active {
  background: #eef2f7;
}
.ebm-pop-list .ebm-pop-item i,
.ebm-pop-list .btn i {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin: 0 !important;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--c, #2563eb);
  background: color-mix(in srgb, var(--c, #2563eb) 13%, #ffffff);
  font-size: 13px;
}
.ebm-map-popup .leaflet-popup-content .ebm-pop-link {
  display: block;
  margin: 10px auto 0;
  padding: 2px 6px;
  border: 0;
  background: none;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}
.ebm-pop-link i {
  margin-right: 4px;
}
.ebm-pop .ebm-pop-list + .ebm-pop-link,
.ebm-pop .ebm-pop-route + .ebm-pop-link {
  margin-top: 8px;
}

/* Výška a počasie v bubline na jednom riadku – staršie pravidlo podľa ID (#popup-…-display { white-space: normal })
   malo prednosť pred .ebm-pop-meta.is-stack a text sa zalamoval. */
.ebm-map-popup #popup-elevation-display,
.ebm-map-popup #popup-wind-display,
.ebm-map-popup #search-popup-elevation-badge {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Web: bublina s moderným obsahom má minimálnu šírku – inak sa zúžila podľa krátkeho nadpisu a štítky (výška,
   počasie) sa skracovali trojbodkou. Na úzkom displeji najviac podľa dostupného miesta. */
.ebm-map-popup .leaflet-popup-content-wrapper:has(.ebm-pop) {
  min-width: min(290px, var(--ebm-map-popup-max-width, 290px), calc(100vw - 32px)) !important;
}
.ebm-map-popup .leaflet-popup-content:has(.ebm-pop) {
  width: auto !important;
}

/* Výstražný trojuholník na nespevnenom úseku trasy (cestný bicykel) */
.ebm-rough-warn {
    background: transparent;
    border: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

/* Výstrahy na trase (route-warnings.js): štítok v paneli trasy je tlačidlo, zoznam v okne */
button.ebm-rmb-chip {
    border: 0;
    cursor: pointer;
}
.ebm-warn-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    /* Veľa výstrah: posúva sa zoznam, okno ostane na obrazovke (inak je krížik mimo obrazovky). */
    max-height: calc(100dvh - 220px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.ebm-warn-item {
    flex-shrink: 0;
}
.ebm-warn-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background: #fef2f2;
    color: #0f172a;
    text-align: left;
}
.ebm-warn-item > i {
    color: #dc2626;
    font-size: 18px;
}
.ebm-warn-item span {
    display: flex;
    flex-direction: column;
}
.ebm-warn-item small {
    color: #64748b;
}

/* Štítok výstrah vedľa km a času */
.ebm-rmb-main .ebm-rmb-chip.is-rough {
    align-self: center;
}

/* Odznak výstrah „⚠ N“ (spodný panel trasy aj panel plánovača) */
.ebm-route-warn-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 0;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
    align-self: center;
}
.ebm-route-warn-slot {
    margin-left: auto;
    align-self: center;
}
.ebm-route-warn-slot:empty {
    display: none;
}

/* Stav senzora nabíjačky v detaile stanice (app.js ebmRenderStationSensor) */
.ebm-station-sensor {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.ebm-sensor-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #9ca3af;
    flex: 0 0 auto;
}
.ebm-station-sensor.is-online .ebm-sensor-dot {
    background: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}
.ebm-station-sensor.is-online strong { color: #15803d; }
.ebm-station-sensor.is-offline .ebm-sensor-dot { background: #dc2626; }
.ebm-station-sensor.is-offline strong { color: #b91c1c; }
.ebm-station-sensor.is-never strong { color: #6b7280; font-weight: 600; }
.ebm-sensor-when { color: #6b7280; }

/* Zelená bodka na značke nabíjačky – senzor stanice je online (source.js createBoltMarkerIcon) */
/* Zelená bodka pri názve stanice v zozname „Najbližšie stanice“ (senzor online). */
.ebm-near-online-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-left: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
    vertical-align: middle;
}
.ebm-marker-online-dot {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
}

/* Predpoveď v bubline značky počasia (ebmWxFcHtml): pás najbližších hodín a ďalšie dni. */
.ebm-wx-fc {
  margin-top: 8px;
  border-top: 1px solid #e2e8f0;
  padding-top: 6px;
  font-family: inherit;
  text-align: left;
}
.ebm-wx-fc-title {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin: 4px 0 3px;
}
.ebm-wx-fc-hours {
  display: flex;
  justify-content: space-between;
  gap: 2px;
}
.ebm-wx-fc-h {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  font-size: 11px;
  line-height: 1.35;
  color: #334155;
}
.ebm-wx-fc-t,
.ebm-wx-fc-s {
  color: #94a3b8;
  font-size: 10px;
}
.ebm-wx-fc-v {
  font-weight: 700;
  font-size: 12px;
}
.ebm-wx-fc-d {
  display: grid;
  grid-template-columns: 34px 20px 1fr auto auto;
  align-items: center;
  column-gap: 6px;
  font-size: 12px;
  color: #334155;
  padding: 2px 0;
}
.ebm-wx-fc-dn {
  font-weight: 600;
  text-transform: capitalize;
}
.ebm-wx-fc-dt {
  font-weight: 700;
  white-space: nowrap;
}
.ebm-wx-fc-ds {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
}
.ebm-wx-fc-note,
.ebm-wx-fc-src {
  font-size: 11px;
  color: #94a3b8;
}
.ebm-wx-fc-src {
  margin-top: 4px;
  font-size: 9px;
  text-align: right;
}
