/**
 * @file
 * Provides admin blazy layout.
 */

/* stylelint-disable selector-max-id, declaration-no-important */
/* @fixme problematic empty grids with heights vs. options in admin preview. */
.layout-builder .b-layout {
  min-height: 160px;
}

.layout-builder .b-layout--bg {
  padding-top: 140px !important;
}

.b-layout .grid {
  min-height: 170px;
  background-color: #eaeaea;
}

.b-layout .region--empty {
  min-height: 120px;
}

.layout-builder .b-layout .grid::after {
  position: absolute;
  z-index: 99;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  padding: 2px;
  content: attr(title);
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.4);
  font-size: 10px;
}

.layout-builder .b-layout .region--b-bg {
  padding: 0;
}

.b-layout .region--b-bg:not([data-b-h]) {
  min-height: 210px;
}

.region--bg .block--b-bg ~ .layout-builder__add-block {
  display: none;
}

.layout-builder .b-layout .block {
  width: 100%;
  background-color: transparent;
}

.b-layout .layout-builder__add-block {
  position: absolute;
  z-index: 9;
  top: auto;
  bottom: 0;
  left: 0;
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 8px 0;
  pointer-events: none;
  background-color: #eff6fcbf;
}

.b-layout .region--bg.region--empty .layout-builder__add-block {
  top: 60px;
  bottom: auto;
}

.b-layout .layout-builder__add-block a {
  pointer-events: auto;
  font-size: 14px;
}

.layout-builder .grid .blazy__caption,
.layout-builder .grid .slide__caption,
.layout-builder .grid .box__caption {
  pointer-events: none;
}

.layout-builder-block.block--b-bg,
.layout-builder-block.block--b-bg > .b-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  inset: 0;
}

.layout-builder-block.block--b-bg + .block {
  margin-top: 2em;
}

.b-layout .blazy__warning {
  padding: 26px 0;
  text-align: center;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.4);
  font-size: 12px;
  line-height: 1.2;
}

.b-layout-wrapper--ete .region--bg .block--b-bg > .contextual {
  right: 100px;
}

[dir="rtl"] .b-layout-wrapper--ete .region--bg .block--b-bg > .contextual {
  left: 100px;
}

.layout-builder__region > .blazy,
.layout-builder__region > .b-link {
  display: block;
  width: 100%;
}

/* Disable link/lightbox/player for admin preview to avoid conflict actions. */
.layout-builder .b-layout .b-link,
.layout-builder .b-layout .litebox,
.layout-builder .b-layout .media__icon {
  pointer-events: none;
}
