/**
* @license
* Copyright Akveo. All Rights Reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*/

/deep/ nga-layout.column-curtain.with-search .layout {
  pointer-events: none;
}

:host.column-curtain {

  .wrapper {
    display: block;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 50%;
    overflow: hidden;
    width: 50%;
    height: 100vh;
    pointer-events: none;

    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 70%;
      height: 100%;
      transform: scale3d(0, 1, 1);
      transform-origin: 0 50%;
      transition: transform 0.3s;
      transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1);
    }

    &::after {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      width: 30%;
      height: 100%;
      pointer-events: none;
    }

    .search {
      position: relative;
      padding: 2.5rem 1.5rem 0;
      background: transparent;

      button {
        position: absolute;
        top: 2rem;
        right: 2rem;
        font-size: 2.5rem;
        opacity: 0;
        transition: opacity 0.5s;
      }

      form {
        width: 70%;
        transform: translate3d(-150%, 0, 0);
        transition: transform 0.3s;
      }

      input {
        font-size: 2.5rem;
        width: 100%;
      }

      span {
        font-size: 85%;
      }
    }
  }

  &.show {
    .wrapper {
      pointer-events: auto;

      &::before {
        transform: scale3d(1, 1, 1);
      }

      .search {
        form {
          transform: translate3d(0, 0, 0);
          transition-delay: 0.15s;
          transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1);
        }

        button {
          opacity: 1;
          z-index: 100;
        }
      }
    }
  }

  @media screen and (max-width: 40rem) {
    span {
      width: 90%;
    }

    input {
      font-size: 2rem;
      width: 90%;
    }
  }
}
