@import "../../../assets/sass/config";
@import "../../../assets/sass/mixins";
@import "../../../assets/sass/direction";

/**
 *   Customizer Control
 *      1. Base Style
 *      2. Section / Panel Icon
 *      3. New Customizer Panel Style
 *      4. Customize Navigator
 *      5. Radio image controls
 *      6. Customizer Alert Style
 *      7. Compatibility with wp 5.8
 *      8. Woo Label
 *      9. Advanced Style
 *     10. Custom Style for Controls
 *     11. Customizer Search Compatibility
 *     12. Responsive Control
 */

// 1. Base Style
a:focus {
  box-shadow: none;
  outline: none;
}

form#customize-controls {
  z-index: 1000;
}

#customize-theme-controls .description {
  font-style: normal;
}

.customize-control-title {
  margin-bottom: 10px;
  font-weight: 400;
  line-height: 1.4em;

  .focused[tabindex] &,
  &.focused {
    border: 1px solid rgb(0, 115, 170);
    border-radius: 3px;
    box-shadow: rgb(0, 115, 170) 0 0 0 1px;
  }
}

.options-custom-title {
  margin-top: 5px;
}

#customize-controls .options-custom-title {
  font-size: 14px;
  text-transform: capitalize;
  font-weight: 600;
  margin-left: -1em;
  margin-right: -1em;
  margin-bottom: 0;
  padding: 10px 20px;
  background-color: #007cba;
  color: #fff;
  cursor: auto;
}

.option-feature-description img {
  width: 315px;
  max-width: 100%;
  display: block;
  margin: 0 auto;
  border: 1px solid #e1e1e1;
  cursor: default;
}

#customize-controls .option-feature-title {
  background: #323334;
}

#customize-controls input[type="file"] {
  width: 100%;
}

.control-section .customize-control .buttonset input {
  +label.switch-label {
    margin-#{$left}: -1px;
    color: #555d66;
  }

  &:checked+label.switch-label {
    background: #87919f;
    color: #fff;
    box-shadow: none;
  }
}

#customize-control-gutter .wrapper .control {
  flex-wrap: nowrap;

  >div {
    margin: 0 5px;
  }
}

.customize-control .background-wrapper {
  margin: 10px 0;
  padding: 20px;
  border: 1px solid #ccc;

  .background-color {
    margin-top: -20px;
  }
}

.customize-control .kirki-sortable .ui-sortable {
  li {
    margin-bottom: 8px;
    padding: 5px 12px;
    background: #007cba;
    color: #fff;
    letter-spacing: 0.025em;
    font-weight: 500;
    border-radius: 16px;
    border-color: transparent;
    background: #87919f;
    transition: background 0.2s;

    &.invisible {
      background-color: #fff;
    }
  }
}

.customize-control-kirki-responsive.customize-control-kirki-responsive,
.customize-control-kirki-responsive .customize-control-title {
  margin-bottom: 0 !important;
}

.customize-control-kirki-responsive .customize-control-title {
  flex-wrap: wrap;
}

.kirki-responsive.kirki-responsive {
  .kirki-device-buttons {
    margin-left: 0;
    margin-#{$left}: 12px;
    top: 0;
    flex-flow: row-reverse;
  }
}

.kirki-device-button-tablet_extra i {
  transform: rotate(-90deg);
}

.customize-control-kirki-number .customize-control-content .quantity {
  line-height: 30px;
  min-width: 3rem;
  max-width: 3rem;
}

.customize-control .buttonset .switch-label {
  flex: 1;
  border-style: solid;
}

.customize-control-kirki-radio-buttonset .buttonset .switch-label {
  border-color: #ccc;
  background-image: -webkit-linear-gradient(top, #f8f8f8, #f5f5f5);
}

.customize-control-kirki-radio-buttonset .buttonset .switch-input:checked+.switch-label {
  border-color: transparent;
  background-image: -webkit-linear-gradient(top, #008bce, #0073aa);
  box-shadow: inset 0 1px 0 #00a7f7, 0 1px 0 rgba(0, 0, 0, 0.15);
}

#customize-control-woocommerce_catalog_columns,
#customize-control-menu_labels {
  display: none !important;
}

.btn {
  margin-#{$left}: 10px;
  padding: 6px 20px;
  background-color: #007cba;
  color: #fff;
  border: none;
  border-radius: var(--alpha-corner-sm);
  transition: background 0.3s;
  cursor: pointer;
  line-height: normal;

  &:hover {
    background-color: #016087;
  }
}

#customize-control-cs_new_menu_label,
#customize-control-cs_menu_labels {

  .menu-label>label,
  .label-list>label {
    display: block;
    font-size: 14px;
    line-height: 1.75;
    margin-bottom: 4px;
  }

  .menu-label {
    display: flex;
    flex-direction: column;
  }

  .label-list,
  .label-text {
    margin-bottom: 10px;
  }

  .label-actions {
    display: flex;
    justify-content: flex-end;

    button:not(:last-child) {
      margin-#{$right}: 0.5rem;
    }
  }

  .error-msg {
    display: none;
    font-weight: 400;
    margin-top: 5px;
    color: #e43f3f;
  }
}

input.screen-reader-text {
  display: none;
}

