.responsive-block-editor-addons-block-image-boxes {
  .has-columns {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
  }
  .has-medium-gutter.has-2-columns > *:not(.block-editor-inner-blocks) {
    max-width: calc(100% / 2 - 1em) !important;
  }
  .has-medium-gutter.has-3-columns > *:not(.block-editor-inner-blocks) {
    max-width: calc(100% / 2.975 - 1.5em) !important;
  }
  .has-medium-gutter.has-4-columns > *:not(.block-editor-inner-blocks) {
    max-width: calc(100% / 4 - 1.5em) !important;
  }
  .has-no-gutter.has-4-columns > *:not(.block-editor-inner-blocks) {
    max-width: calc(100% / 4 - 0.2em) !important;
  }
  .has-no-gutter.has-3-columns > *:not(.block-editor-inner-blocks) {
    max-width: calc(100% / 2.975 - 0.3em) !important;
  }
  .has-no-gutter.has-2-columns > *:not(.block-editor-inner-blocks) {
    max-width: calc(100% / 2 - 0.15em) !important;
  }
  .has-small-gutter.has-2-columns > *:not(.block-editor-inner-blocks) {
    max-width: calc(100% / 2 - 0.5em) !important;
  }
  .has-small-gutter.has-3-columns > *:not(.block-editor-inner-blocks) {
    max-width: calc(100% / 3 - 1em) !important;
  }
  .has-small-gutter.has-4-columns > *:not(.block-editor-inner-blocks) {
    max-width: calc(100% / 4 - 1em) !important;
  }
  .has-medium-gutter.has-2-columns > *:not(.block-editor-inner-blocks) {
    max-width: calc(100% / 2 - 1em) !important;
  }
  .has-large-gutter.has-2-columns > *:not(.block-editor-inner-blocks) {
    max-width: calc(100% / 2.01 - 1.5em) !important;
  }
  .has-large-gutter.has-3-columns > *:not(.block-editor-inner-blocks) {
    max-width: calc(100% / 3.03 - 2em) !important;
  }
  .has-large-gutter.has-4-columns > *:not(.block-editor-inner-blocks) {
    max-width: calc(100% / 4.08 - 2em) !important;
  }
  .has-huge-gutter.has-2-columns > *:not(.block-editor-inner-blocks) {
    max-width: calc(100% / 2.02 - 2em) !important;
  }
  .has-huge-gutter.has-3-columns > *:not(.block-editor-inner-blocks) {
    max-width: calc(100% / 3.09 - 2.5em) !important;
  }
  .has-huge-gutter.has-4-columns > *:not(.block-editor-inner-blocks) {
    max-width: calc(100% / 4.15 - 2.5em) !important;
  }
  @media (max-width: 767px) {
    .has-no-gutter.has-4-columns > *:not(.block-editor-inner-blocks) {
      max-width: none !important;
    }
    .has-no-gutter.has-3-columns > *:not(.block-editor-inner-blocks) {
      max-width: none !important;
    }
    .has-no-gutter.has-2-columns > *:not(.block-editor-inner-blocks) {
      max-width: none !important;
    }
  }
  @media (min-width: 782px) {
    .has-columns.has-3-columns > *:not(.block-editor-inner-blocks),
    .has-columns.has-4-columns > *:not(.block-editor-inner-blocks) {
      flex-basis: 33.33% !important;
    }
  }
  @media (min-width: 600px) {
    .has-columns.has-2-columns > *:not(.block-editor-inner-blocks),
    .has-columns.has-3-columns > *:not(.block-editor-inner-blocks),
    .has-columns.has-4-columns > *:not(.block-editor-inner-blocks) {
      flex-basis: 50% !important;
    }
  }
  @media (min-width: 1280px) {
    .has-columns.has-4-columns > *:not(.block-editor-inner-blocks) {
      flex-basis: 25% !important;
    }
  }
}
.responsive-section-inner-wrap{
    .has-columns {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      width: 100%;
    }
    .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-medium-gutter.has-2-columns > *:not(.block-editor-inner-blocks) {
      max-width: calc(100% / 2 - 1em) !important;
    }
    .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-medium-gutter.has-3-columns > *:not(.block-editor-inner-blocks) {
      max-width: calc(100% / 2.975 - 1.5em) !important;
    }
    .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-medium-gutter.has-4-columns > *:not(.block-editor-inner-blocks) {
      max-width: calc(100% / 4 - 1.5em) !important;
    }
    .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-no-gutter.has-4-columns > *:not(.block-editor-inner-blocks) {
      max-width: calc(100% / 4 - 0.2em) !important;
    }
    .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-no-gutter.has-3-columns > *:not(.block-editor-inner-blocks) {
      max-width: calc(100% / 2.975 - 0.3em) !important;
    }
    .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-no-gutter.has-2-columns > *:not(.block-editor-inner-blocks) {
      max-width: calc(100% / 2 - 0.15em) !important;
    }
    .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-small-gutter.has-2-columns > *:not(.block-editor-inner-blocks) {
      max-width: calc(100% / 2 - 0.5em) !important;
    }
    .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-small-gutter.has-3-columns > *:not(.block-editor-inner-blocks) {
      max-width: calc(100% / 3 - 1em) !important;
    }
    .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-small-gutter.has-4-columns > *:not(.block-editor-inner-blocks) {
      max-width: calc(100% / 4 - 1em) !important;
    }
    .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-medium-gutter.has-2-columns > *:not(.block-editor-inner-blocks) {
      max-width: calc(100% / 2 - 1em) !important;
    }
    .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-large-gutter.has-2-columns > *:not(.block-editor-inner-blocks) {
      max-width: calc(100% / 2.01 - 1.5em) !important;
    }
    .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-large-gutter.has-3-columns > *:not(.block-editor-inner-blocks) {
      max-width: calc(100% / 3.03 - 2em) !important;
    }
    .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-large-gutter.has-4-columns > *:not(.block-editor-inner-blocks) {
      max-width: calc(100% / 4.08 - 2em) !important;
    }
    .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-huge-gutter.has-2-columns > *:not(.block-editor-inner-blocks) {
      max-width: calc(100% / 2.02 - 2em) !important;
    }
    .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-huge-gutter.has-3-columns > *:not(.block-editor-inner-blocks) {
      max-width: calc(100% / 3.09 - 2.5em) !important;
    }
    .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-huge-gutter.has-4-columns > *:not(.block-editor-inner-blocks) {
      max-width: calc(100% / 4.15 - 2.5em) !important;
    }
    @media (max-width: 767px) {
      .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-medium-gutter.has-2-columns > *:not(.block-editor-inner-blocks) {
        max-width: none !important;
      }
      .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-medium-gutter.has-3-columns > *:not(.block-editor-inner-blocks) {
        max-width: none !important;
      }
      .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-medium-gutter.has-4-columns > *:not(.block-editor-inner-blocks) {
        max-width: none !important;
      }
      .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-no-gutter.has-4-columns > *:not(.block-editor-inner-blocks) {
        max-width: none !important;
      }
      .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-no-gutter.has-3-columns > *:not(.block-editor-inner-blocks) {
        max-width: none !important;
      }
      .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-no-gutter.has-2-columns > *:not(.block-editor-inner-blocks) {
        max-width: none !important;
      }
      .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-small-gutter.has-2-columns > *:not(.block-editor-inner-blocks) {
        max-width: none !important;
      }
      .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-small-gutter.has-3-columns > *:not(.block-editor-inner-blocks) {
        max-width: none !important;
      }
      .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-small-gutter.has-4-columns > *:not(.block-editor-inner-blocks) {
        max-width: none !important;
      }
      .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-medium-gutter.has-2-columns > *:not(.block-editor-inner-blocks) {
        max-width: none !important;
      }
      .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-large-gutter.has-2-columns > *:not(.block-editor-inner-blocks) {
        max-width: none !important;
      }
      .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-large-gutter.has-3-columns > *:not(.block-editor-inner-blocks) {
        max-width: none !important;
      }
      .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-large-gutter.has-4-columns > *:not(.block-editor-inner-blocks) {
        max-width: none !important;
      }
      .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-huge-gutter.has-2-columns > *:not(.block-editor-inner-blocks) {
        max-width: none !important;
      }
      .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-huge-gutter.has-3-columns > *:not(.block-editor-inner-blocks) {
        max-width: none !important;
      }
      .wp-block-responsive-block-editor-addons-image-boxes-block__inner.has-huge-gutter.has-4-columns > *:not(.block-editor-inner-blocks) {
        max-width: none !important;
      }
    }
    @media (min-width: 782px) {
      .has-columns.has-3-columns > *:not(.block-editor-inner-blocks),
      .has-columns.has-4-columns > *:not(.block-editor-inner-blocks) {
        flex-basis: 33.33% !important;
      }
    }
    @media (min-width: 600px) {
      .has-columns.has-2-columns > *:not(.block-editor-inner-blocks),
      .has-columns.has-3-columns > *:not(.block-editor-inner-blocks),
      .has-columns.has-4-columns > *:not(.block-editor-inner-blocks) {
        flex-basis: 50% !important;
      }
    }
    @media (min-width: 1280px) {
      .has-columns.has-4-columns > *:not(.block-editor-inner-blocks) {
        flex-basis: 25% !important;
      }
    }
}

