@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&family=Roboto:wght@100;300;400;500;700;900&display=swap');
$border-color: #D6D9DD;
.components-panel[data-rbea-tab]{
  &:not([data-rbea-tab='advance']) .components-panel__body.block-editor-block-inspector__advanced,
  &:not([data-rbea-tab='advance']) .components-panel__body.editor-block-inspector__advanced.block-editor-block-inspector__advanced{
    display: none;
  }
  .block-editor-block-card{
    padding-bottom: 25px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    &::before{
      content: '';
      position: absolute;
      top: 0;
      left: -16px;
      right: -16px;
      bottom: 0px;
      background: #fafafc;
      z-index: -1;
    }
  }
  .components-panel__body.edit-post-settings-sidebar__panel-block .block-editor-block-card{
    overflow: unset;
    &::before{
      top: -16px;
    }
  }

  .rbea-inspector-control-label {
    font-family: "Roboto", sans-serif;
    color: #50575e;
    font-weight: 600;
  }

}

.rbea-inspector-tabs{
  display: flex;
  position: relative;
  background: #fafafc;
  z-index: 9;
  &::after{
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    top: 50%;
    right: 0;
    z-index: 0;
    background: #ffffff;
    pointer-events: none;
  }
  button{
    flex-grow: 1;
    flex-basis: 0;
    display: inline-flex;
    flex-direction: column;
    height: 65px;
    align-items: center;
    justify-content: center;
    border: none;
    position: relative;
    border-radius: 10px;
    background: #fafafc;
    cursor: pointer;
    &::after,
    &::before{
      z-index: 1;
      content: '';
      position: absolute;
      top: 0;
      left: -.5px;
      right: -.5px;
      bottom: 50%;
      border: 1px solid transparent;
      border-bottom: none;
      border-top-left-radius: 10px;
      border-top-right-radius: 10px;
      pointer-events: none;
    }
    &::after{
      top: 50%;
      bottom: 0;
      border-color: $border-color;
      border-bottom: 1px solid $border-color;
      border-top: none;
      border-radius: 0 0 10px 10px;
    }
    &:not(.rbea-active)::after{
      background: #fafafc;
    }
    &.rbea-active{
      background: #fff;
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
      &::before{
        border-color: $border-color;
      }
      &::after{
        border-color: transparent;
      }
      + button{
        border-bottom-right-radius: 0;
        border-bottom-left-radius: 10px;
        &::after{
          border-bottom-right-radius: 0;
          border-right-color: transparent;
        }
        + button{
           border-bottom-left-radius: 0;
           &::after{
             border-bottom-left-radius: 0;
             border-left-color: transparent;
           }
         }
      }
    }
    &:first-child{
      border-bottom-left-radius: 0;
      &::after{
        border-bottom-left-radius: 0;
        border-left-color: transparent;
      }
      &.rbea-active::after{
        border-left-color: $border-color;
      }
      &::before,
      &::after{
        left: -1px;
      }
    }
    &:last-child{
      border-bottom-right-radius: 0;
      &::after{
        border-bottom-right-radius: 0;
        border-right-color: transparent;
      }
      &.rbea-active::after{
        border-right-color: $border-color;
      }
      &::before,
      &::after{
        right: 0;
      }
    }
    &:focus{
      outline: none;
    }
    h5{
      margin: 6px 0 0;
      font-size: 13px;
      font-weight: 400;
      line-height: 1.2;
    }
    h5,
    svg{
      z-index: 2;
    }
    &.rbea-active h5{
      font-family: Roboto;
      font-size: 13px;
      font-weight: 400;
      line-height: 16.41px;
      text-align: center;
      color: #007CBA;
    }
    &:focus path,
    &.rbea-active path{
      fill: #2184F9;
    }
  }

  &.advance.rbea-inspector-tabs-count-3{
    button:first-child{
      border-bottom-right-radius: 0;
      &::after{
        border-bottom-right-radius: 0;
        border-right-color: transparent;
      }
      + button{
        border-bottom-left-radius: 0;
        &::after{
          border-bottom-left-radius: 0;
          border-left-color: transparent;
        }
      }
    }
  }

}

.components-panel .components-panel__body .rbea-inspector-tabs-container{
  position: static !important;
  margin-left: -16px;
  margin-right: -16px;
  border-top: 0 !important;
  top: 0 !important;
}

.rbea-inspector-tabs-container{
  position: sticky;
  top: -3px;
  z-index: 9;
  border-top: calc(0.1em + 1px) solid #fafafc;
  &.rbea-is-sticky{
    .rbea-inspector-tabs{
      &::before,
      &::after{
        display: none;
      }
      border-bottom: 1px solid #e2e4e7;
      button{
        border-radius: 0;
        &::before{
          display: none;
        }
        &::after{
          border-radius: 0;
          background: #2184F9;
          height: 3px;
          top: auto;
          bottom: -1px;
          opacity: 0;
        }
        &.rbea-active::after{
          opacity: 1;
        }
      }
    }
  }
}

.rbea-inspector-tab .components-panel__body:first-child,
.edit-post-settings-sidebar__panel-block .rbea-inspector-tab .components-panel__body:first-child{
  margin-top: 0;
  border-top: none !important;
}

.rbea-inspector-tab , .block-editor-block-inspector__advanced{
  .components-panel__body-title {
    .components-button{
      padding: 16px;      
    }
  }

  .components-panel__body.is-opened{
    .components-panel__body-title{
      margin: -16px;
      margin-bottom: 0px;
    }
  }

  .components-panel__body-toggle.components-button:focus {
    box-shadow: none;
  }

  .components-panel__body-toggle.components-button {
    font-family: Roboto;
    font-size: 13px;
    font-weight: 500;
    line-height: 16.41px;
    text-align: left;
    color: #000
  }

  .components-base-control {
    margin-top: 4px;
    margin-bottom: 24px;
  }
  .responsive-size-type-field-tabs {
    margin-top: 0px;
  }

  .components-panel__arrow {
    color: #222222;
  }

}

.rbea-inspector-tabs>button::after , .rbea-inspector-tabs>button::before  {
  border-radius: 0px;
  border: none;

}


.rbea-inspector-tabs button.rbea-active::after {
  border-bottom: 1px solid #007CBA;
}

.rbea-inspector-tabs button.rbea-active::after , .rbea-inspector-tabs button.rbea-active::before {
  background: #F1FAFF;
}

.rbea-inspector-tabs button.rbea-active img {
  z-index: 10;
}

.rbea-inspector-tabs-container {
  .rbea-inspector-tab-title {
    font-family: Roboto;
    font-size: 13px;
    font-weight: 400;
    line-height: 16.41px;
    text-align: center;
    color: #666666;
  }


}

.rbea-inspector-tab {
  .components-panel__body.is-opened > .components-panel__body-title{
    margin-bottom: 16px;
  }

  .rbea-repeater-panel{
    padding-top:20px;
  }

  .rbea-repeater-panel.is-opened {
    padding-left : 0px ;
    padding-right: 0px;
  }

  .responsive-block-editor-addons-typography-settings .responsive-block-editor-addons-typography-settings {
    .components-panel__body.is-opened{
      padding-left: 16px;
      padding-right: 16px;
    } 
  }

  .components-panel__body.is-opened {

    .components-panel__body{
      padding-top: 20px;
    }

    .components-panel__body.is-opened {
      padding-left: 0px;
      padding-right: 0px;
    }
    
  }

  button.rbea-flip-box-tab.components-tab-panel__tabs-item{
    justify-content: center;
  }
  
}