.wp-picker-container .wp-color-result.button {
  padding: side-values(0 0 0 30px);
}

.customize-control-code_editor .CodeMirror {
  height: 600px;
}

.customize-control-kirki-color .wp-picker-container {
  display: block;
}

#accordion-section-mobile_bar,
#accordion-section-woo_compare,
#accordion-section-wc_single_product {
  margin-bottom: 2rem;
}

.customize-control-kirki-multicheck {
  .customize-control-title {
    display: inline-block;
    margin-#{$left}: 10px;
    padding: 0 3px;
    background: #eee;
  }

  >ul {
    margin-top: -16px;
    padding: 15px 10px 10px;
    border: 1px solid #ccc;
  }
}

.text-primary {
  color: #007cba;
}

#accordion-section-static_front_page,
#accordion-section-colors,
#accordion-section-header_image,
#accordion-section-background_image {
  display: none !important;
}

// 2. Section / Panel Styling
#customize-theme-controls>.customize-pane-parent li:not(:first-child) .accordion-trigger:before {
  content: "";
  display: inline-block;
  vertical-align: -6px;
  width: 20px;
  height: 20px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.7;
  margin-#{$right}: 0.5rem;
}

#accordion-panel-general>h3>.accordion-trigger:before {
  background-image: url(../../../assets/images/admin/customizer/option_general.svg);
}

#accordion-section-blog>h3>.accordion-trigger:before {
  background-image: url(../../../assets/images/admin/customizer/option_blog.svg);
}

#accordion-panel-style>h3>.accordion-trigger:before {
  background-image: url(../../../assets/images/admin/customizer/option_visual.svg);
}

#accordion-panel-shop>h3>.accordion-trigger:before {
  background-image: url(../../../assets/images/admin/customizer/option_shop.svg);
}

#accordion-panel-product>h3>.accordion-trigger:before {
  background-image: url(../../../assets/images/admin/customizer/option_product.svg);
}

#accordion-panel-vendor>h3>.accordion-trigger:before,
#accordion-panel-dokan>h3>.accordion-trigger:before {
  background-image: url(../../../assets/images/admin/customizer/option_store.svg);
}

#accordion-panel-nav_menus>h3>.accordion-trigger:before {
  background-image: url(../../../assets/images/admin/customizer/option_menus.svg);
}

#accordion-section-header_footer>h3>.accordion-trigger:before {
  background-image: url(../../../assets/images/admin/customizer/option_header.svg);
}

#accordion-panel-woocommerce>h3>.accordion-trigger:before {
  background-image: url(../../../assets/images/admin/customizer/option_plugins.svg);
}

#accordion-panel-features>h3>.accordion-trigger:before {
  background-image: url(../../../assets/images/admin/customizer/option_feature.svg);
}

#accordion-panel-advanced>h3>.accordion-trigger:before {
  background-image: url(../../../assets/images/admin/customizer/option_advance.svg);
}

#accordion-panel-layouts>h3>.accordion-trigger:before {
  background-image: url(../../../assets/images/admin/customizer/option_content.svg);
}

#accordion-section-custom_css_js>h3>.accordion-trigger:before {
  background-image: url(../../../assets/images/admin/customizer/option_css.svg);
}

#accordion-section-title_tagline>h3>.accordion-trigger:before {
  background-image: url(../../../assets/images/admin/customizer/option_site.svg);
}

#accordion-panel-widgets>h3>.accordion-trigger:before {
  background-image: url(../../../assets/images/admin/customizer/option_widgets.svg);
}

// #accordion-section-static_front_page>h3>.accordion-trigger:before {
//   background-image: url(../../../assets/images/admin/customizer/option_home.svg);
// }

// #accordion-section-colors>h3>.accordion-trigger:before {
//   background-image: url(../../../assets/images/admin/customizer/option_color.svg);
// }

// #accordion-section-header_image>h3>.accordion-trigger:before,
// #accordion-section-background_image>h3>.accordion-trigger:before {
//   background-image: url(../../../assets/images/admin/customizer/option_image.svg);
// }

#accordion-section-ai_generator>h3>.accordion-trigger:before {
  background-image: url(../../../assets/images/admin/customizer/option_ai.svg);
}

#input_cart_icon_type img {
  width: 67px;
}

#customize-theme-controls .customize-pane-child#sub-accordion-section-title_tagline {
  display: flex;
  flex-flow: column;

  #customize-control-cs_title_logo {
    order: 1;
  }

  #customize-control-custom_logo,
  #customize-control-sticky_logo,
  #customize-control-mobile_logo {
    order: 2;
  }

  #customize-control-cs_title_tagline {
    order: 3;
  }

  #customize-control-blogname,
  #customize-control-blogdescription,
  #customize-control-display_header_text {
    order: 4;
  }

  #customize-control-cs_title_favicon {
    order: 5;
  }

  #customize-control-site_icon {
    order: 6;
  }
}

// 3. New Customizer Panel Style
#customize-controls {
  font-family: var(--alpha-body-font-family);
}

