// govuk_frontend_toolkit mixins
@import "_conditionals";
@import "_typography";
@import "_colours";
@import "_css3";

#global-breadcrumb {
  display: block;
  max-width: 960px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;

  @include media($min-width: 1020px) {
    padding-left: 0;
    padding-right: 0;
  }
}

.search {
  .search-header {
    position: relative;
    margin: 0;
    padding: 10px 15px 15px;
    overflow: visible;

    @include media(tablet) {
      padding: 20px 30px 30px;
      width: 66.666%;
    }

    .search-input {
      position: static;
      margin: 0;
      padding: 0 50px 0 0;
      @include ie(7) {
        padding-right: 62px;
      }
    }

    .search-submit {
      position: absolute;
      bottom: 15px;
      right: 15px;
      height: 50px;
      width: 50px;
      @include media(tablet) {
        bottom: 30px;
        right: 30px;
      }
      overflow: visible;
    }

    input {
      width: 100%;
      margin: 0;
      padding: 0 0 0 10px;
      display: block;
      height: 50px;
      @include ie-lte(7) {
        height: 48px;
        margin-bottom: -1px;
      }
      border-right: none;
      @include core-19($line-height: 48px);

      @include box-sizing(border-box);
      &::-webkit-search-cancel-button {
        -webkit-appearance: none;
      }
    }
    button {
      position: absolute;
      z-index: 4;
      right: 0;
      top: 0;

      width: 50px;
      height: 50px;

      border: none;
      @include border-radius(0);
      @include box-shadow(none);
      overflow: hidden;
      text-indent: -5000px;
      color: $white;

      background-color: $mellow-red;
      background-image: url("https://assets.digital.cabinet-office.gov.uk/static/search-button-bf4401b2af62b39cb26c33d6b259f494.png");
      background-repeat: no-repeat;
      background-position: -12.5% 50%;

      &:hover {
        background-color: $red;
      }
    }
  }
}

.search-container {
  @include media(tablet) {
    width: 75%;
  }

  ul {
    li {
      margin-bottom: 1.5em;

      p {
        margin: 0;
      }
    }
  }
}

/* ----- search results page ----- */

.search {
  padding-bottom: 30px;
  @include media(tablet) {
    padding-bottom: 60px;
  }
  background: $white;

  h1 {
    @include core-19;
    font-weight: bold;
    padding-bottom: 10px;
  }


  .results-list {
    list-style: none;
    margin: 0;
    padding: 15px 15px 0;
    @include media(tablet) {
      padding: 30px 30px 0;
    }
    li {
      max-width: 32.5em;
      margin: 0;
      padding: 0 0 15px;
      @include media(tablet) {
        padding: 0 0 25px;
      }
      @include ie(6) {
        width: 32.5em;
      }
    }

    h3 {
      margin: 0;
      @include core-19;
      a {
        font-weight: bold;
      }
      a[rel="external"]::after {
        content: "\A0\A0\A0\A0\A0\A0";
      }
    }

    p {
      @include core-16;
      margin: 0;
      padding: 2px 0 0;
    }
  }

  .no-results {
    overflow: hidden;
    margin: 0;
    padding: 0 15px 40px;
    @include media(tablet) {
      padding: 0 30px 70px;
    }
    h2 {
      @include core-36;
      font-weight: bold;
    }
  }
}

#wrapper {
  border-bottom: none;
}
