@use '../global/common' as global;

// ------------------------------
// ヘッダー ナビゲーション
// ------------------------------

// ブログ名全体
.acms-navbar-admin {
  z-index: global.zIndex(acms-navbar-admin);
  box-sizing: border-box;
  width: 100vw;
  height: 60px;
  padding: 0 10px;
  padding-right: calc(5px + constant(safe-area-inset-right));
  padding-left: calc(5px + constant(safe-area-inset-left));
  text-align: center;
  background: global.$base-bg-primary;

  .logo {
    float: left;
    margin: 0;
    line-height: 1;
  }
}

@media screen and (min-width: global.$breakpoint-md-min) {
  .acms-navbar-admin {
    width: 50px;
    height: 100vh;
  }
}

/* ナビゲーションリンク */
.acms-navbar-admin-nav {
  padding-left: 0;
  margin: 0 -10px;

  @include global.font-size(22);

  > li {
    margin-bottom: 10px;
    list-style: none;

    > a,
    > button {
      display: block;
      padding: 5px 0;
      margin: 0 auto;
      line-height: 1.2;
      color: global.$acms-color-white;
      text-align: center;
      background: 0;
      border: 0;

      @include global.font-size(22);

      &:focus {
        outline: 0;
      }

      &:hover,
      &:focus,
      &:active {
        opacity: 0.6;
      }
    }

    // ナビゲーションリンク ボタンは回避
    .acms-btn {
      padding: 8px 10px;
    }
  }

  [class*='acms-icon-'] {
    padding: 0;
  }
}

.acms-user-profile {
  border: 2px solid global.$acms-color-gray20;
  border-radius: 100%;
}

// ブログ名
.acms-title-blog,
.acms-title-rule {
  margin: 0;
  font-weight: bold;
  border-bottom: 1px solid #9e9e9e;

  @include global.font-size(13);

  a {
    display: block;
    padding: 20px 10px 20px 20px;
    color: global.$acms-color-black;
  }
}

// hover
.acms-navbar-admin-nav > li > a:hover,
.acms-title-blog a:hover {
  text-decoration: none;
  opacity: 0.5;
}

.acms-title-blog .acms-arrow-right {
  position: absolute;
  right: 10px;
  margin: 5px 0 0;
}

@media screen and (min-width: global.$breakpoint-md-min) {
  .acms-title-blog,
  .acms-title-rule {
    a {
      padding: 10px 20px;
    }
  }

  .acms-navbar-admin-profile {
    position: absolute;
    bottom: 15px;
    left: 10px;

    .js-acms-dropdown-menu {
      top: -60px;
    }
  }
}

.acms-nav {
  z-index: global.zIndex(acms-nav);
}

@media screen and (min-width: global.$breakpoint-md-min) {
  .acms-nav {
    position: fixed;
    top: 0;
  }
}

.acms-navbar-system {
  position: relative;

  // a-blog cmsのロゴを固定
  .acms-list-blog-sp {
    position: absolute;
    top: 10px;
    right: 15px;
    width: auto;
    margin: 0;
    color: global.$acms-color-white;

    @include global.font-size(30);
  }
}

.acms-title-cms {
  padding: 15px 0 20px;
  margin: 0;

  @include global.font-size(26);
}

.acms-icon-logo {
  padding: 0;
}

.acms-icon-logo.acms-blog-color {
  display: block;
  color: global.$acms-color-white;
}

// スクロール
.acms-list-scroll {
  max-height: 400px;
  overflow: auto;
}

// a-blog cmsのロゴを固定
.acms-navbar-system .acms-list-blog-sp {
  position: absolute;
  top: 10px;
  right: 15px;
  width: auto;
  margin: 0;
  color: global.$acms-color-white;

  @include global.font-size(30);
}

@media screen and (max-width: global.$breakpoint-md-max) {
  // オフキャンバス
  .js .js-offcanvas {
    display: none;

    &.js-acms-offcanvas-sidebar {
      display: block;
    }
  }

  .no-js {
    overflow: inherit;

    .acms-sidebar {
      position: static;
      width: 100%;
    }

    .acms-nav {
      position: static;
    }

    #acms-admin-main {
      height: auto;
      overflow: inherit;
    }
  }
}