.kirki-tooltip-wrapper.kirki-tooltip-wrapper {

  .tooltip-trigger {
    top: -1px;
    left: auto;
    #{$left}: 3px;

    &:hover {
      cursor: pointer
    }
  }

  .tooltip-content {
    display: none;
    position: relative;
    background: transparent;
    visibility: visible;
    opacity: 1;
    color: #8a8a8a;
    bottom: auto;
    padding: 10px 0 5px;

    &::selection {
      background: transparent;
    }

    &.show {
      display: block;
    }
  }

  .tooltip-trigger:hover+.tooltip-content {
    bottom: auto;
  }
}

.doc-trigger {
  display: inline-block;
  font-size: .9em;

  a {
    color: #50575e;
  }

  &:last-child {
    margin-#{$left}: 7px;
  }

  &:not(:last-child) {
    transform: translateX(if-ltr(26px, -26px));
  }

  &+.tooltip-trigger {
    margin-#{$left}: -10px;
  }

  .options-custom-title & {
    a {
      color: #fff;
    }

    float: $right;
  }
}

.wp-full-overlay-sidebar {
  width: 18%;
}

@media (min-width: 1667px) {
  .wp-full-overlay.expanded {
    margin-#{$left}: 18%;
  }
}

.expanded .wp-full-overlay-footer,
.wp-full-overlay-footer .devices,
.wp-full-overlay-sidebar {
  border-color: #e7e7e7;
  background: #f4f4f4;
}

.expanded .wp-full-overlay-footer.wp-full-overlay-footer {
  max-width: none;
}

.CodeMirror-vscrollbar::-webkit-scrollbar,
#customize-controls .wp-full-overlay-sidebar-content::-webkit-scrollbar,
.sortable::-webkit-scrollbar,
.customize-pane-child::-webkit-scrollbar {
  width: 5px;
}

.CodeMirror-vscrollbar::-webkit-scrollbar-thumb,
#customize-controls .wp-full-overlay-sidebar-content::-webkit-scrollbar-thumb,
.sortable::-webkit-scrollbar-thumb,
.customize-pane-child::-webkit-scrollbar-thumb {
  border-radius: 0;
  background: rgba(204, 204, 204, 0.5);
}

#customize-controls .customize-info {
  margin-bottom: 0;
}

.woocommerce-cropping-control {
  margin: side-values(0 40px 1em 0);

  input[type="radio"] {
    margin-top: 0;
  }
}

.wp-full-overlay-footer .devices {
  box-shadow: none;

  button {

    &:focus,
    &.active:hover {
      border-bottom-color: var(--alpha-primary-color);
    }

    &:hover:before,
    &:focus:before {
      color: var(--alpha-primary-color);
    }
  }
}

#customize-theme-controls .customize-pane-child.accordion-section-content,
#customize-theme-controls .customize-pane-child.accordion-sub-container {
  overflow: hidden;
}

.wp-core-ui .button-primary.focus,
.wp-core-ui .button-primary:focus {
  box-shadow: none;
}

#available-menu-items .new-content-item .add-content:before,
.add-new-menu-item:before,
.add-new-widget:before {
  top: 1px;
  transition: none;
}

#customize-controls h3 {
  font-size: 13px;
}

#customize-controls .button {
  border-color: #ccc;
  color: #222529;
  background: 0 0;
  font-weight: 400;
}

#customize-controls .button-primary {
  background: #007cba;
  border-color: #007cba;
  color: #fff;
}

#accordion-section-publish_settings+.control-section {
  border-top: 1px solid #ddd;
}

#customize-outer-theme-controls .accordion-section-title:after,
#customize-theme-controls .accordion-section-title:after {
  font-size: 18px;
  line-height: 20px;
  color: #666;
  #{$right}: 1rem;
}

@media (min-width: 1200px) {

  .control-section .accordion-section-title,
  .customize-pane-child .accordion-section-title {
    padding-#{$left}: 20px;
  }
}

#customize-controls .description {
  font-size: 11.5px;
  color: #8a8a8a;
}

.customize-control input[type="email"],
.customize-control input[type="number"],
.customize-control input[type="password"],
.customize-control input[type="search"],
.customize-control input[type="tel"],
.customize-control input[type="text"],
.customize-control input[type="url"],
.select2-container .select2-selection--single,
.customize-control select {
  border-color: #ccc;
  height: 32px;
  padding: 0 16px;
}

.kirki-react-select__control {
  .css-1wy0on6 {
    height: auto !important;
  }
}

.customize-control-kirki-slider {
  .wrapper {
    padding-top: 0;
  }

  .wrapper input[type="text"] {
    width: 30px;
    text-align: center;
  }

  .wrapper .value {
    border: 1px solid #ccc;
    height: 36px;
    padding: side-values(0 0.5rem 0 0.2rem);
    border-radius: var(--alpha-corner-sm);
    margin: side-values(0 2% 0 5%);
  }

  .value input {
    height: 36px;
  }

  .wrapper .slider-reset {
    position: static;
    width: auto;
    height: auto;
    order: 13;
    font-size: 15px;

    &:hover {
      transform: none;
    }
  }

  .kirki-control-left-col {
    padding-right: 0;
    padding-#{$right}: 13px;
  }

  .kirki-control-right-col {
    text-align: $right;
  }

  .kirki-control-reset {
    right: auto;
    #{$right}: 0;
  }
}

