.routes-container {
  display: block;
  position: relative;
  overflow: hidden;
}

/* Panel lateral */
.routes__list {
  position: absolute;
  left: 0;
  top: 0;
  width: 350px;
  max-width: 95vw;
  height: 100%;
  background: #f9f4e8;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.08);
  z-index: 500;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  display: block !important;
  overflow-y: auto;
}

.routes__list.active {
  transform: translateX(0);
}

.routes__list .routes__single__inner__content {
  display: block;
  height: auto;
  width: 100%;
  background-color: #f9f4e8;
  padding: 30px 30px 30px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Sistema de vistas */
.routes__view--hidden {
  display: none !important;
}

.routes__view--show {
  display: block !important;
}

/* Botón de volver */
.routes__back__container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.routes__back__btn {
  background: #148040;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.routes__back__btn:hover {
  background: #106030;
  transform: scale(1.1);
}

.routes__back__content {
  flex: 1;
}

/* Loading indicator */
.routes__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #148040;
}

.routes__loading__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e0e0e0;
  border-top: 3px solid #148040;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.routes__loading p {
  font-size: 14px;
  color: #283734;
}

/* Toggle button como pestaña */
.routes__toggle {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  z-index: 500;
  transition: left 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

.routes__list.active + .routes__toggle {
  left: 350px;
}

.routes__toggle .thm-primary-btn {
  border-radius: 0 6px 6px 0;
  box-shadow: 1px 2px 8px rgba(0, 0, 0, 0.08);
  border: none;
  padding: 36px 0px;
  min-width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.routes__toggle .thm-primary-btn:hover {
  transform: scale(1.05);
}

@media (max-width: 600px) {
  .routes__toggle .thm-primary-btn {
    min-width: 5vw;
  }
}

/* Headers */
.routes__single__inner__content__header h2 {
  font-size: 20px;
  margin: 0;
}

.routes__single__inner__content__header p {
  font-size: 14px;
  margin: 0;
}

.mobile-nav__close.routes__single__inner__content__header__close {
  color: #283734;
  cursor: pointer;
  font-size: 18px;
  padding: 5px;
}

.routes__single__inner__content__header__sup {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid #cec8b9;
  margin-bottom: 8px;
}

/* Botones de rutas */
.routes__single__inner__content__buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.route__item.route-list-item {
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid #d8d3c4;
  border-radius: 10px;
  padding: 10px 15px;
  position: relative;
}

.route__item__icon {
  height: auto;
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.route__item__icon span {
  font-size: 25px;
  color: #148040;
  background-color: #fff;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.route__item__icon svg {
  height: 50px;
  width: 50px;
}
.route__item.item-select,
.route__item:hover {
  background-color: #148040;
  color: #fff;
}

.route__item.item-select .route__item__content__category,
.route__item.item-select .route__item__content__title,
.route__item.item-select .route__item__content__subtitle,
.route__item.item-select .route__item__action {
  color: #fff;
}
.route__item:hover .route__item__content__category,
.route__item:hover .route__item__content__title,
.route__item:hover .route__item__content__subtitle,
.route__item:hover .route__item__action {
  color: #fff;
}

.route__item.item-select .route__item__icon svg path,
.route__item:hover .route__item__icon svg path {
  fill: #fff;
}

.route__item__content__category {
  font-size: 10px;
  font-weight: 500;
  color: #283734;
  line-height: 20px;
}

.route__item__content__title {
  font-size: 16px;
  font-weight: 800;
  color: #148040;
}

.route__item__content__subtitle {
  font-size: 12px;
  color: #283734;
  line-height: 1.5;
}

.route__item__action {
  font-size: 10px;
  margin-left: auto;
  color: #148040;
}

/* Leaflet controls */
.leaflet-top,
.leaflet-bottom {
  z-index: 425 !important;
}

/* Responsive */
@media (max-width: 600px) {
  .routes__list {
    width: 95vw;
  }

  .routes__list.active + .routes__toggle {
    left: 95vw;
  }

  .routes__back__btn {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
}


.route__item__content__distance{
  font-size: 12px;
  color: #283734;
  font-weight: 700;
  background-color: #fbd45a;
  padding: 2px 6px;
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
  position: absolute;
  top: 10px;
  right: 0;
  line-height: 1.2;
}