.search__input.field-input {
  padding-right: 9.8rem;
}

.header--centered-two-row .search__input.field-input {
  width: 40rem;
}

.header--centered-two-row .predictive-search__results-groups-wrapper {
  display: block;
}

@media screen and (max-width: 990px) {
  .search__input.field-input {
    padding-right: 8.8rem;
  }
  .header .field-input {
    height: 4.4rem;
  }
  .header .field-label {
    top: calc(1rem + var(--inputs-border-width));
  }
  .header .field__button {
    height: 3.8rem;
    margin-top: .3rem;
    margin-right: .3rem;
  }
}

.search__button {
  right: var(--inputs-border-width);
  top: var(--inputs-border-width);
}

.reset__button {
  right: calc(var(--inputs-border-width) + 4.4rem);
  top: var(--inputs-border-width);
}

.reset__button:not(:focus-visible)::after {
  border-right: 0.1rem solid rgba(var(--color-foreground), 0.08);
  display: block;
  height: calc(100% - 1.6rem);
  content: '';
  position: absolute;
  right: 0;
}

.reset__button:not(:focus)::after {
  border-right: 0.1rem solid rgba(var(--color-foreground), 0.08);
  display: block;
  height: calc(100% - 1.8rem);
  content: '';
  position: absolute;
  right: 0;
}

.search__button:focus-visible,
.reset__button:focus-visible {
  background-color: rgb(var(--color-background));
  z-index: 4;
}

.search__button:focus,
.reset__button:focus {
  background-color: rgb(var(--color-background));
  z-index: 4;
}

.search__button:not(:focus-visible):not(.focused),
.reset__button:not(:focus-visible):not(.focused) {
  box-shadow: inherit;
  background-color: inherit;
}

.search__button:hover .icon,
.reset__button:hover .icon {
  transform: scale(1.07);
}

.search__button .icon {
  height: 1.8rem;
  width: 1.8rem;
}

.reset__button .icon.icon-close {
  height: 1.8rem;
  width: 1.8rem;
  stroke-width: 0.1rem;
}

.field-label {
    display: inline-block; /* Ensure the label is treated as an inline block for the width animation */
    white-space: nowrap; /* Prevent the text from wrapping */
    overflow: hidden; /* Hide the text that's not yet visible */
    animation: typing 6s steps(60, end) infinite; /* Slow down typing effect */
}

@keyframes typing {
    0% { width: 0; }
    80% { width: 80%; }
    90% { width: 80%; } /* Keep at 100% width for a short time to create a quicker pause */
    100% { width: 0; }  /* Reset width to 0 to start over */
}

/* Remove extra spacing for search inputs in Safari */
input::-webkit-search-decoration {
  -webkit-appearance: none;
}