.customize-control-kirki-react-colorful {
  .customize-control-title {
    margin-bottom: 0;
  }

  .kirki-control-cols {
    align-items: center;
  }

  .kirki-control-left-col {
    padding-right: 0;
    padding-#{$right}: 30px;
  }

  .kirki-trigger-circle-wrapper {
    top: 0;
  }

  .kirki-control-reset {
    top: 8px;
    left: auto;
    right: auto;
    #{$right}: 35px;
  }

  &[data-kirki-parent-control-type=kirki-typography] .kirki-control-reset {
    left: auto;
    right: auto;
    #{$left}: 35px;
  }

  .colorPickerContainer {
    display: none;
    position: relative;
    margin-top: 10px;
    top: 0;

    &.is-open {
      display: block;
      top: auto;
    }
  }
}

.customize-control-kirki-toggle {

  .kirki-control-label {
    margin-top: 2px;
  }

  .switch,
  .kirki-toggle .kirki-toggle-switch-label {
    border: 1px solid #dfdfdf;
    background: #c9d1d7;
    border-radius: 20px;
    top: 0;
    height: 26px;
    position: relative;
    width: 48px;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    box-sizing: content-box;

    &:before,
    &:after {
      width: 24px;
      height: 24px;
    }

    &:after {
      box-sizing: content-box;
      #{$left}: 1px;
      background-color: #fff;
    }

    &:before {
      content: none;
    }
  }

  input:checked+.switch,
  input:checked+.kirki-toggle-switch-label {
    background-color: #8791a0;

    &:after {
      #{$left}: -4px;
      background-color: #fff;
      transform: translate3d(if-ltr(100%, -100%), -50%, 0);
    }

    &:active:before {
      transform: none;
    }
  }

  .customize-control-title {
    margin-bottom: 0;
  }

  span.customize-control-title {
    width: calc(100% - 60px);
  }

  .tooltip-wrapper {
    margin-top: 4px;
  }

  .kirki-toggle .kirki-control-form {
    text-align: $right;
  }
}

.customize-control-repeater .repeater-row-header .dashicons {
  right: auto;
  #{$right}: 12px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 28px;
}

.select2-container .select2-selection--single {
  border-radius: var(--alpha-corner-sm);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 30px;
}

.select2-container .select2-selection--single {
  padding: 0 8px;
}

#customize-theme-controls .control-panel-nav_menus .control-section-nav_menu {
  border: none;
}

#accordion-section-mobile_bar+.accordion-section>h3:first-child,
#accordion-section-mobile_bar+.accordion-section>[hidden]+h3,
// #accordion-section-header_logo>h3,
#accordion-section-menu_locations>h3,
#accordion-section-woocommerce_store_notice>h3,
#accordion-section-colors>h3 {
  border-top: 1px solid #ddd;
}

// 4. Customize Navigator
@keyframes navCircleAnimate {
  0% {
    transform: scale(1, 1);
    opacity: 1;
  }

  30% {
    transform: scale(1.3, 1.3);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.6, 1.6);
    opacity: 0.7;
  }

  75% {
    transform: scale(1.9, 1.9);
    opacity: 0.5;
  }

  100% {
    transform: scale(2.2, 2.2);
    opacity: 0;
  }
}

.customizer-nav {
  position: fixed;
  #{$right}: -999px;
  top: 30px;
  width: 250px;
  background-color: #323334;
  box-shadow: 0 10px 10px rgba(34, 34, 34, 0.3);
  z-index: 600000;
  transition: 0.3s;

  .modal-open & {
    opacity: 0;
    visibility: hidden;
  }

  h3 {
    display: flex;
    position: relative;
    align-items: center;
    padding: 20px 25px 20px;
    font-size: 15px;
    background-color: #323334;
    color: #fff;
    margin: 0;

    .navigator-toggle {
      display: inline-block;
      position: fixed;
      #{$right}: 37px;
      width: 20px;
      height: 20px;
      text-align: center;
      color: #fff;
      background-color: var(--alpha-primary-color);
      border: 2px solid var(--alpha-primary-color);
      border-radius: 50%;

      i {
        margin-top: 2px;
        transition: transform 0.3s;
      }

      i:before {
        font-size: 12px;
        line-height: 16px;
        content: if-ltr("\f053", "\f054");
        margin: side-values(1px 0 0 -1px);
      }

      &:after {
        content: "";
        position: absolute;
        #{$left}: 0;
        top: 0;
        border: 1px solid var(--alpha-primary-color);
        width: 100%;
        height: 100%;
        border-radius: 50%;
        animation: navCircleAnimate 2s infinite linear 0s;
        box-sizing: border-box;
      }
    }

    &:before {
      content: "";
      position: absolute;
      bottom: 0;
      left: 25px;
      right: 25px;
      height: 1px;
      background-color: rgba(255, 255, 255, 0.15);
    }
  }

  .customizer-nav-content {
    padding: side-values(20px 20px 20px 25px);
    height: 250px;
    max-height: 350px;
    background-color: rgba(49, 52, 56, 0.6);
    overflow-y: scroll;

    &::-webkit-scrollbar {
      height: 10px;
      width: 5px;
    }

    &::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.1);
    }

    &::-webkit-scrollbar-track {
      margin: 5px;
      width: 100%;
    }
  }

  ul {
    margin: 0;

    li {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      margin-bottom: 11px;

      &:last-child {
        margin-bottom: 0;
      }
    }
  }

  .customizer-nav-remove {
    visibility: hidden;
    opacity: 0;
    margin-#{$left}: 10px;
    font-size: 13px;
    transition: 0.3s;
  }

  li:hover .customizer-nav-remove {
    visibility: visible;
    opacity: 1;
  }

  .customizer-nav-item,
  .customizer-nav-remove {
    color: rgba(255, 255, 255, 0.6);

    &:hover {
      color: #fff;
    }
  }

  .customizer-nav-item {
    display: flex;
    word-break: break-all;
    overflow: hidden;
    position: relative;
    font-size: 13px;
    text-decoration: none;
    transition: 0.3s;
  }

  &.active {
    #{$right}: 20px;

    .navigator-toggle {
      background-color: transparent;
      border: 2px solid transparent;

      i {
        transform: rotateY(180deg);
      }

      &:after {
        content: none;
      }
    }
  }

  &:hover {
    box-shadow: 0 10px 10px rgba(34, 34, 34, 0.4);
  }
}

