.sp-smart-post-spacing {
  &-part-2 {
    display: flex;
    label {
      font-size: 11px;
      display: inline-block;
      color: #8c8f94;
      margin-top: 4px;
    }
    input {
      width: 100%;
      padding: 0;
      text-align: center;
      border-radius: 0;
      border-right: 0;
      border-color: #ddd;
      &:focus:not(:disabled) {
        outline: none;
        box-shadow: none;
        border-color: #ddd;
      }
    }
  }
  &-all {
    width: 140px;
    height: 30px;
    button {
      width: 100%;
      height: 100%;
      padding: 0;
      border-radius: 0;
      justify-content: center;
      border: 1px solid #ddd;
      &.active {
        background-color: var(--sp-smart-primary-2-600);
        border-color: transparent;
      }
      &:focus:not(:disabled) {
        outline: none;
        box-shadow: none;
        border: 1px solid #ddd !important;
      }
    }
  }
  &-left.box input,
  &-right.box input {
    border-right: 1px solid #ddd;
    margin-right: 0;
  }
}
.sp-smart-post-tab-panel .sp-smart-post-component-mb {
  margin-bottom: 16px;
}
.sp-smart-post-tab-panel .sp-smart-post-component-mb:last-child {
  margin-bottom: 0px;
}

.sp-smart-post-spacing-part-2 {
  display: flex;
}
.sp-smart-post-spacing-part-2 label {
  font-size: 11px;
  display: inline-block;
  color: #8c8f94;
  margin-top: 4px;
}
.sp-smart-post-spacing-part-2 input {
  width: 100%;
  padding: 0;
  text-align: center;
  border-radius: 0;
  border-right: 0;
  border-color: #ddd;
}
.sp-smart-post-spacing-part-2 input:focus:not(:disabled) {
  outline: none;
  box-shadow: none;
  border-color: #ddd;
}
.sp-smart-post-spacing-all {
  width: 140px;
  height: 32px;
}
.sp-smart-post-spacing-all button {
  width: 100%;
  height: 100%;
  padding: 0;
  border-radius: 0;
  justify-content: center;
  border: 1px solid #ddd;
}
.sp-smart-post-spacing-all button:focus:not(:disabled) {
  outline: none;
  box-shadow: none;
}
.sp-smart-post-spacing-left.box input,
.sp-smart-post-spacing-right.box input {
  border-right: 1px solid #ddd;
  margin-right: 0;
}

.sp-smart-post-header-control-left,
.sp-smart-post-header-control-right {
  display: flex;
  align-items: center;
}

// .sp-smart-post-header-control-left label {
//   margin-top: 8px;
// }
// RS
.sp-smart-post-header-control-left {
  margin-top: 0;
}
.sp-smart-post-header-control {
  display: flex;
  justify-content: space-between;
}
.sp-smart-post-header-control-reset.components-button:hover svg {
  color: var( --sp-smart-primary-2-400 );
}

// select control and input control custom css
.location-weather-tab-panel {
  .components-checkbox-control {
    .components-base-control__field {
      width: 100%;
      display: flex;
      flex-direction: row-reverse;
      justify-content: space-between;
      label {
        font-size: 13px;
        font-weight: 400;
        text-transform: capitalize;
        font-family: Inter, sans-serif;
      }
      span {
        margin: 0;
      }
      span > input:checked {
        background-color: var( --sp-smart-primary-2-400 );
        border-color: var( --sp-smart-primary-2-400 );
      }
      span > input:focus {
        border-color: var( --sp-smart-primary-2-400 );
      }
    }
  }
  .components-input-control {
    .components-input-base {
      div > label {
        font-size: 13px;
        font-weight: 400 !important;
        text-transform: capitalize;
        font-family: Inter, sans-serif;
        color: #1e1e1e;
      }
      div > input::after {
        border-color: var( --sp-smart-primary-2-400 );
      }
    }
  }
}

