/**
 * @license
 * Copyright Akveo. All Rights Reserved.
 * Licensed under the MIT License. See License.txt in the project root for license information.
 */

@use '../../../styles/theming' as *;

::ng-deep nb-layout.rotate-layout {
  position: fixed;
  overflow: hidden;
  width: 100%;

  .scrollable-container {
    position: relative;
    z-index: 10001;

    transition: transform 0.5s cubic-bezier(0.2, 1, 0.3, 1);
  }

  &.with-search .scrollable-container {
    transition: transform 0.5s cubic-bezier(0.2, 1, 0.3, 1);
    transform-origin: 50vw 50vh;
    transform: perspective(1000px) translate3d(0, 50vh, 0) rotate3d(1, 0, 0, 30deg);
    pointer-events: none;
  }
}

:host.rotate-layout {
  position: absolute;
  display: block;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  opacity: 0;
  transition-property: opacity;
  transition-delay: 0.4s;

  .search {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1050;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50vh;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s;
    transition-timing-function: cubic-bezier(0.2, 1, 0.3, 1);

    button {
      position: absolute;
      top: 3rem;
      @include nb-ltr(right, 3rem);
      @include nb-rtl(left, 3rem);
      font-size: 2.5rem;
      opacity: 0;
      transform: scale3d(0.8, 0.8, 1);
      transition: opacity 0.5s, transform 0.5s;
      transition-timing-function: cubic-bezier(0.2, 1, 0.3, 1);
    }

    form {
      margin: 5rem 0;
      opacity: 0;
      transform: scale3d(0.7, 0.7, 1);
      transition: opacity 0.5s, transform 0.5s;
      transition-timing-function: cubic-bezier(0.2, 1, 0.3, 1);
    }

    input {
      font-size: 7vw;
      width: 75%;
    }
  }

  &.show {
    opacity: 1;
    transition-delay: 0s;

    .search {
      pointer-events: auto;
      opacity: 1;

      button {
        opacity: 1;
        transform: scale3d(1, 1, 1);
      }

      form {
        opacity: 1;
        transform: scale3d(1, 1, 1);
      }
    }
  }
}