.customize-control-kirki-custom .tooltip-wrapper {
  color: #fff;
  margin-top: 9px;
}

@keyframes rotateAnimate {
  0% {
    transform: rotateY(0);
  }

  100% {
    transform: rotateY(360deg);
  }
}

.section-nav-status {
  position: absolute;
  top: 39px;
  #{$right}: 15px;
  background-color: #fff;
  font-size: 20px;
  line-height: 1;
  color: #87919f;
  transition: color 0.3s;

  i {
    animation: rotateAnimate 3s infinite linear 0s;
  }

  &:hover i {
    font-weight: 900;
  }

  &:hover,
  &:focus {
    color: #87919f;
  }

  &.active i {
    font-weight: 900;
  }

  &.disabled {
    opacity: 0.8;
    pointer-events: none;
  }
}

.customize-control .thumbnail-image {
  border: 1px solid #ccc;
}

// 5. Radio image controls
#customize-control-post_type .image label {
  max-width: 100%;
  transition: border 0.3s;
}

.customize-control-kirki-radio-image .image {
  margin-#{$left}: -5px;
  margin-#{$right}: -5px;

  label {
    max-width: 50%;
    opacity: 1;
    margin: 5px;
  }

  img {
    padding: 10px;
    background-color: #fff;
  }

  input:checked+label {
    opacity: 1;
    border: 1px solid transparent;
    border-color: var(--alpha-primary-color);

    img {
      box-shadow: none;
      border: none;
    }
  }

  &#input_post_type,
  &#input_posts_layout {
    img {
      width: auto;
    }
  }

  .post_type {
    max-width: 33%;
  }

  .post_typemask {
    max-width: 59%;
  }

  .posts_layoutgrid,
  .posts_layoutmasonry {
    max-width: 46%;
  }
}

.customize-control-kirki-radio-image label.site_typefull,
.customize-control-kirki-radio-image label.site_typeboxed,
.customize-control-kirki-radio-image label.site_typeframed {
  img {
    padding: 0;
  }
}

#input_quickview_type.image label {
  max-width: 43%;
}

#customize-control-posts_load .image img,
#customize-control-products_load .image img,
#customize-control-vendor_products_load .image img {
  width: 100%;
}

#customize-control-posts_load .image label,
#customize-control-products_load .image label,
#customize-control-vendor_products_load .image label {
  display: inline-flex;
  max-width: 100px;
  background: #fff;
}

#customize-control-posts_load label.posts_loadscroll,
#customize-control-products_load label.products_loadscroll,
#customize-control-vendor_products_load label.vendor_products_loadscroll {
  max-width: 50px;
}

#customize-footer-actions .devices {
  display: flex;

  button {
    margin: 0;
  }
}

.wp-full-overlay-sidebar-content .image img {
  width: 70px;
}

#customize-controls .customize-info .panel-title,
#customize-controls .customize-pane-child .customize-section-title h3 {
  font-weight: 300;
}

#customize-control-product_type {
  .image label {

    img {
      width: 100%;
    }
  }
}

#customize-control-category_type {
  .image label {
    max-width: 100%;

    img {
      width: 100%;
    }
  }
}

.customizer-radio-image-preview {
  position: fixed;
  z-index: 500001;
  padding: 10px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, .12);
  background-color: #fff;
  min-width: 500px;
  max-width: 800px;
  max-height: calc(100% - 60px);

  &:before {
    position: absolute;
    content: '';
    width: 10px;
    height: 16px;
    border-#{$right}: 10px solid #fff;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    #{$left}: -10px;
    top: 50%;
    margin-top: -8px;
    box-sizing: border-box;
  }

  &:after {
    content: '';
    position: absolute;
    #{$right}: 100%;
    top: 0;
    width: 25px;
    height: 100%;
  }

  img {
    width: 100%;
  }
}

