@import "var";
@import "mixins/card";
@import "breakpoint-sass/stylesheets/breakpoint";

form#search-form {
  padding: 1.5rem;
  box-sizing: border-box;
  max-width: var(--arg-card-max-width, $arg-card-max-width);
  border: var(--arg-card-border-size, $arg-card-border-size) solid var(--arg-card-border-color, $arg-card-border-color);
  border-radius: var(--arg-card-border-radius-size, $arg-card-border-radius-size);
  background-color: var(--arg-card-bg-color, $arg-card-bg-color);
  box-shadow: var(--arg-card-box-shadow, $arg-card-box-shadow);

  ~ .item-list > em {
    display: flex;
    min-height: 10rem;
    justify-content: center;
    align-items: center;
    font-size: 1.25em;
    max-width: var(--arg-card-max-width, $arg-card-max-width);
  }
}

label[for="edit-keys"] {
  display: none;
}

#edit-advanced {
  margin: 1.5rem -1.5rem -1.5rem -1.5rem;

  > .details-wrapper {
    margin: 1.5rem;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    > .criterion {
      display: none;
    }
  }

  #edit-keywords-fieldset {
    @media (max-width: calc(#{$breakpointMedium} - 1px)){
      grid-column: span 2 / span 2;
    }
    grid-row: span 2 / span 2;

    margin-top: -1.5rem;
    margin-bottom: -1.5rem;
  }

  #edit-types-fieldset {
    @media (max-width: calc(#{$breakpointMedium} - 1px)) {
      grid-row-start: 3;
    }

    fieldset {
      margin: 0;
    }
  }

  #edit-lang-fieldset {
    @media (max-width: calc(#{$breakpointMedium} - 1px)) {
      grid-row-start: 3;
    }
    @media (min-width: $breakpointMedium) {
      grid-column-start: 2;
      grid-row-start: 2;
    }

    fieldset {
      margin: 0;
    }
  }

  .action {
    grid-column: span 2 / span 2;
    grid-row-start: 4;
    @media (min-width: $breakpointMedium) {
      grid-row-start: 3;
    }
  }
}

ol.search-results {
  margin: 0;
  padding: 0;
  list-style: none;

  li {
    list-style: none;
    margin: 0 0 1.5rem 0;
  }
}

