$menuBackgroundGray: rgb(245, 245, 231);
$menuBorderColor: rgb(216, 216, 180);
$menuTextGray: rgb(179, 179, 148);

$inactiveBlue: #0099ff;
$activeBlue: blue;

.folder-window {
  min-width: 318px;
  height: 400px;
  max-height: 100%;
  max-width: 100vw;
  position: absolute;
  top: 90px;
  left: 50px;
  display: flex;
  flex-direction: column;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  overflow: hidden;

  li.arrow-previous,
  li.arrow-next {
    cursor: not-allowed;
    img {
      filter: grayscale(100%);
    }
    img,
    span {
      pointer-events: none;
      user-select: none;
    }

    &.active {
      cursor: pointer;

      img {
        filter: grayscale(0%);
      }
      &:hover {
        background: #e1dfd3;
      }
    }
  }

  @media (min-width: 540px) {
    min-width: 500px;
  }

  iframe {
    min-height: 100%;
    min-width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    border: none;
  }

  &::before,
  &::after {
    content: '';
    position: absolute;
    top: 0;
    width: 5px;
    height: 100%;
  }

  &::before {
    left: 0;
    background-image: linear-gradient(
      to right,
      rgba(0, 66, 156, 0.4) 0%,
      rgba(0, 102, 250, 0.4) 100%
    );
  }
  &::after {
    right: 0;
    background-image: linear-gradient(
      to left,
      rgba(0, 66, 156, 0.4) 0%,
      rgba(0, 102, 250, 0.4) 100%
    );
  }

  &.active {
    z-index: 1;
    .menu-bar,
    .folder-content {
      border-color: $activeBlue;
    }
    .top-bar {
      background-color: $activeBlue;

      background-image: linear-gradient(
        to top,
        #0063b9 5%,
        transparent 5.1%,
        transparent 85%,
        #49b2fb 100%
      );
      // background-size: calc(100% - 10px) 100%;
      background-size: 100%;
      background-position: center center;
      background-repeat: no-repeat;
    }
  }

  .folder-header {
  }
  .menu-bar {
    background-color: $menuBackgroundGray;
    border-left: 5px solid $inactiveBlue;
    border-right: 5px solid $inactiveBlue;
  }
  .folder-content {
    position: relative;
    background-color: #fff;
    border: 5px solid $inactiveBlue;
    border-top: 0;
    flex-grow: 1;
  }

  .top-bar {
    background-color: $inactiveBlue;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;

    .folder-label {
      display: flex;
      align-items: center;
      height: 40px;

      img {
        margin-right: 5px;
        max-width: 20px;
        height: 20px;
      }
      span {
        display: block;
        padding-top: 2px;
        font-size: 15px;
        color: #fff;
        font-weight: 900;
      }
    }

    .top-bar-controls {
      display: flex;
      .top-bar-button {
        border: 1px solid #fff;
        border-radius: 5px;
        margin-top: 2px;
        height: 26px;
        width: 26px;
        margin-left: 4px;
        background-image: radial-gradient(
          circle,
          rgba(255, 255, 255, 0.7) 0%,
          rgba(70, 161, 252, 0) 80%
        );
        background-size: 10px 10px;
        background-repeat: no-repeat;
        -webkit-box-shadow: inset -12px -16px 56px 0px rgba(0, 0, 0, 0.05);
        -moz-box-shadow: inset -12px -16px 56px 0px rgba(0, 0, 0, 0.05);
        box-shadow: inset -12px -16px 56px 0px rgba(0, 0, 0, 0.05);
        position: relative;

        &:before,
        &:after {
          content: '';
          display: block;
          position: absolute;
        }
        &.minimize {
          &:before {
            bottom: 5px;
            left: 5px;
            width: 10px;
            height: 3px;
            background-color: #fff;
          }
        }
        &.maximize {
          &:before {
            width: 12px;
            height: 12px;
            border: 1px solid #fff;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
          }
          &:after {
            width: 12px;
            height: 3px;
            background-color: #fff;
            left: 50%;
            transform: translateX(-50%);
            top: 5px;
          }
        }
        &.close {
          background-color: #da5a2c;
          &:before,
          &:after {
            background-color: #fff;
            width: 15px;
            height: 3px;
            top: 50%;
            left: 50%;
          }
          &:before {
            transform: translate(-50%, -50%) rotate(45deg);
          }
          &:after {
            transform: translate(-50%, -50%) rotate(-45deg);
          }
        }
      }
    }
  }

  .menu-top {
    font-size: 15px;
    border-bottom: 1px solid $menuBorderColor;
    height: 26px;
    display: flex;
    align-items: center;
    ul {
      list-style: none;
      display: flex;
      flex-direction: column;
      margin: 0;
      padding-left: 0;
      background-color: $menuBackgroundGray;
    }
    li {
      color: #000;
    }

    > ul {
      flex-direction: row;

      > li {
        padding: 0 5px;
        position: relative;

        // Submenu level 1
        ul {
          min-width: 80px;
          position: absolute;
          bottom: 0;
          left: 2px;
          transform: translateY(100%);
          display: none;
          border: 1px solid $menuBorderColor;
        }
      }
    }

    li:hover {
      background-color: $menuHoverBlue;
      color: #ffffff;
      cursor: pointer;

      > ul {
        display: block;
      }
    }
  }
  .menu-bottom {
    display: flex;
    height: 50px;
    align-items: center;
    border-bottom: 1px solid $menuBorderColor;

    img {
      max-height: 26px;
    }

    ul {
      margin: 0;
      padding: 0;
      list-style: none;
      display: flex;
      height: 100%;

      li {
        padding: 0 5px;
        display: flex;
        align-items: center;
        height: 100%;

        span {
          margin-left: 5px;
          font-size: 15px;
        }
      }

      + ul {
        border-left: 1px solid $menuBorderColor;
      }
    }
  }
  .address-bar {
    display: flex;
    align-items: center;
    border-bottom: 1px solid $menuBorderColor;
    span,
    .address-input {
      font-size: 13px;
    }
    span {
      color: $menuTextGray;
      padding: 0 5px;
    }
    .address-input-wrapper {
      display: flex;
      background-color: #fff;
      margin: 0 3px;
      padding: 0 3px;

      .address-input-icon {
        &:placeholder {
          color: lightslategray;
        }
        img {
          max-height: 16px;
          margin-right: 3px;
        }
      }
      .address-input {
        border: none;
        color: #000;

        &::placeholder {
          color: lightslategray;
        }
      }
      form {
        display: inline-block;
      }
    }
  }
}