.customizer-panel-milestone {

  .customizer-milestone-contents {
    max-height: calc(100vh - 60px);
    overflow: auto;

    &::-webkit-scrollbar {
      width: 5px;
    }

    &::-webkit-scrollbar-thumb {
      border-radius: 0;
      background: rgba(204, 204, 204, 0.5);
    }
  }

  .preview-row {
    display: flex;
    align-items: center;
  }

  .preview-column {
    flex: 1;
  }

  .customizer-milestone-contents>.preview-row>.title {
    flex: 0.8;
    text-align: center;
  }

  .customizer-milestone-contents>.preview-row>.content {
    flex: 2.2;
  }

  .content .preview-row {
    padding: side-values(10px 0 10px 50px);
    border-#{$left}: 1px solid #ccc;
    border-bottom: 1px solid #ccc;

    &:last-child {
      border-bottom: none;
    }
  }

  span,
  a {
    display: inline-block;
    margin: side-values(5px 5px 5px 0);
    padding: 5px 20px;
    border: 1px solid #999;
    color: #777;
    border-radius: 2px;
    text-decoration: none;
    transition: .3s;
  }

  span {
    color: #fff;
    background-color: var(--alpha-primary-color);
    border-color: var(--alpha-primary-color);

    &:hover {
      cursor: pointer;
    }
  }

  a.active,
  a:hover {
    color: #fff;
    background-color: var(--alpha-primary-color);
    border-color: var(--alpha-primary-color);
  }
}

.customize-control .button-xlarge {
  margin-top: 10px;
  padding: 5px 16px;
  transition: background-color 0.3s;

  &:not(:last-child) {
    margin-#{$right}: 5px;
  }
}

#customize-controls .button.button-xlarge {
  line-height: 2;
}

// 6. Customizer Alert Style
#customize-control-cs_blog_page_alert,
#customize-control-cs_post_type_alert,
#customize-control-cs_shop_page_alert,
#customize-control-cs_import_option,
#customize-control-cs_export_option,
#customize-control-cs_member_related_title {
  margin-bottom: 10px;
}

#customize-control-cs_import_option,
#customize-control-cs_export_option,
#customize-control-cs_reset_option {
  .customize-control-title {
    display: none;
  }
}

.options-description {
  margin: 0;
  font-size: 12px;
  color: #c67824;
  background: #f4e4d4;
  border-color: #faebcc;
  padding: 15px;

  span {
    font-size: 14px;
    font-weight: 600;
  }

  a {
    color: #c67824;
  }
}

// 7. Compatibility with wp 5.8
.customize-control {

  input[type="checkbox"],
  input[type="radio"] {
    width: 16px;
    height: 16px;
  }

  input[type="checkbox"]:checked::before {
    width: 14px;
    height: 14px;
    margin: 0;
  }

  input[type="radio"]:checked::before {
    width: 8px;
    height: 8px;
    margin: 3px;
  }
}

// 8. Woo Label
#accordion-section-attr_guide,
#accordion-section-compare,
#accordion-section-product_fbt,
#accordion-section-image_swatch,
#accordion-section-quickview,
#accordion-section-product_buy_now,
#accordion-section-360gallery,
#accordion-section-brand,
#accordion-section-advanced_swatch {
  position: relative;
  overflow: hidden;

  &::after {
    content: "WOO";
    position: absolute;
    top: 4px;
    left: -15px;
    transform: rotateZ(-45deg);
    display: block;
    padding: 0 15px;
    background-color: var(--alpha-primary-color);
    color: #fff;
    font-size: 9px;
    line-height: 1.8;
  }
}

.customize-panel-back,
.customize-section-back {
  color: var(--alpha-dark-color);

  &,
  &:hover,
  &:focus {
    border-#{$left}-color: var(--alpha-primary-color);
    background: #f6f7f7;
  }

  &:hover,
  &:focus {
    color: var(--alpha-primary-color);
  }
}

#customize-theme-controls,
#customize-outer-theme-controls {

  .control-section:hover>.accordion-section-title:after,
  .control-section .accordion-section-title:hover:after,
  .control-section.open .accordion-section-title:after,
  .control-section .accordion-section-title:focus:after {
    color: var(--alpha-primary-color);
  }
}

