@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{
  margin: 0 -10px;
  padding-left: 0;
  @include global.font-size(22);
  > li {
    margin-bottom: 10px;
    list-style: none;
    > a,
    > button {
      display: block;
      margin: 0 auto;
      padding: 5px 0;
      color: #FFF;
      line-height: 1.2;
      text-align: center;
      background: 0;
      border: 0;
      @include global.font-size(22);

      &:focus {
        outline: 0;
      }

      &:hover,
      &:focus,
      &:active {
        opacity: .6;
      }
    }
    // ナビゲーションリンク ボタンは回避
    .acms-btn{
      padding: 8px 10px;
    }
  }

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

.acms-user-profile {
  border: 2px solid #F1F1F1;
  border-radius: 100%;
}

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

  a {
    display: block;
    padding: 20px 10px 20px 20px;
    color: #333;
  }
}

// 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 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;
    @include global.font-size(30);
    color: #ffffff;
  }
}

.acms-title-cms {
  margin: 0;
  padding: 15px 0 20px 0;
  @include global.font-size(26);
}

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

.acms-icon-logo.acms-blog-color {
  display: block;
  color: #fff;
}

.js-acms-color-picker-target {
  background-color: global.$acms-red;
}

// スクロール
.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;
  @include global.font-size(30);
  color: #ffffff;
}

@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;
    }
  }
}
