.search-form {
  --search-width: 60%;

  width: var(--search-width);
  position: fixed;
  left: 20%;
  top: 30%;
  z-index: 20;
  transition: cubic-bezier(0.4, 0, 0.2, 1) 150ms all;

  /* --op-breakpoint-small */
  @media only screen and (max-width: 768px) {
    width: 100%;
    left: 0;
  }
}

.mobile-search-button {
  --size: 5rem;
  --__op-btn-height: var(--size) !important;
  position: fixed;
  z-index: 9; // one less than day popup
  border-radius: 40%;
  bottom: var(--op-space-medium);
  right: calc(50vw - calc(var(--size) / 2));
}

.search-form__backdrop {
  position: fixed;
  width: 100vw;
  left: 0;
  top: 0;
  height: 100vh;
  background-color: var(--op-color-primary-base);
  opacity: 0.2;
  z-index: 2;
}

.form-control.search-form__input:not([type=radio], [type=checkbox]) {
  z-index: 10;
  --__op-form-control-height: calc(2 *var(--_op-form-control-height-large));
  --__op-form-control-font-size: calc(2 * var(--_op-form-control-font-large));
  border-color: var(--op-color-primary-base);
  border-radius: var(--op-radius-2x-large);
  box-shadow: var(--op-shadow-2x-large);
  border: var(--op-border-width-large) solid var(--op-color-primary-base);

  &:focus {
    background-color: var(--op-color-neutral-plus-max);
    border: var(--op-border-width-x-large) solid var(--op-color-primary-base);
    box-shadow: none;
  }
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: var(--op-space-2x-large);

  .card--padded {
    background-color: var(--op-color-neutral-plus-max);
    border: var(--op-border-width) solid var(--op-color-neutral-plus-max);
  }

  .card__header {
    color: var(--op-color-primary-base);
    font-weight: var(--op-font-weight-bold);
    padding: 0;
  }
}

.search-highlight {
  background-color: var(--op-color-primary-plus-five);
  box-shadow: inset 0 calc(-1 * var(--op-border-width)) 0 0 var(--op-color-primary-minus-three);
}

.search__open-day {
  --size: 3rem;
  width: var(--size);
  height: var(--size);
  display: flex;
  padding: var(--op-space-small);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--op-radius-2x-large);
  background-color: var(--op-color-alerts-notice-plus-four);
  color: var(--op-color-alerts-notice-minus-four);

  &:hover {
    background-color: var(--op-color-alerts-notice-plus-two);
    color: var(--op-color-alerts-notice-minus-four);
  }
}

.search__entry {
  position: relative;
  min-height: 8rem;

  @media (width > 768px) {
    width: 30rem;
    .search__entry-text {
      font-size: var(--op-font-small);
      max-height: 18rem;
    }
  }
}

.search__entry-text {
  width: 100%;
  padding: var(--op-space-small);
  overflow-y: auto;
  max-height: 22rem;

  line-height: 1.3;
  .trix-content {
    color: var(--op-color-white);
    line-height: 1.3;
    text-wrap: pretty;
  }

  .search-highlight {
    color: var(--op-color-warning-minus-max);
  }

  &.search__entry-text--on-image {
    position: absolute;
    bottom: 7px;
    left: 2px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
    border-radius: var(--op-radius-large);
    color: var(--op-color-neutral-plus-max);
  }

  @media (width < 768px) {
    line-height: 1.1;
    min-width: 32rem;
    width: 100%;
  }
}

.search__entry-title {
  font-weight: bold;

  &.search__entry-title--on-image {
    padding: var(--op-space-3x-small) var(--op-space-2x-small);
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--op-radius-large);
    position: absolute;
    font-size: var(--op-font-medium);
    color: var(--op-color-white);
    text-align: center;
    top: var(--op-space-small);
    right: var(--op-space-x-small);
  }
}
