@type: 'extra';
@element: 'custom';

@import (multiple, reference, optional) '../../theme.config';

@borderColor: rgba(120, 192, 215, 0.75);

.block-editor-group {
  [data-rbd-draggable-context-id] {
    margin-bottom: 1rem;
  }

  .block.group.selected::before,
  .block.group:hover::before {
    border-style: dashed;
  }

  fieldset {
    border: none;

    legend {
      position: absolute;
      z-index: 3;
      top: -1.3em;
      left: 0;
      width: fit-content;
      padding: 0 1rem;
      margin-right: auto;
      margin-left: auto;
      background-color: @pageBackground;
      color: @borderColor;
      cursor: pointer;
      text-align: center;
    }
  }

  .section-block {
    padding-top: 1rem;
    padding-bottom: 0.1rem;
    margin: 0;
    outline: none;
  }

  .counter {
    display: grid;
    align-items: center;
    font-size: 85%;
    grid-gap: 0.5em;
    grid-template-columns: 98% auto;
    text-align: end;

    &.info {
      color: #ccc;
    }

    &.danger {
      color: crimson;
    }

    &.warning {
      color: darkorange;
    }
  }

  .blocks-form {
    margin-top: 0.5rem;
  }

  .section-block.disable-inner-buttons {
    .drag.handle.wrapper,
    .delete-button,
    .block-add-button {
      display: none !important;
    }
  }
}
