/**
 * Home Search (ota_home_search) Styles
 * This file is intentionally separate from search-results.css
 * so you can style the homepage form independently.
 */
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: transparent !important;
  box-shadow: none !important;
}

.ota-home-search__input .select2-container {
  width: 100% !important;
}

.ota-home-search__input .select2-container--default .select2-selection--single {
  height: 44px;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  display: flex;
  align-items: center;
}

.ota-home-search__input .select2-selection__rendered {
  padding-left: 0 !important;
  color: rgb(var(--foreground));
  font-size: var(--ota-font-base);
}

.ota-home-search__input .select2-selection__arrow {
  height: 44px;
}

.ota-home-search {
  margin: 0 auto;
  margin-top: 50px;
  width: 50%;
  min-width: 900px;
  padding: 20px;
  border-radius: var(--ota-radius-lg);
  background: rgb(var(--background)/0.7);
  /* border: 2px solid transparent; */
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6), 0 16px 32px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ota-home-search__form {
  display: grid;
  grid-template-columns: 1fr auto 1fr 1fr auto;
  gap: 12px;
  align-items: center;
}

.ota-home-search__field {
  min-width: 0;
}

.ota-home-search__input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  height: 44px;
  border: 1px solid rgb(var(--border));
  border-radius: var(--ota-radius-md);
  background: rgb(var(--background));
  box-sizing: border-box;
}

.ota-home-search__input select,
.ota-home-search__input input {
  border: none;
  background: transparent;
  width: 100%;
  outline: none;
  font-size: var(--ota-font-base);
  color: rgb(var(--foreground));
}

.ota-home-search__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: rgb(var(--foreground));
}

.ota-home-search__icon .ota-icon-svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
}

.ota-home-search__swap {
  display: flex;
  justify-content: center;
}

.ota-home-search__swap-btn {
  height: 44px;
  width: 44px;
  border-radius: var(--ota-radius-md);
  border: 1px solid rgb(var(--border));
  background: rgb(var(--background));
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ota-home-search__submit {
  height: 44px;
  padding: 0 16px;
  border: none;
  border-radius: var(--ota-radius-md);
  background: var(--ota-color-primary);
  color: var(--background);
  font-weight: var(--ota-font-bold);
  cursor: pointer;
  white-space: nowrap;
}

.ota-home-search__submit:hover {
  background: rgb(var(--secondary));
}

@media (max-width: 900px) {
  .ota-home-search {
    width: 100%;
    min-width: 100%;
    margin-top: 20px;
  }
  .ota-home-search__form {
    grid-template-columns: 1fr;
    position: relative;
  }

  .ota-home-search__field--from {
    order: 1;
  }

  .ota-home-search__swap {
    order: 2;
    justify-content: center;
    margin: 0;
    position: absolute;
    left: 90%;
    top: calc(44px + 6px);
    transform: translate(-50%, -50%);
    z-index: 2;
  }

  .ota-home-search__field--to {
    order: 3;
  }

  .ota-home-search__field--date {
    order: 4;
  }

  .ota-home-search__submit {
    order: 5;
  }

  .ota-home-search__swap-btn {
    position: static;
    transform: none;
    margin: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgb(var(--border));
    background: rgb(var(--background));
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
  }
}