.sp-smart-post-spacing:not(.border-radius) {
  .sp-smart-post-spacing-wrapper {
    position: relative;
    display: inline-block;
    .sp-smart-post-spacing-highlight {
      position: absolute;
      background-color: #333;
    }
  }
  .sp-smart-post-spacing-top {
    .sp-smart-post-spacing-highlight {      
      top: 0;
      left: 52%;
      width: 80%;
      height: 2px;
      transform: translateX(-50%);
    }
  }
  .sp-smart-post-spacing-right {
    .sp-smart-post-spacing-highlight {      
      top: 52%;
      right: 0px;
      width: 2px;
      height: 80%;
      transform: translateY(-50%);
    }
  }
  .sp-smart-post-spacing-bottom {
    .sp-smart-post-spacing-highlight {      
      bottom: 0;
      height: 2px;
      left: 52%;
      width: 80%;
      transform: translateX(-50%);
    }
  }
  .sp-smart-post-spacing-left {
    .sp-smart-post-spacing-highlight {
      top: 52%;
      height: 80%;
      left: 1px;
      width: 2px;
      transform: translateY(-50%);
    }
  }
}
.sp-smart-post-spacing {
  &.border-radius {
    .sp-smart-post-spacing-wrapper {
      position: relative;
      display: inline-block;
      .sp-smart-post-spacing-highlight {
        position: absolute;
        width: 8px;
        height: 8px;
        background-color: transparent;
        border-color: #333;
        border-style: solid;
      }
    }
    .sp-smart-post-spacing-top {
      .sp-smart-post-spacing-highlight {      
        top: 0px;
        left: 0px;
        border-width: 2px 0 0 2px;
      }
    }
    .sp-smart-post-spacing-right {
      .sp-smart-post-spacing-highlight {      
        right: 0px;
        top: 0px;
        border-width: 2px 2px 0 0;
      }
    }
    .sp-smart-post-spacing-bottom {
      .sp-smart-post-spacing-highlight {
        border-width: 0 2px 2px 0;
        bottom: 0px;
        right: 0px;
        left: unset;
      }
    }
    .sp-smart-post-spacing-left {
      .sp-smart-post-spacing-highlight {      
        border-width: 0 0 2px 2px;
        bottom: 0px;
        left: 2px;
        right: 2px;
      }
    }
  }
}

.sp-smart-post-spacing {
  .sp-smart-post-spacing-wrapper {
    input[type=number] {
      min-height: 32px !important;
      height: 32px !important;
      font-size: 14px !important;
      line-height: 1.5rem;
      border-right: 1px solid #ddd;
    }
  }
}
.sp-smart-post-spacing-range-control.sp-smart-post-range-control {
    display: flex;
    flex-direction: column;
    gap: 8px;

    .sp-smart-range-control-ranger-row {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 16px;

        .sp-smart-range-control {
            display: flex;
            align-items: center;
        }

        .sp-ranger {
            display: block;
            flex-grow: 1;
        }
        .sp-preset-btn {
            width: 24px;
        }
        .components-range-control__wrapper {
            margin-bottom: 0;
        }
        .components-input-control .components-input-control__container {
            width: 54px;
        }
        .components-input-base {
          min-height: 30px;
          max-height: 30px;
        }
        .components-input-base input {
          min-height: 30px;
          max-height: 30px;
        }
    }
    // Side Link Icon
    .sp-link-side-icon {
        width: 20px;
        height: 20px;
        border: 1px solid #8c8f94;
        background-color: #ffffff;
        display: flex ;
        justify-content: center;
        align-items: center;
        padding: 4px 3px;
        border-radius: 2px;
        box-sizing: border-box;
        cursor: pointer;
    }
    .sp-link-btn {
        .sp-link-side-icon {
            margin-right: 4px;
        }
        &.active {
            .sp-link-side-icon {
                background-color: var(--sp-smart-primary-2-400);
            }
            svg path,
            svg rect {
                fill: #FFFFFF;
            }
        }
    }
  .components-range-control__wrapper {
    .components-range-control__thumb-wrapper {
      z-index: 1 !important;
    }
    .components-range-control__track {
      background-color: var(--sp-smart-primary-2-400);
    }
  }
}
.sp-smart-range-control.sp-preset-btn {
  color: var(--sp-smart-primary-2-600);
}