.components-responsive-block-editor-addons-responsive__tabs {
  align-items: center;
  display: flex;
  flex-direction: row-reverse;
  position: relative;

  .components-base-control,
  .components-base-control__field {
    margin-bottom: 0 !important;
  }

  .components-tab-panel__tab-content {
    width: 100%;
  }

  &-item {
    align-items: center;
    appearance: none;
    margin: 0;

    &:first-of-type {
      border-bottom-right-radius: 0;
      border-top-right-radius: 0;

      &:not(.is-primary) {
        border-right: none;
      }
    }

    &:last-of-type {
      border-bottom-left-radius: 0;
      border-top-left-radius: 0;

      &:not(.is-primary) {
        border-left: none;
      }
    }

    svg {
      height: 15px;
      width: 15px;
    }
  }

  .components-tab-panel__tabs {
    align-items: center;
    display: flex;
    margin-left: 8px;
    position: relative;
    top: 11px;
  }
}

.components-panel__body {
  .components-responsive-block-editor-addons-dimensions-control {
    position: relative;

    &__mobile-controls-item {
      border-radius: 3px 0 0 3px;
      box-shadow: none;
      display: none;
      font-size: 10px;
      height: 30px;
      justify-content: center;
      left: 0;
      line-height: 20px;
      padding: 0;
      position: absolute;
      text-align: center;
      text-shadow: none;
      top: 25px;
      width: 26px;
      z-index: 1;

      &.is-active {
        display: block;
      }

      &:focus:enabled {
        box-shadow: inset 0 0 0 1px $white;

        svg {
          fill: $white;
        }
      }

      svg {
        position: relative;
      }

      &--default svg {
        top: 3px;
      }

      &--desktop svg {
        top: 3px;
      }

      &--tablet svg {
        top: 3px;
      }

      &--mobile svg {
        top: 3px;
      }
    }

    .edit-post-settings-sidebar__panel-block & {
      margin-bottom: 1.5em;
    }

    .components-base-control__label {
      margin-bottom: 5px;
    }

    .components-base-control__help {
      margin-top: -8px;
    }

    &__header,
    &__inputs {
      display: flex;
    }

    &__inputs {
      margin-left: 25px;
    }

    input[type="number"].components-responsive-block-editor-addons-dimensions-control__number {
      border-radius: 0;
      box-shadow: none !important;
      height: 30px;
      margin: 0 -1px 0 0;
      padding-right: 1px;
      width: 25%;

      &:focus {
        z-index: 1;
      }
    }

    &__input-labels {
      display: flex;
      margin-bottom: -3px;
      margin-left: 26px; // Same value as &__inputs + 1

      span {
        text-align: center;
        width: 25%;

        &:last-of-type {
          width: 30px;
        }
      }
    }

    &__number-label {
      color: $dark-gray-300;
      display: block;
      font-size: 11px;
      margin-bottom: 1px;
      margin-top: 3px;
    }

    &__label {
      margin-bottom: 0;
    }

    &__header {
      justify-content: space-between;
      margin-bottom: 1px;
    }

    &__actions {
      position: relative;
      top: -2px;
    }

    &__units {
      margin-right: 3px;

      .components-button {
        font-size: 10px;
        justify-content: center;
        padding: 0;
        text-align: center;
        text-shadow: none;
        text-transform: uppercase;
        width: 25px;
      }
    }

    &_sync.components-button.is-small {
      border-radius: 0;
      border-bottom-right-radius: 3px;
      border-top-right-radius: 3px;
      box-shadow: none;
      height: auto;
      justify-content: center;
      padding: 0;
      text-align: center;
      text-shadow: none;
      width: 30px;

      svg {
        fill: currentColor;
        height: 18px;
        width: 18px;
      }
    }

    .components-font-size-picker__controls {
      margin-bottom: 0;
    }
  }
}

.components-responsive-block-editor-addons-dimensions-control__dropdown-content
  .components-button {
  padding-bottom: 8px;
  padding-top: 8px;

  &.is-no-size {
    font-size: 12px;
  }

  &.is-small-size {
    font-size: 14px;
  }

  &.is-medium-size {
    font-size: 20px;
  }

  &.is-large-size {
    font-size: 26px;
  }

  &.is-huge-size {
    font-size: 34px;
  }
}

// Styles to handle Gutenberg < V6.2.0.
// Should be able to deprecate when Gutenberg 6.2.0 is merged into WP core.
.components-panel__body {
  .components-responsive-block-editor-addons-dimensions-control {
    .components-font-size-picker__select {
      margin-bottom: 0 !important;
      width: 115px;

      .components-base-control__field {
        margin-bottom: 0;
      }
    }

    .components-font-size-picker__controls {
      align-items: center;
      display: flex;
      justify-content: space-between;
      max-width: $sidebar-width - (2 * $panel-padding);
    }

    .components-font-size-picker__select .components-base-control__label {
      margin-bottom: 5px;
    }

    .components-font-size-picker__select .components-base-control__label {
      display: none;
      visibility: hidden;
    }
  }
}

.rbea-inspector-tab {
  .components-panel__body.is-opened {
    padding: 16px;
  }

  .dashicons-image-rotate {
    color: #666666;
  }
}