/*  ==========================================================================
    Place here all css rules which should apply in the content backend preview

    For Example:
     - backend page tree
     - mask elements
    ========================================================================== */

/*
 * Login
 */
/* Invert SVG logo if dark mode is active */
@media (prefers-color-scheme: dark) {
  .typo3-login-logo img {
    filter: invert(100%);
  }
}

/*
 * Icon-SelectBox customization
 */

.form-wizard-icon-list {
  background: #ffffff;
  border-color: #bbb;
}
.form-wizard-icon-list-item img {
  max-height: 20px;
}
.form-wizard-icon-list-item svg {
  fill: #000000;
  color: #000000;
}
.form-wizard-icon-list-item a:hover,
.form-wizard-icon-list-item a.active,
.form-wizard-icon-list-item a:active {
  background-color: #e9f2fa;
  border-color: #6daae0;
}

/*
 * Misc
 */

.element-preview:has(.BN-be) .element-preview-header {
  display: none;
}

/*
 * Backend Preview of Mask Element
 */

/* General */
.BN-be {
  color: #000;
  font-size: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.BN-be-row {
  display: flex;
  align-items: center;
  gap: 5px;
  background-color: #efefef;
  padding: 5px 10px;
  border-radius: 3px;
}
.BN-be-label {
  display: inline-block;
  padding: 2px 5px;
  border-radius: 3px;
  background-color: #2D2D2A;
  color: #ffffff;
  font-size: 10px;
  font-weight: 400;
}

/* More */
.BN-be-more {
  width: 100%;
}

/* Title */
.BN-be__title .BN-be__title__data {
}
.BN-be__title[data-layout="1"] .BN-be__title__data {
  font-size: 12px;
}
.BN-be__title[data-layout="2"] .BN-be__title__data {
  font-size: 11px;
}
.BN-be__title[data-layout="3"] .BN-be__title__data {
  font-size: 10px;
}

/* error */
.BN-be__error__data {
  font-size: 12px;
  color: red;
  font-style: italic;
}

/* Rte */
.BN-be__rte__data {
  border: 1px dashed;
  padding: 0 5px;
  border-radius: 3px;
}

/* Link */
.BN-be__link__data {
  text-decoration: underline;
}

/* SpaceAfter */
.BN-be__spaceafter {
  display: flex;
  width: 100%;
  justify-content: flex-end;
}
.BN-be__spaceafter__data {
  border: 1px solid;
  text-align: center;
  padding: 2px 5px;
  color: #b5b5b5;
  border-radius: 3px;
}

/* Spacer */
.BN-be__spacer {
  height: 4px;
  background-color: #d8d8d8;
  width: 100%;
  border-radius: 3px;
}
.BN-be__spacer[data-layout="small"] {
  width: 75%;
}

/* CheckBox */
.BN-be__checkbox__check {
  width: 30px;
  height: 16px;
  border-radius: 25px;
  background-color: green;
  position: relative;
  border: 1px solid #bbb;
}
.BN-be__checkbox__check:after {
  content: '';
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #fff;
  position: absolute;
  top: 50%;
  right: 2px;
  transform: translateY(-50%);
}
.BN-be__checkbox__check--yes {
  background-color: #79a548;
}
.BN-be__checkbox__check--no {
  background-color: transparent;
}
.BN-be__checkbox__check--no:after {
  right: auto;
  left: 2px;
  background-color: #bbb;
}

/* Files */
.BN-be__files__data {
  display: flex;
  gap: 5px;
  align-items: center;
}
.BN-be__files__item {
  border-radius: 3px;
  overflow: hidden;
}
