/* FlyX homepage recent flight searches. Shared by desktop and mobile. */
.fx-recent-searches,
.fx-recent-searches * {
  box-sizing: border-box;
}

.fx-recent-searches[hidden],
.fx-recent-clear[hidden] {
  display: none !important;
}

.fx-recent-searches {
  position: relative;
  width: 100%;
  margin: 14px auto 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.84);
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 16px 34px rgba(15,23,42,.14);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  font-family: Manrope, Poppins, Arial, sans-serif;
}

.fx-recent-inner {
  display: grid;
  grid-template-columns: 210px minmax(0,1fr);
  align-items: stretch;
  gap: 12px;
}

.fx-recent-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 3px 5px;
}

.fx-recent-heading-icon {
  display: inline-flex;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg,#b0042f 0%,#ff5126 100%);
  box-shadow: 0 8px 18px rgba(176,4,47,.2);
}

.fx-recent-heading-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fx-recent-title-wrap {
  min-width: 0;
}

.fx-recent-title {
  display: block;
  margin: 0;
  color: #111827;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

.fx-recent-subtitle {
  display: block;
  margin-top: 4px;
  color: #7c8799;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.15;
}

.fx-recent-clear {
  appearance: none;
  align-self: center;
  margin: 0 2px 0 auto;
  padding: 5px 0;
  border: 0;
  color: #a30b2f;
  background: transparent;
  font: 800 10px/1 Manrope,Poppins,Arial,sans-serif;
  cursor: pointer;
}

.fx-recent-clear:hover,
.fx-recent-clear:focus-visible {
  color: #ff4b22;
  outline: none;
  text-decoration: underline;
}

.fx-recent-list {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 9px;
  min-width: 0;
}

.fx-recent-card {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 68px;
  padding: 10px 38px 9px 12px;
  overflow: hidden;
  border: 1px solid #e6ebf2;
  border-radius: 13px;
  color: #152033 !important;
  background: linear-gradient(145deg,#fff 0%,#f8faff 100%);
  box-shadow: 0 5px 14px rgba(15,23,42,.05);
  text-align: left;
  text-decoration: none !important;
  transition: transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}

.fx-recent-card:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg,#b0042f,#ff5126);
}

.fx-recent-card:hover,
.fx-recent-card:focus-visible {
  z-index: 2;
  border-color: rgba(255,81,38,.35);
  color: #152033 !important;
  box-shadow: 0 12px 24px rgba(45,36,67,.12);
  outline: none;
  transform: translateY(-2px);
}

.fx-recent-route {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #111827;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .2px;
}

.fx-recent-plane {
  position: relative;
  display: inline-flex;
  flex: 1 1 30px;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  max-width: 45px;
  color: #df163c;
}

.fx-recent-plane:before,
.fx-recent-plane:after {
  content: "";
  flex: 1 1 auto;
  border-top: 1px dashed #cbd5e1;
}

.fx-recent-plane svg {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  margin: 0 4px;
  fill: currentColor;
  transform: rotate(45deg);
}

.fx-recent-cities {
  margin-top: 5px;
  overflow: hidden;
  color: #778195;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fx-recent-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin-top: 6px;
  color: #4d5b70;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.fx-recent-meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fx-recent-meta svg {
  flex: 0 0 11px;
  width: 11px;
  height: 11px;
  fill: none;
  stroke: #ef4b2f;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fx-recent-trip {
  padding: 3px 6px;
  border-radius: 999px;
  color: #8b1536;
  background: #fff0f3;
}

.fx-recent-arrow {
  position: absolute;
  top: 50%;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg,#b0042f,#ff5126);
  transform: translateY(-50%);
}

.fx-recent-arrow svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fx-recent-empty {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  padding: 10px 16px;
  border: 1px dashed #d6deeb;
  border-radius: 13px;
  color: #65738a;
  background: linear-gradient(145deg,#fbfcff,#f4f7fc);
  font-size: 11px;
  font-weight: 750;
  text-align: center;
}

@media (max-width: 768px) {
  html body.fxm-unified-mobile.flyx-home-experiment .fx-recent-searches {
    width: auto !important;
    margin: 0 14px 14px !important;
    padding: 13px 0 13px !important;
    border: 1px solid #e5ebf4 !important;
    border-radius: 17px !important;
    background: linear-gradient(160deg,#f9fbff 0%,#f3f7ff 100%) !important;
    box-shadow: 0 8px 20px rgba(14,46,87,.06) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: hidden !important;
  }

  .fx-recent-inner {
    display: block;
  }

  .fx-recent-heading {
    padding: 0 13px 11px;
  }

  .fx-recent-heading-icon {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .fx-recent-heading-icon svg {
    width: 17px;
    height: 17px;
  }

  .fx-recent-title {
    font-size: 13px;
  }

  .fx-recent-subtitle {
    font-size: 9px;
  }

  .fx-recent-clear {
    margin-left: auto;
    padding: 8px 0 8px 12px;
    font-size: 9px;
  }

  .fx-recent-list {
    display: flex;
    gap: 10px;
    width: 100%;
    padding: 0 13px 2px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .fx-recent-list::-webkit-scrollbar {
    display: none;
  }

  .fx-recent-card {
    flex: 0 0 84%;
    min-height: 96px;
    padding: 13px 42px 12px 14px;
    border-radius: 15px;
    scroll-snap-align: start;
  }

  .fx-recent-card:last-child {
    margin-right: 5px;
  }

  .fx-recent-route {
    gap: 8px;
    font-size: 18px;
  }

  .fx-recent-plane {
    max-width: 58px;
  }

  .fx-recent-cities {
    margin-top: 7px;
    font-size: 10px;
  }

  .fx-recent-meta {
    margin-top: 9px;
    font-size: 9px;
  }

  .fx-recent-arrow {
    right: 13px;
    width: 25px;
    height: 25px;
  }

  .fx-recent-empty {
    min-height: 64px;
    margin: 0 13px;
    font-size: 10px;
  }
}

@media (max-width: 360px) {
  .fx-recent-card {
    flex-basis: 90%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fx-recent-card {
    transition: none;
  }
}
