.jtb-favorite-routes {
  width: 100%;
  max-width: 100%;
}

.jtb-favorite-routes__header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.jtb-favorite-routes__title {
  margin: 0;
  min-width: 0;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.2;
  color: #0f172a;
  font-weight: 800;
}

.jtb-favorite-routes__title--sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.jtb-favorite-routes__controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.jtb-favorite-routes__carousel {
  position: relative;
}

.jtb-favorite-routes__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 0;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #f5d7c5;
  background: #ffffff;
  color: #bf4f0f;
  cursor: pointer;
  pointer-events: auto;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease,
    opacity 0.18s ease;
}

.jtb-favorite-routes__arrow:hover,
.jtb-favorite-routes__arrow:focus-visible {
  transform: translateY(calc(-50% - 1px));
  border-color: var(--generate-primary-color, #ff6210);
  background: #fff3eb;
  color: var(--generate-primary-color, #ff6210);
}

.jtb-favorite-routes__arrow:focus-visible {
  outline: 2px solid var(--generate-primary-color, #ff6210);
  outline-offset: 2px;
}

.jtb-favorite-routes__arrow[disabled] {
  opacity: 0.45;
  cursor: default;
  transform: translateY(-50%);
}

.jtb-favorite-routes__arrow--prev {
  left: -18px;
}

.jtb-favorite-routes__arrow--next {
  right: -18px;
}

.jtb-favorite-routes__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  max-width: 100%;
  padding: 2px 34px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.jtb-favorite-routes__viewport::-webkit-scrollbar {
  height: 0;
}

.jtb-favorite-routes__viewport {
  scrollbar-width: none;
}

.jtb-favorite-routes__track {
  --jtb-favorite-gap: 14px;
  display: flex;
  align-items: stretch;
  gap: var(--jtb-favorite-gap);
  width: max-content;
  min-width: 100%;
}

.jtb-favorite-routes__empty {
  margin: 0;
  padding: 14px 16px;
  border: 1px dashed #f7bf9d;
  border-radius: 14px;
  background: #fff7f2;
  color: #8a4b2b;
  font-size: 14px;
  line-height: 1.5;
}

.jtb-favorite-route-card {
  /* flex: 0 0 100%; */
  width: 342px;
  min-width: 0;
  max-width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid #f5d7c5;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.jtb-favorite-route-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.jtb-favorite-route-card__date {
  font-size: 15px;
  line-height: 1.35;
  color: #1f2937;
  font-weight: 700;
}

.jtb-favorite-route-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 132, 67, 0.35);
  background: linear-gradient(
    135deg,
    var(--generate-primary-color, #ff6210),
    #ff8743
  );
  color: #ffffff;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(255, 98, 16, 0.24);
}

.jtb-favorite-route-card__route {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.jtb-favorite-route-card__route-point {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  min-width: 0;
}

.jtb-favorite-route-card__route-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--generate-primary-color, #ff6210);
  box-shadow: 0 0 0 3px rgba(255, 98, 16, 0.14);
  justify-self: center;
}

.jtb-favorite-route-card__route-point--destination
  .jtb-favorite-route-card__route-dot {
  background: #ffffff;
  border: 2px solid var(--generate-primary-color, #ff6210);
  box-shadow: none;
}

.jtb-favorite-route-card__route-line {
  width: 0;
  height: 16px;
  margin-left: 6px;
  border-left: 2px dashed rgba(255, 98, 16, 0.45);
}

.jtb-favorite-route-card__route-label {
  min-width: 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
  color: #0f172a;
  word-break: break-word;
}

.jtb-favorite-route-card__price {
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  line-height: 1.2;
}

.jtb-favorite-route-card__price-label {
  font-size: 12px;
  line-height: 1.2;
  color: #64748b;
  font-weight: 700;
}

.jtb-favorite-route-card__price-value {
  font-size: clamp(18px, 2.3vw, 22px);
  line-height: 1.2;
  color: #bf4f0f;
  font-weight: 800;
}

.jtb-favorite-route-card__price-fallback {
  font-size: 14px;
  line-height: 1.3;
  color: #bf4f0f;
  font-weight: 700;
}

.jtb-favorite-route-card__button {
  width: 100%;
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    var(--generate-primary-color, #ff6210),
    #ff8743
  );
  color: #ffffff;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.jtb-favorite-route-card__button:hover,
.jtb-favorite-route-card__button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(255, 98, 16, 0.24);
}

.jtb-favorite-route-card__button:focus-visible {
  outline: 2px solid var(--generate-primary-color, #ff6210);
  outline-offset: 2px;
}

@media (min-width: 782px) {
  .jtb-favorite-route-card {
    flex-basis: calc((100% - var(--jtb-favorite-gap)) / 2);
  }
}

@media (min-width: 992px) {
  .jtb-favorite-route-card {
    flex-basis: calc((100% - (var(--jtb-favorite-gap) * 2)) / 3);
  }
}

@media (min-width: 1280px) {
  .jtb-favorite-route-card {
    flex-basis: calc((100% - (var(--jtb-favorite-gap) * 3)) / 4);
  }

  .jtb-favorite-routes__arrow--prev {
    left: -25px;
  }

  .jtb-favorite-routes__arrow--next {
    right: -25px;
  }
}

@media (max-width: 640px) {
  .jtb-favorite-routes__arrow {
    width: 40px;
    height: 40px;
  }

  .jtb-favorite-routes__arrow--prev {
    left: -18px;
  }

  .jtb-favorite-routes__arrow--next {
    right: -18px;
  }

  .jtb-favorite-routes__viewport {
    padding-inline: 28px;
  }

  .jtb-favorite-route-card__date {
    font-size: 14px;
  }

  .jtb-favorite-route-card__badge {
    font-size: 11px;
    padding: 5px 10px;
  }
}

body.jtb-trip-choice-modal-open {
  overflow: hidden;
}

.jtb-trip-choice-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

.jtb-trip-choice-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.jtb-trip-choice-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
}

.jtb-trip-choice-modal__dialog {
  position: relative;
  width: min(100%, 520px);
  max-width: 520px;
  border-radius: 16px;
  border: 1px solid #f5d7c5;
  background: #ffffff;
  box-shadow: 0 28px 56px rgba(15, 23, 42, 0.22);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jtb-trip-choice-modal__close {
  padding: 0;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1.3px solid #ff6210;
  border-radius: 999px;
  background: #fff;
  color: #bf4f0f;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.jtb-trip-choice-modal__close:focus-visible {
  outline: 2px solid var(--generate-primary-color, #ff6210);
  outline-offset: 2px;
}

.jtb-trip-choice-modal__title {
  margin: 0;
  padding-right: 40px;
  font-size: 20px;
  line-height: 1.2;
  color: #0f172a;
  font-weight: 800;
}

.jtb-trip-choice-modal__subtitle {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #475569;
}

.jtb-trip-choice-modal__route {
  margin: 2px 0 0;
  font-size: 15px;
  line-height: 1.4;
  color: #0f172a;
  font-weight: 700;
}

.jtb-trip-choice-modal__date {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #64748b;
  font-weight: 600;
}

.jtb-trip-choice-modal__options {
  margin-top: 6px;
  display: grid;
  gap: 10px;
}

.jtb-trip-choice-modal__option {
  width: 100%;
  text-align: left;
  border: 1px solid #f5d7c5;
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: #0f172a;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background-color 0.16s ease,
    box-shadow 0.16s ease;
}

.jtb-trip-choice-modal__option:hover,
.jtb-trip-choice-modal__option:focus-visible {
  transform: translateY(-1px);
  border-color: var(--generate-primary-color, #ff6210);
  background: #fff7f2;
  box-shadow: 0 10px 22px rgba(255, 98, 16, 0.14);
}

.jtb-trip-choice-modal__option:focus-visible {
  outline: 2px solid var(--generate-primary-color, #ff6210);
  outline-offset: 2px;
}

.jtb-trip-choice-modal__option-title {
  font-size: 15px;
  line-height: 1.3;
  font-weight: 800;
  color: #0f172a;
}

.jtb-trip-choice-modal__option-desc {
  font-size: 13px;
  line-height: 1.4;
  color: #64748b;
}

.jtb-trip-choice-modal__option--oneway {
  border-left: 4px solid #ff8743;
}

.jtb-trip-choice-modal__option--roundtrip {
  border-left: 4px solid #1f9d55;
}

@media (max-width: 640px) {
  .jtb-trip-choice-modal {
    align-items: flex-end;
    padding: 10px;
  }

  .jtb-trip-choice-modal__dialog {
    width: 100%;
    max-width: none;
    border-radius: 14px;
    padding: 16px;
  }
}