// 9. Advanced Style
#customize-controls {
  .customize-controls-home {
    display: block;
    position: absolute;
    #{$left}: 0;
    width: 45px;
    height: 41px;
    line-height: 36px;
    padding: 0 2px 0 0;
    background: #eee;
    border: 0;
    border-top: 4px solid #eee;
    border-#{$right}: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    color: #444;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    transition: 0.3s;

    &:hover {
      color: var(--alpha-primary-color);
      border-top-color: var(--alpha-primary-color);
    }
  }

  .customize-controls-close {
    #{$left}: 45px;
  }

  .control-section.open .accordion-section-title,
  .control-section .accordion-section-title:focus,
  .control-section .accordion-section-title:hover,
  .control-section:hover>.accordion-section-title {
    color: var(--alpha-primary-color);
    border-#{$left}-color: var(--alpha-primary-color);
  }

  .customize-info {
    &.open .customize-help-toggle {
      color: var(--alpha-primary-color);
    }

    .customize-help-toggle {

      &:hover,
      &:focus {
        color: var(--alpha-primary-color);
      }

      &:focus:before {
        box-shadow: 0 0 0 1px var(--alpha-primary-color);
      }
    }
  }

  .button {
    transition: 0.3s;
  }

  .button-xlarge {
    padding: 5px 13px;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;

    &:hover {
      color: #fff;
      background-color: #87919f;
      border-color: #87919f;
    }
  }

  .button-primary {
    background: var(--alpha-primary-color);
    border-color: var(--alpha-primary-color);
  }

  h3 {
    font-size: 14px;
  }

  .option-feature-title,
  .options-custom-title {
    padding: 17px 20px;
    font-size: 16px;
    background: #313435;
  }

  .options-custom-title {
    margin-#{$left}: -20px;
    margin-#{$right}: -20px;
  }

  .description {
    margin: 7px 1px 8px;
    color: #999;
  }

  .description-danger {
    background-color: var(--alpha-danger-color);
    color: #fff;

    a {
      display: block;
      margin-top: 3px;
      color: inherit;
    }
  }

  .description-info {
    background-color: var(--alpha-info-color);
    color: #fff;

    a {
      color: inherit;
    }
  }

  .button:not(#save):not(#publish-settings) {
    border-radius: 0;

    &:hover,
    &:focus {
      color: #fff;
      background: #87919f;
      border-color: #87919f;
      box-shadow: none;
    }
  }

  .button.collapse-sidebar:hover,
  .button.collapse-sidebar:focus {
    outline: none;

    .collapse-sidebar-arrow {
      color: var(--alpha-primary-color);
      box-shadow: 0 0 0 1px var(--alpha-primary-color);
    }

    .collapse-sidebar-label {
      color: var(--alpha-primary-color);
    }
  }
}

#customize-controls .control-section .accordion-section-title:hover,
#customize-controls .control-section:hover>.accordion-section-title,
#customize-controls .control-section>.accordion-section-title:focus,
#customize-theme-controls .control-section:hover>.accordion-section-title:after,
#customize-controls .control-section>.accordion-section-title:focus:after,
#customize-theme-controls .control-section .accordion-section-title:hover:after {
  color: var(--alpha-dark-color);
  background-color: #fff;
}

#customize-theme-controls .accordion-section-title>.accordion-trigger,
#customize-outer-theme-controls .accordion-section-title>.accordion-trigger {
  padding-top: 14px;
  padding-bottom: 15px;
  font-weight: 400;
  color: var(--alpha-dark-color);
  box-sizing: border-box;
}

#customize-controls .control-section:hover>.accordion-section-title,
#customize-controls .control-section .accordion-section-title button:hover,
#customize-controls .control-section.open .accordion-section-title,
#customize-controls .control-section .accordion-section-title button:focus {
  color: var(--alpha-dark-color);
  background: #fff;
}

/*.customize-panel-back {
  height: 79px;
}*/

#customize-theme-controls .customize-pane-child.accordion-section-content {
  padding: 12px 20px;
}

.customize-section-title {
  margin: -12px -20px 0 -20px;
}

.customize-control {
  margin-bottom: 20px;

  input[type="checkbox"] {
    margin-#{$right}: 8px;
    border-color: #87919f;

    &:checked:before {
      content: "\f00c";
      font-family: "Font Awesome 5 Free";
      font-weight: 900;
      font-size: 8px;
      background-color: #87919f;
      line-height: 14px;
      color: #fff;
    }
  }

  input[type="checkbox"] {
    border-radius: var(--alpha-corner-sm);
  }

  &.customize-control-checkbox {
    margin-bottom: 5px;
  }

  .dashicons,
  .dashicons-before:before {
    vertical-align: middle;
  }
}

.options-custom-description {
  margin-bottom: 0;
}

#customize-control-quickview_thumbs img {
  width: auto;
  padding: 5px;
  height: 56px;
}

.customize-control-kirki-slider .wrapper {
  input[type="range"] {
    background-color: #ccc;

    &::-webkit-slider-thumb {
      background-color: #fff;
      border: 2px solid #87919f;
    }
  }

  .value {
    padding: 0 8px;
    margin: side-values(0 2% 0 20px);
    background-color: #fff;
  }
}

.customize-control-kirki-number .customize-control-content {
  input {
    margin-#{$right}: 10px;
  }

  .button:last-child {
    border-left: 0;
  }
}

#customize-control-share_type .image {
  label {
    max-width: none;

    img {
      width: 52px;
      padding: 13px;
      border: 1px solid #ccc;
      background: #fff;
    }
  }

  input:checked+label img {
    border-color: var(--alpha-primary-color);
  }
}

#sub-accordion-section-global_elements,
#sub-accordion-section-single_event,
#sub-accordion-section-month_view {
  h4 {
    margin: 0 -20px;
    padding: 17px 20px;
    font-size: 16px !important;
    font-weight: 600 !important;
    background: #313435;
    line-height: 1.4em !important;
    color: #fff;
  }

  a {
    color: #87919f;
  }
}

input[type="radio"] {
  &:focus {
    border-color: #87919f;
    box-shadow: 0 0 0 1px #87919f;
  }

  &:checked::before {
    background-color: #87919f;
  }
}

.wp-customizer [id^="customize-control-tribe_customizer"] .customize-control-title {
  margin-bottom: 5px;
}

