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

.acms-banner-edit-item {
	position: relative;
	margin-bottom: 15px;
	padding-bottom: 10px;
	background-color: #FFF;
	border-radius: 3px;
	box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}

.acms-banner-edit-item-wrap {
	margin-bottom: 15px;
}

.acms-banner-edit-item-source {
	padding-bottom: 0;
}

.acms-banner-edit-header {
	padding: 5px 15px;
	color: #FFF;
	background-color: #A2A2B3;
	border-top-left-radius: 5px;
	border-top-right-radius: 5px;
	transition: background-color .2s linear;
}

.acms-nested-item-header.acms-banner-edit {
	padding-left: 50px;
}

.acms-banner-edit-header-type-label {
	display: inline-block;
	float: right;
	margin: 5px 10px 0 0;
	color: #FFF;
	font-size: 13px;
}

.acms-banner-edit-container {
	padding: 15px;
	background-color: #F7F7F7;
}

.acms-banner-edit {
	padding: 10px;
	transition: opacity .2s linear;
	.ReactCodeMirror {
    padding: 5px 5px 4px;
    overflow: auto;
    color: #333;
    line-height: 1.7;
    background: #fbfbfb;
    border: 1px solid rgba(0,0,0,.2);
    border-radius: 3px;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.1);
    resize: vertical;
	}
	.CodeMirror {
		height: 150px;
		background: #fbfbfb;
	}
}

.acms-banner-edit-item-inner {
	display: flex;
	padding-top: 10px;
}


.acms-banner-edit-item-thumb-wrap,
.acms-banner-edit-check-wrap {
	width: 240px;
	.acms-banner-img-wrap {
		box-sizing: border-box;
		min-height: 140px;
	}
}

.acms-banner-edit-item-thumb-wrap {
	flex: 3;
}

.acms-banner-edit-content {
	flex: 7;
	padding-left: 30px;
}

.acms-banner-edit-item-content {
	flex: 1;
}

.acms-banner-edit-item-title {
	margin: 0 0 5px 0;
	font-size: 14px;
}

.acms-banner-edit-item-btn-wrap {
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.acms-banner-edit-item-handle {
	display: inline-block;
	box-sizing: border-box;
	margin-right: 10px;
	color: #FFF;
	font-size: 13px;
	cursor: -webkit-grab;
}

.acms-banner-edit-remove-btn {
	float: right;
	width: 18px;
	height: 18px;
	margin: 5px 0 0 0;
	padding: 2px;
	color: #a2a2b3;
	font-size: 10px;
	text-align: center;
	background: #fff;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	-webkit-appearance: none;
}

.acms-banner-edit-figure {
	position: relative;
	box-sizing: border-box;
	padding-bottom: 100%;
	overflow: hidden;
	background-color: #FBFBFB;
	cursor: pointer;
	img {
		position: absolute;
		top: 50%;
		left: 50%;
		width: 100%;
		height: auto;
		transform: translate(-50%, -50%);
		opacity: 0;
		transition: transform .3s;
	}
}

.acms-banner-edit-table {
	th {
		min-width: 100px;
		text-align: right;
		vertical-align: top;
	}
	td, th {
		padding: 5px;
	}
}

.acms-banner-edit-source-table {
	td, th {
		padding: 0 5px;
	}
}

.ablogcms--column-add-btn .acms-banner-edit-item-handle {
	top: 3px;
	left: 5px;
	margin: 0;
}

.acms-banner-edit-open-label {
	display: inline-block;
	margin-right: 20px;
	font-weight: bold;
	vertical-align: middle;
}

.acms-banner-edit-preview-wrap {
  position: relative;
  display: inline-block;
	padding: 4px;
	background-color: #eaeef5;
  &:hover {
    .acms-banner-edit-preview-overlay {
      opacity: 1;
    }
    .acms-banner-edit-preview-remove-btn {
      opacity: 1;
    }
    .acms-banner-edit-preview-edit-btn {
      opacity: 1;
    }
  }
  .acms-banner-edit-preview {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 250px;
  }
}

.acms-banner-edit-preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, .4);
  opacity: 0;
  transition: opacity .3s;
}

.acms-media-edit-btn.acms-banner-edit-preview-edit-btn {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 4px 8px;
  opacity: 0;
  transition: opacity .3s;
  @include global.font-size(11);
}

.acms-banner-edit-preview-remove-btn {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  width: 32px;
  height: 32px;
  background-color: transparent;
  border: none;
  border-radius: 50%;
  opacity: 0;
  transition: opacity .3s;
  &:before {
    transform: rotate(45deg);
    transform-origin: center;
  }
  &:after {
    transform: rotate(-45deg);
    transform-origin: center;
  }
  &:before,
  &:after {
    position: absolute;
    top: 14px;
    left: 8px;
    display: block;
    width: 15px;
    height: 1px;
    background-color: #fff;
    content: "";
  }
}

.acms-banner-edit-unit-box {
	position: relative;
	padding: 10px 10px 0;
	background: #e4e5ea;
	border: 1px solid #d8d8de;
	box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
	.acms-banner-edit-item-handle {
		margin-top: -5px;
		color: #333333;
		vertical-align: middle;
	}
}

.acms-banner-edit-unit-box-inner {
	&:after {
		display: table;
		clear: both;
		content: "";
	}
}

.acms-banner-edit-btn-group {
	display: inline-block;
	vertical-align: middle;
}

// ------------------------------
// ドロップエリア
// ------------------------------

.acms-banner-edit-droparea {
  padding: 35px 0;
  text-align: center;
  background-color: transparent;
  border: 1px dashed #024CC5;
  transition: background-color .3s;
}

.drag-n-drop-hover .acms-banner-edit-droparea {
  background-color: #eaeef5;
}

.acms-banner-edit-droparea-text {
  @include global.font-size(12);
  color: #989fac;
  transition: color .3s;
}

.acms-banner-edit-droparea-btn {
  width: 120px;
  margin: 10px 0;
  color: #333;
  font-weight: bold;
  line-height: 30px;
  text-align: center;
  background-color: #f1f1f1;
  border-radius: 3px;
  transition: background-color .3s;
  &:hover {
    background-color: #E2E2E2;
  }
}

.drag-n-drop-hover {
  .acms-banner-edit-droparea-btn {
    background-color: #E2E2E2;
  }
}

@media screen and (max-width: global.$breakpoint-md-max) {
	.acms-banner-edit-item-inner {
		display: block;
	}
	.acms-banner-edit-item-thumb-wrap {
		width: auto;
	}
	.acms-banner-edit-content {
		padding-left: 0;
	}
	.acms-banner-edit-item {
		padding-left: 0;
		table,
		tbody,
		tr,
		td,
		th {
			display: block;
			text-align: left;
		}
		select {
			padding-top: 2px;
			padding-bottom: 2px;
			font-size: 12px;
		}
	}
}

// ------------------------------
// ステータスが非表示の場合
// ------------------------------

.acms-banner-edit-item-hide {
	.acms-banner-edit-header {
		background: #d8d8de;
	}
	.acms-banner-edit {
		opacity: .66;
	}
	.acms-banner-edit-item-handle {
		color: #333333;
	}
	.acms-banner-edit-header-type-label {
		color: #333333;
	}
	.acms-banner-edit-remove-btn {
		color: #333333;
	}
}
