.home-flight-search {
  position: relative;
}

.home-flight-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 4px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: #eee7db;
}

.home-flight-mode button {
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #6b675f;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.home-flight-mode button.active {
  background: #fff;
  color: #171814;
  box-shadow: 0 5px 14px rgba(25, 22, 15, 0.08);
}

.home-flight-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr);
  gap: 8px;
  align-items: end;
  margin-bottom: 14px;
}

.home-flight-route .field {
  min-width: 0;
}

.home-flight-route .field label,
.home-flight-grid .field label,
.home-flight-passengers .field label {
  display: block;
}

.home-flight-route input {
  font-weight: 680;
  letter-spacing: 0.01em;
}

.home-flight-swap {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 6px;
  border: 1px solid #d9d0c1;
  border-radius: 50%;
  background: #f8f4eb;
  color: #5f5544;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.home-flight-swap:hover {
  background: #efe6d5;
  transform: rotate(180deg);
}

.home-flight-grid {
  margin-bottom: 14px;
}

.home-flight-passengers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.home-flight-passengers select {
  padding-left: 10px;
  padding-right: 6px;
}

.home-flight-search .button-full {
  margin-top: 2px;
}

.home-flight-search-submit {
  position: relative;
}

.home-flight-search-submit.is-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.home-flight-spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(0, 0, 0, 0.24);
  border-top-color: #111;
  border-radius: 50%;
  animation: home-flight-spin 0.72s linear infinite;
}

.home-flight-search-submit.is-loading .home-flight-spinner {
  display: inline-block;
}

@keyframes home-flight-spin {
  to { transform: rotate(360deg); }
}

.home-flight-search-note {
  display: grid;
  gap: 4px;
  margin: 11px 0 0;
  color: #777066;
  font-size: 0.7rem;
  line-height: 1.45;
}

.home-flight-search-note strong {
  color: #5e5035;
  font-weight: 800;
}

.home-flight-search .field[hidden] {
  display: none !important;
}

.home-flight-results-section {
  position: relative;
  scroll-margin-top: 82px;
  overflow: hidden;
  background: #fff;
}

.home-flight-results-section::before {
  content: "";
  position: absolute;
  top: -220px;
  right: -190px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(194, 147, 48, 0.13), transparent 68%);
  pointer-events: none;
}

.home-flight-results-section > .shell {
  position: relative;
}

.home-flight-results-head {
  transition: opacity 0.2s ease;
}

.home-flight-results-section.is-loading .home-flight-results-head {
  opacity: 0.86;
}

.home-flight-loading {
  display: grid;
  justify-items: center;
  gap: 8px;
  max-width: 680px;
  margin: 0 auto 28px;
  padding: 25px 28px;
  border: 1px solid #e5dccd;
  border-radius: 22px;
  background: linear-gradient(135deg, #fffcf7, #f8f2e7);
  text-align: center;
  box-shadow: 0 16px 44px rgba(28, 23, 14, 0.06);
}

.home-flight-loading-mark {
  display: grid;
  grid-template-columns: minmax(35px, 90px) auto minmax(35px, 90px);
  align-items: center;
  gap: 10px;
  width: min(300px, 90%);
  margin-bottom: 2px;
  color: #a8781a;
}

.home-flight-loading-mark span {
  height: 1px;
  background: linear-gradient(90deg, transparent, #cbb98d);
}

.home-flight-loading-mark span:last-child {
  background: linear-gradient(90deg, #cbb98d, transparent);
}

.home-flight-loading-mark b {
  font-size: 1.24rem;
  animation: home-flight-float 1.4s ease-in-out infinite;
}

@keyframes home-flight-float {
  0%, 100% { transform: translateY(1px); }
  50% { transform: translateY(-4px); }
}

.home-flight-loading strong {
  color: #1b1c18;
  font-family: Georgia, serif;
  font-size: 1.35rem;
}

.home-flight-loading small {
  color: #706b62;
  font-size: 0.82rem;
  line-height: 1.5;
}

.home-flight-loading-bar {
  width: min(360px, 90%);
  height: 4px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ddcd;
}

.home-flight-loading-bar span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9b6a10, #d4ad52);
  animation: home-flight-progress 1.35s ease-in-out infinite;
}

@keyframes home-flight-progress {
  0% { transform: translateX(-115%); }
  100% { transform: translateX(340%); }
}

.home-flight-skeletons {
  display: grid;
  gap: 18px;
}

.home-flight-skeleton {
  display: grid;
  grid-template-columns: 1fr 170px;
  gap: 16px;
  padding: 24px;
  border: 1px solid #e8e2d8;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 34px rgba(22, 22, 18, 0.04);
}

.home-flight-skeleton > span,
.home-flight-skeleton i {
  display: block;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f1eee8 24%, #faf8f4 42%, #f1eee8 66%);
  background-size: 300% 100%;
  animation: home-flight-shimmer 1.25s linear infinite;
}

.home-flight-skeleton > span.wide {
  width: 58%;
  height: 20px;
}

.home-flight-skeleton > span:not(.wide) {
  justify-self: end;
  width: 120px;
  height: 28px;
}

.home-flight-skeleton > div {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 15px;
  padding: 20px 0;
  border-top: 1px solid #eee9df;
  border-bottom: 1px solid #eee9df;
}

.home-flight-skeleton i {
  height: 52px;
  border-radius: 12px;
}

.home-flight-skeleton .button-shape {
  grid-column: 2;
  justify-self: end;
  width: 150px;
  height: 40px;
}

@keyframes home-flight-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.home-flight-quote-section {
  scroll-margin-top: 82px;
}

.home-flight-results-section[hidden],
.home-flight-quote-section[hidden],
.home-flight-loading[hidden],
.home-flight-skeletons[hidden],
[data-home-flight-sort-wrap][hidden] {
  display: none !important;
}

@media (max-width: 680px) {
  .home-flight-route {
    grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr);
    gap: 6px;
  }

  .home-flight-swap {
    width: 36px;
    height: 36px;
  }

  .home-flight-passengers {
    gap: 7px;
  }

  .home-flight-passengers .field label {
    font-size: 0.62rem;
  }

  .home-flight-passengers select {
    padding-left: 7px;
    padding-right: 3px;
    font-size: 0.9rem;
  }

  .home-flight-search-note {
    font-size: 0.72rem;
  }

  .home-flight-loading {
    padding: 22px 16px;
    border-radius: 18px;
  }

  .home-flight-skeleton {
    grid-template-columns: 1fr 100px;
    padding: 18px;
    border-radius: 18px;
  }

  .home-flight-skeleton > div {
    grid-template-columns: 1fr 0.7fr 1fr;
    gap: 8px;
  }
}

@media (max-width: 390px) {
  .home-flight-route {
    grid-template-columns: 1fr;
  }

  .home-flight-swap {
    margin: -4px auto -2px;
    transform: rotate(90deg);
  }

  .home-flight-swap:hover {
    transform: rotate(270deg);
  }

  .home-flight-passengers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-flight-skeleton {
    grid-template-columns: 1fr;
  }

  .home-flight-skeleton > span:not(.wide),
  .home-flight-skeleton .button-shape {
    grid-column: 1;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-flight-spinner,
  .home-flight-loading-mark b,
  .home-flight-loading-bar span,
  .home-flight-skeleton > span,
  .home-flight-skeleton i {
    animation-duration: 0.01ms;
  }
}