.wp-block[data-type="responsive-block-editor-addons/image-boxes-block-item"]
  .wp-block-responsive-block-editor-addons-image-boxes-block-item__descriptions {
  margin: 0 0 30px;
}
.wp-block-responsive-block-editor-addons-image-boxes-block-item
  .wp-block-responsive-block-editor-addons-image-boxes-block-item__descriptions {
  margin: 0 0 30px;
  max-width: none;
  padding: 0;
}
.wp-block-responsive-block-editor-addons-image-boxes-block-item {
  padding: 0;
  position: relative;
  width: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  form {
    display: flex;
    margin-top: 20px;
    border: thin solid;
    padding: 10px;
    flex-wrap: nowrap;
    z-index: 1;
    .components-base-control.block-editor-url-input {
      max-width: 80%;
    }
    svg.dashicon {
      margin: auto 0;
    }
  }
  @media (min-width: 600px) {
    margin-bottom: 0;
  }
  &__title {
    margin-top: 0;
    padding: 0;
  }
  &__imagebox-wrapper {
    display: flex;
    line-height: 1;
    position: relative;
  }
  &__descriptions {
    margin: 0 0 30px;
    max-width: none;
    padding: 0;
    ul,
    li {
      list-style: none;
      margin: 0;
      padding: 0;
    }
  }
  &__title {
    display: block;
    margin-bottom: 20px;
  }
  &__imagebox-wrapper {
    margin-bottom: 20px;
  }
  .wp-block-button {
    margin-bottom: 0;
  }
  & * {
    max-width: 100%;
  }
}
.has-text-align-center
  .wp-block-responsive-block-editor-addons-image-boxes-block-item__imagebox-wrapper {
  justify-content: center;
}
.has-text-align-right
  .wp-block-responsive-block-editor-addons-image-boxes-block-item__imagebox-wrapper {
  justify-content: flex-end;
}
.wp-block-responsive-block-editor-addons-image-boxes-block-item {
  transform: scale(1);
  transition: transform 0.3s;
}
[class*="responsive-block-editor-addons-change-image"] {
  width: 600px !important;
  margin: 0 auto;
  height: auto;
  max-width: 100%;
  position: relative;
  mask-mode: alpha;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  border-radius: none;
}
.responsive-block-editor-addons-add-image {
  width: auto;
  position: relative;
  &.components-button {
    cursor: copy !important;
  }
  .wp-block-responsive-block-editor-addons-image-boxes-block-item & {
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 0;
  }
}
.responsive-block-editor-addons-imagebox-image-wrap {
  position: absolute;
  transition: all 0.5s ease;
}
.responsive-block-editor-addons-remove-image {
  position: absolute;
  right: -10px;
  top: -10px;
}
.wp-block-responsive-block-editor-addons-image-boxes-block-item:hover {
  button[class^="components-button responsive-block-editor-addons-change-image"]:before,
  .responsive-block-editor-addons-imagebox-image-wrap.front:before {
    content: "";
    background-color: black;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 999;
    opacity: 0.2;
    transition: all 0.5s ease;
  }
  transform: scale(1);
}
.wp-block-responsive-block-editor-addons-image-boxes-block-item__title {
  padding: 0 20px;
  width: auto;
  z-index: 999;
}
.wp-block-responsive-block-editor-addons-image-boxes-block-item__description {
  padding: 0 20px;
  z-index: 999;
  transition: all 1s ease;
}
.imagebox-arrow {
  width: 100%;
  transition: all 1s ease;
  z-index: 999;
  .wp-block-responsive-block-editor-addons-image-boxes-block-item:hover & {
    display: block;
  }
}

.wp-block-responsive-block-editor-addons-image-boxes-block__inner a {
  width: 100%;
}

.rbea-select-control-grid5-container {
  > .rbea-tab-radio-control-wrapper {
    > .rbea-tab-radio-options {
      display: grid;
      grid-template-columns: repeat(6, 1fr); /* Creates 3 columns */
      
      /* Adjust grid item positioning */
      .rbea-tab-radio-option:first-child {
        border-radius: 6px 0 0 0;
        grid-column: span 2;
      }
      .rbea-tab-radio-option:nth-child(2),
      .rbea-tab-radio-option:nth-child(3) {
        grid-column: span 2;
      }

      .rbea-tab-radio-option:nth-child(4) {
        grid-column: span 3;
      }

      .rbea-tab-radio-option:last-child {
        border-radius: 0 0 6px 0;
        grid-column: span 3;
      }
    }
  }
}
