/* Previously opened tours keep their own saved dates, party and package price. */
.recent-tours {
  --recent-blue: #2156b8;
  --recent-ink: #172b4d;
  --recent-muted: #586a80;
  margin: 25px 0 27px;
  color: var(--recent-ink);
  position: relative;
}

.recent-tours,
.recent-tours * { box-sizing: border-box; }
.home-content > .recent-tours:first-child { margin-top: 0; margin-bottom: 16px; }
.home-view:has(.recent-tours) .home-hero { padding-bottom: 8px; }
.home-content:has(> .recent-tours:first-child) { padding-top: 8px; }

.recent-tours-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
  margin: 0 0 2px;
}

.recent-tours-heading h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--recent-ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 25px;
  letter-spacing: -.35px;
}
.recent-viewed-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eaf0fc;
  color: #2156b8;
}
.recent-viewed-icon svg { display: block; width: 25px; height: 20px; overflow: visible; }
.recent-viewed-icon ellipse { fill: #fff; stroke: currentColor; stroke-width: 1.5; }
.recent-viewed-icon circle { fill: currentColor; }
.recent-viewed-icon .recent-pupils { animation: recent-eyes-look 2.8s ease-in-out 1s 1; }
.recent-viewed-icon .recent-eyes { transform-box: fill-box; transform-origin: center; animation: recent-eyes-blink 2.8s ease-in-out 1s 1; }
@keyframes recent-eyes-look {
  0%, 100% { transform: translateX(0); }
  22%, 42% { transform: translateX(-2px); }
  62%, 80% { transform: translateX(1.5px); }
}
@keyframes recent-eyes-blink {
  0%, 43%, 51%, 100% { transform: scaleY(1); }
  47% { transform: scaleY(.12); }
}

.recent-tours-actions {
  position: absolute;
  z-index: 2;
  top: calc(50% + 14px);
  left: -5px;
  right: -5px;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.recent-tours-actions button {
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 5px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  background-clip: content-box;
  color: var(--recent-blue);
  font-size: 20px;
  line-height: 1;
  box-shadow: none;
  touch-action: manipulation;
  pointer-events: auto;
}
.recent-tours-actions [data-recent-next] { margin-left: auto; }

.recent-tours-actions button[hidden] { display: none; }
.recent-tours-actions button:disabled { opacity: .4; cursor: default; }
.recent-tours-actions button svg { display: block; width: 20px; height: 20px; }

.recent-tours-track {
  display: flex;
  align-items: stretch;
  gap: 11px;
  min-width: 0;
  margin: 0;
  padding: 0 4px 5px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 4px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.recent-tours-track::-webkit-scrollbar { display: none; }

/* Cards share the exact renderer and proportions of country city shelves. */
.recent-tours-track { align-items: flex-start; }
.recent-tours-track > .country-offer.card:only-child { flex-basis: 100%; }
.recent-tour-card .recent-viewed-price {
  display: block;
  margin: 0 0 2px;
  color: #586a80;
  font-size: 10px;
  line-height: 14px;
  font-weight: 400;
}
.recent-tours-status {
  margin: 3px 2px 0;
  color: var(--recent-muted);
  font-size: 11px;
  line-height: 16px;
}
.recent-tours-actions button:focus-visible {
  outline: 2px solid #2156b8;
  outline-offset: 2px;
}
@media (hover: hover) {
  .recent-tours-actions button:not(:disabled):hover { background-color: #dce7fb; }
}
@media (max-width: 360px) {
  .recent-tours-heading h2 { font-size: 18px; line-height: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  .recent-tours-track { scroll-behavior: auto; }
  .recent-viewed-icon .recent-pupils,
  .recent-viewed-icon .recent-eyes { animation: none; }
}
