/* 0000px - INTERMEDIARY */

@media (min-width: 50em) {
  /*******************************/
  /*           GENERAL           */
  /*******************************/

  body:has(.alcemi .search-container.expanded),
  html:has(.alcemi .search-container.expanded) {
    overflow: hidden;
  }

  .alcemi {
    .search-container {
      width: 60rem;
      height: 42rem;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      position: fixed;
      overflow: hidden;
      background: #fdfdfd;
    }

    &:has(.search-container.expanded)::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: black;
      opacity: 0.5;
      z-index: 9999;
    }

    .search-background {
      display: none;
    }

    .drag-handle {
      display: none;
    }

    .next-drag-handle {
      display: block;
    }

    .close-button {
      opacity: 1;
    }

    .search-overlay {
      justify-content: center;
      padding-top: 0;
    }

    & .search-container {
      &.expanded {
        transform: translate(-50%, -50%);
      }
    }

    .next-search-overlay {
      top: 30%;
      height: 70%;

      .cancel-button {
        display: flex;
      }

      .content {
        padding: 1rem 0 1.5rem 0;

        .question-container {
          margin-top: 0;
        }
      }
    }

    & .results-overlay {
      .results-grid {
        flex-direction: row;
      }
    }
  }
}