#customize-control-products_load,
#customize-control-posts_load {
  .image {
    label {
      max-width: 34%;

      img {
        width: auto;
      }
    }
  }
}

#customize-control-ptb_divider {
  margin-top: 10px;

  .image {
    img {
      width: 142px;
      height: auto;
    }
  }
}

// Fix Kirki plugin style issue
.customize-control-kirki-react-select .kirki-react-select__menu {
  z-index: 6;
}

.custom-file-input {
  display: none;
}

.custom-file-label {
  &:before {
    content: "Choose File";
    padding: 2.5px 14px;
    margin-#{$right}: 15px;
    line-height: 1.65;
    font-size: 14px;
    background-color: #fff;
    border: 1px solid #999;
    border-radius: var(--alpha-corner-sm);
    transition: background-color 0.3s;
  }
}

p {
  font-size: 14px;
}

h4 {
  font-weight: 400;
}

#customize-save-button-wrapper {
  .button:hover {
    background: var(--alpha-primary-color);
    opacity: 0.9;
    transition: opacity 0.3s;
  }

  .save:focus,
  #publish-settings:focus {
    box-shadow: none;
  }
}

.themes-filter-bar .search-icon:after {
  line-height: 30px;
}

.customize-controls-close:hover {
  color: var(--alpha-primary-color);
  border-top-color: var(--alpha-primary-color);
}

.ui-controlgroup-horizontal {
  // for dokan customizer option
  display: flex;
  flex-wrap: wrap;
}

.control-section-kirki-default,
.control-section-kirki-outer {
  min-height: 0;
}

#customize-control-typo_custom1>.customize-control-label,
#customize-control-typo_custom2>.customize-control-label,
#customize-control-typo_custom3>.customize-control-label {
  display: none !important;
}

.customize-control-has-small-gap,
#customize-control-content_bg {
  margin-bottom: 10px !important;

  .customize-control-label {
    display: flex;
    border-bottom: 1px solid #e1e1e1;

    .customize-control-title {
      margin-top: 10px;
    }
  }
}

#customize-control-content_bg-background-color {
  margin-bottom: 5px;
}

.customize-section-title-nav_menus-heading {
  display: none;
}

#sub-accordion-section-menu_locations .customize-section-description {
  padding-top: 10px;
}

.customize-control-kirki[data-kirki-parent-control-type=kirki-typography] .customize-control-title {
  margin-bottom: 5px;
}

#sub-accordion-panel-nav_menus .accordion-section-title .section-nav-status {
  #{$right}: 45px;
}

.customize-control-textarea textarea {
  padding: 7px 10px;
}

.wp-customizer .menu-item-settings input[type=text],
.wp-customizer .menu-item-settings textarea {
  margin-top: 5px;
}

// 10. Custom Style for Controls
#customize-control-custom_css,
#customize-control-custom_js {
  .customize-control-title {
    margin-left: 0;
  }

  .CodeMirror-gutters {
    background-color: #fefefe;
  }
}

#customize-save-button-wrapper {
  margin-top: 8px;
}

.customize-control-kirki[kirki-typography-subcontrol-type="letter-spacing"] {
  margin-bottom: 20px;
}

// 11. Customizer Search Compatibility
#accordion-section-customizer-search {
  display: block !important;
}

.customize-search-toggle {
  display: none;
}

.customizer-search-section .search-field-wrapper {
  display: flex;

  input {
    margin-#{$right}: 10px;
    flex: 1;
    border-color: #ccc;
    box-shadow: none;
    border-radius: 0;
    font-size: 13px;

    &:focus {
      border-color: var(--alpha-primary-color);
    }
  }
}

#customizer-search-results {
  .control-section {
    margin-bottom: 0;
    border-left: 4px solid #fff;
    transition: .15s color ease-in-out, .15s background-color ease-in-out, .15s border-color ease-in-out;

    h3.accordion-section-title {
      border-top: none;
      background: transparent;
      font-weight: 400;
      color: var(--alpha-dark-color);

      &:before {
        content: none;
      }
    }

    .search-setting-path {
      font-size: 12px;
    }

    &:hover {
      color: var(--alpha-primary-color);
      border-#{$left}-color: var(--alpha-primary-color);
      background: #fff;
    }
  }

  .accordion-section:after {
    padding: 0;
    left: auto;
    transform: none;
    background: transparent;
    color: inherit;
  }
}

// 12. Responsive Control
.wp-full-overlay {
  --alpha-preview-laptop-width: 1200px;
}

.wp-full-overlay-main {
  margin-#{$left}: 0 !important;
  max-width: 100%;
  max-height: 100%;
  #{$left}: 50%;
  transform: translateX(if-ltr(-50%, 50%));

  .preview-laptop & {
    width: var(--alpha-preview-laptop-width);
    height: 1080px;
  }

  .preview-tablet_extra & {
    width: 992px;
    height: 1080px;
  }

  .preview-tablet & {
    width: 768px;
  }

  .preview-mobile & {
    width: 360px;
    height: 800px;
  }
}

.wp-full-overlay-footer .devices {
  .preview-laptop:before {
    content: '\f547';
  }

  .preview-tablet_extra:before {
    content: '\f471';
    transform: rotate(-90deg);
  }
}