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

// ------------------------------
// ボタンの固定
// ------------------------------
// ボタンを固定
.fixed {
  position: static;
  top: inherit;
  left: inherit;
}

@media screen and (min-width: global.$breakpoint-md-min) {
  .fixed {
    position: fixed;
    top: 47px;
    z-index: global.zIndex(fixed);
  }
}

// ボタンを右に配置
.fixed.acms-position-right {
  right: 20px;
}

// ボタンの固定全体
.fixed.acms_fix_bg {
  z-index: global.zIndex(acms_fix_bg);
  width: 100%;

  @include global.box-sizing(border-box);
}

.acms_fix_bg_index {
  box-sizing: content-box;

  @include global.clearfix;
}

/* 固定ボタン */
.js-acms_fix_target {
  margin-bottom: 10px;

  &.fixed {
    margin-bottom: 0;
  }
}

@media screen and (min-width: global.$breakpoint-md-min) {
  .fixed.acms_fix_bg {
    top: 36px;
    left: 180px;
    padding: 0 20px 0 0;
  }
}

// ボタンの固定 白背景
.fixed .acms_fix_bg_index {
  height: 32px;
  padding: 10px 0;
  margin-right: 0;
  background-color: global.$acms-color-white;
  box-shadow: 0 0 0 global.$acms-color-white;
}

@media screen and (min-width: global.$breakpoint-md-min) {
  .fixed .acms_fix_bg_index {
    height: 32px;
    padding: 10px 0;
    box-shadow: 0 3px 0 rgb(0 0 0 / 10%);
  }
}

// 固定したボタンの重ね順
.fixed .acms_fix_bg_index .acms-btn-admin {
  z-index: global.zIndex(acms_fix_bg_index);
}

.js-acms_fix_target {
  margin-bottom: 10px;

  .acms-btn-admin {
    margin-bottom: 10px;
  }
}

@media screen and (min-width: global.$breakpoint-md-min) {
  .fixed + .acms-admin-title2 {
    margin-top: 55px;
  }

  .fixed + .acms-table-responsive {
    margin-top: 70px;
  }

  .js-acms_fix_target .acms-btn-admin {
    margin-bottom: 0;
  }
}
