/*  ==========================================================================
    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;
}
.BN-be > * {
  margin-bottom: 7px;
}
.BN-be > *:last-child {
  margin-bottom: 0;
}
.BN-be-prefix {
  display: inline-block;
  border: 1px solid;
  padding: 2px 5px;
}

/* ElementName */
.BN-be__name {
  background-color: #656565;
  color: #fff;
  text-transform: uppercase;
  text-align: center;
  padding: 3px;
  font-size: 12px;
}

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

/* Rte */
.BN-be__rte {
  display: flex;
}
.BN-be__rte__data {
  border: 1px dashed;
  padding: 0 5px;
}
.BN-be__rte__data > * {
  margin-top: 5px;
  margin-bottom: 5px;
}

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

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

/* ElementVersion */
.BN-be__version {
  display: flex;
  justify-content: flex-end;
}
.BN-be__version__data {
  border: 1px solid;
  text-align: center;
  padding: 2px 5px;
  color: #ff5454;
}

/* Spacer */
.BN-be__spacer {
  border-bottom: 5px solid #d8d8d8;
}
.BN-be__spacer[data-layout="small"] {
  width: 50%;
}

/* CheckBox */
.BN-be__checkbox__yes {
  color: green;
}
.BN-be__checkbox__no {
  color: red;
}

/* Files */
.BN-be__files__data {
  display: flex;
  align-items: center;
}
.BN-be__files__item {
  margin-right: 5px;
}

/*
 * REMOVE DEFAULT BACKEND TEMPLATE
 */

.BN-be-parent > *:not(div) {
  display: none;
}

.BN-be-parent .element-preview-header {
  display: none;
}
