.ta-route-wrapper {
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .ta-route-wrapper {
    padding: 1rem 0.75rem;
    border-radius: 12px;
  }
}

.ta-route-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.ta-route-kpi {
  flex: 1 1 140px;
  box-sizing: border-box;
  padding: 0.75rem 0.9rem;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.ta-route-kpi-main {
  flex-basis: 220px;
}

.ta-route-kpi-label {
  margin-bottom: 0.2rem;
  color: #666666;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ta-route-kpi-value {
  color: #b13535;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.ta-route-kpi-arrow {
  display: inline-block;
  margin: 0 0.4rem;
  color: #444444;
  font-weight: 500;
}

@media (max-width: 640px) {
  .ta-route-kpi {
    padding: 0.65rem 0.7rem;
  }

  .ta-route-kpi-value {
    font-size: 1rem;
  }
}

.ta-route-map-wrap {
  position: relative;
  overflow: hidden;
  margin-bottom: 1.3rem;
  border: 1px solid #dddddd;
  border-radius: 14px;
  background: #fafafa;
}

.ta-route-map {
  position: relative;
  width: 100%;
  height: 360px;
  background: #f4f5f6;
}

.ta-route-map-loading,
.ta-route-map-message {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  padding: 1.25rem;
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}

.ta-route-map-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  min-height: 100%;
  background: #f4f5f6;
}

.ta-route-map-wrap > .ta-route-map-message {
  min-height: 360px;
}

.ta-route-map-static-message {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.ta-route-map-static-message > .ta-route-map-message {
  min-height: 100%;
}

.ta-route-map-notice {
  padding: 0.65rem 0.9rem;
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #59616c;
  font-size: 0.84rem;
  line-height: 1.4;
  text-align: center;
}

.ta-route-map-notice[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .ta-route-map {
    height: 260px;
  }

  .ta-route-map-wrap > .ta-route-map-message {
    min-height: 260px;
  }
}

.ta-route-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 1rem 0 1.5rem;
  padding: 0.9rem 1rem;
  border: 1px solid #e4e4e4;
  border-radius: 12px;
  background: #ffffff;
}

.ta-route-cta p {
  margin: 0;
  color: #333333;
  font-size: 0.95rem;
}

.ta-route-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: #b13535;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.ta-route-cta-btn:hover,
.ta-route-cta-btn:focus {
  color: #ffffff;
  opacity: 0.92;
}

@media (max-width: 640px) {
  .ta-route-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

.ta-route-seo {
  margin-top: 0.5rem;
}

.ta-route-seo-title {
  margin: 0 0 0.4rem;
  color: #222222;
  font-size: 1.05rem;
}

.ta-route-seo-text {
  color: #333333;
  font-size: 0.95rem;
  line-height: 1.6;
}

.ta-route-guidance {
  margin-top: 1.5rem;
}

.ta-route-guidance-title {
  margin: 0 0 0.75rem;
  color: #222222;
  font-size: 1.15rem;
}

.ta-route-guidance-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.ta-route-guidance-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0.18rem 0;
  padding-left: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.ta-route-guidance-list li::before {
  content: "➤";
  flex: 0 0 auto;
  margin-top: 0.25rem;
  color: #b13535;
  font-size: 0.8rem;
}

.ta-route-guidance-text {
  font-size: 0.95rem;
  line-height: 1.55;
}

.ta-route-map .leaflet-control-attribution {
  font-size: 0.7rem;
}

.ta-route-related {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed #dddddd;
}

.ta-route-related-title {
  margin: 0 0 0.5rem;
  color: #222222;
  font-size: 1.05rem;
}

.ta-route-related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ta-route-related-list li a {
  color: #b13535;
  font-size: 0.95rem;
  text-decoration: none;
}

.ta-route-related-list li a:hover,
.ta-route-related-list li a:focus {
  text-decoration: underline;
}

.ta-route-map-diagnostics {
  padding: 0.8rem 0.9rem;
  border-top: 1px solid #d9dde3;
  background: #f3f5f7;
  color: #303640;
  font-size: 0.8rem;
  line-height: 1.45;
}

.ta-route-map-diagnostics > strong {
  display: block;
  margin-bottom: 0.45rem;
}

.ta-route-map-diagnostics dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.3rem 0.8rem;
  margin: 0;
}

.ta-route-map-diagnostics dl > div {
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
  min-width: 0;
}

.ta-route-map-diagnostics dt,
.ta-route-map-diagnostics dd {
  margin: 0;
}

.ta-route-map-diagnostics dt {
  color: #5f6875;
}

.ta-route-map-diagnostics dd {
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}


/*
 * Lokalna markerja OD/DO. Zunanjih slik in privzetih Leaflet PNG ikon ne uporabljata.
 * Leafletove inline margin-left, margin-top in translate3d vrednosti ostanejo nedotaknjene,
 * zato iconAnchor natančno pripne spodnjo konico na prvo oziroma zadnjo točko trase.
 */
.ta-route-wrapper .leaflet-marker-pane .ta-route-div-icon {
  box-sizing: border-box;
  width: 34px !important;
  height: 42px !important;
  max-width: none !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.ta-route-wrapper .leaflet-marker-pane .ta-route-marker {
  --ta-route-marker-color: #15803d;

  position: relative;
  box-sizing: border-box !important;
  width: 34px !important;
  height: 42px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #ffffff !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-style: normal !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  pointer-events: none;
}

.ta-route-wrapper .leaflet-marker-pane .ta-route-marker--from {
  --ta-route-marker-color: #15803d;
}

.ta-route-wrapper .leaflet-marker-pane .ta-route-marker--to {
  --ta-route-marker-color: #b13535;
}

.ta-route-wrapper .leaflet-marker-pane .ta-route-marker__label {
  position: absolute;
  top: 1px;
  left: 2px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box !important;
  width: 30px !important;
  height: 30px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 2px solid #ffffff !important;
  border-radius: 50% !important;
  background: var(--ta-route-marker-color) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
  color: #ffffff !important;
  font: 800 9px/1 Arial, Helvetica, sans-serif !important;
  transform: none !important;
}

.ta-route-wrapper .leaflet-marker-pane .ta-route-marker__tip {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-right: 6px solid transparent !important;
  border-bottom: 0 solid transparent !important;
  border-left: 6px solid transparent !important;
  border-top: 11px solid var(--ta-route-marker-color) !important;
  transform: translateX(-50%) !important;
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.18));
}

.ta-route-wrapper .leaflet-marker-pane .ta-route-div-icon:focus {
  outline: 3px solid rgba(17, 24, 39, 0.75);
  outline-offset: 2px;
}

.ta-route-wrapper .leaflet-marker-pane .ta-route-div-icon:hover .ta-route-marker__label,
.ta-route-wrapper .leaflet-marker-pane .ta-route-div-icon:focus .ta-route-marker__label {
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.43) !important;
}
