@use "global/common" as global;

// ------------------------------
// 変数
// ------------------------------
@import "global/variables-fonts";



// ------------------------------
// focused image
// ------------------------------
.js-focused-image:not(.js-lazy-load) {
  visibility: hidden;
}

#acms-preview-area {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: global.zIndex(preview-area);
}

.js-media-unit {
  position: relative;
  z-index: 1;
  min-height: 300px;
  &.done {
    min-height: 0;
  }
}

.js-drop-area {
  .acms-media-img-file {
    width: 64px;
    height: auto;
  }
}

.flatpickr-calendar.open {
  z-index: global.zIndex(flatpickr) !important;
}

.js-acms-expand-btn {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 20;
  width: 32px;
  height: 32px;
  font-size: 16px;
  text-align: center;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 3px;
  box-shadow: rgba(0, 0, 0, .2) 0 3px 6px;
}

.js-acms-expand-btn .acms-icon {
  padding-right: 0;
}

.js-acms-expand {
  position: relative;
  box-sizing: border-box;
  padding: 0;
  background: #FFF;
}
.js-acms-expand-inner {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding-top: 60px;
  overflow-x: hidden;
  overflow-y: auto;
}
.js-acms-expanded {
  height: 100%;
}
.js-acms-expanded .js-acms-expand-btn {
  position: fixed;
}
.js-acms-expanding,
.js-acms-expanded {
  z-index: global.zIndex(js-ui-expand);
}
.smartblock-tooltip {
  z-index: global.zIndex(js-ui-expand) !important;
}

.js-acms-expanding,
.js-acms-expanded {
  .js-acms-expand-btn {
    top: 10px;
    right: 10px;
  }
  .js-acms-expand-inner {
    padding-top: 80px;
  }
  .js-acms-expand {
    padding: 10px;
  }
}

.js-acms-expanding .js-smartblock-edit {
  max-width: 780px;
  margin: 0 auto;
}

.cke_panel {
  z-index: global.zIndex(ckeditor-select) !important;
}

.ProseMirror figure.empty-node .caption {
  position: relative;
}

.ProseMirror figure.empty-node .caption:before {
  height: 0;
  color: #aaa;
  content: "キャプションを入力してください";
  pointer-events: none;
}

.lite-editor-tooltip-wrap {
  z-index: global.zIndex(lite-editor-bg) !important;
}

.acms-dragging {
  z-index: global.zIndex(acms-dragging) !important;
}

#emoji-picker .search-emojis {
  position: relative;
  display: block;
  width: 100%;
  height: 85%;
  min-height: 23px;
  margin-top: 1px;
  color: #555459;
  font-size: 13px;
  background: transparent;
  border: none;
  outline: none;
  box-shadow: none;
}


// ------------------------------
// Lazy Load
// ------------------------------

.js-lazy-load {
  transform: translateY(30px);
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1) 0.1s, transform 0.9s cubic-bezier(0.5, 0, 0, 1) 0.1s;

  &.loading {
    transform: translateY(0);
    opacity: 1;
  }

  @media print {
    transform: translateY(0);
    opacity: 1;
  }
}

img.js-lazy-load {
  background: global.$acms-lazy-load-bg url('/themes/system/images/marker/icon-lazy-load-image.svg') no-repeat center / 40px 40px;

  &.loaded {
    background: none;
  }
}
.js-lazy-load.is-movie {
  background: global.$acms-lazy-load-bg url('/themes/system/images/marker/icon-lazy-load-movie.svg') no-repeat center / 40px 40px;
}
