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

// Base
a:focus {
    color: #135e96;
    box-shadow: none;
    outline: none;
}

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

#customize-theme-controls {
    font-family: Poppins, sans-serif;

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

    .kirki-toggle {
        align-items: center;
    }

    .kirki-react-select__indicators {
        height: 32px !important;
    }
}

.wp-full-overlay-sidebar {
    width: 360px;
}

.expanded .wp-full-overlay-footer {
    max-width: 359px;
    width: 100%;
}

.wp-full-overlay.expanded {
    margin-left: 360px;
}

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

.customize-control-title {
    font-weight: 400;

    .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;
}

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

.control-section .customize-control .buttonset input {
    +label.switch-label {
        color: #555d66;
    }

    &:checked+label.switch-label {
        color: #fff;
    }
}

#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 .ui-sortable {
    height: 235px;
    overflow-y: scroll;
}

.customize-control ul.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;
    transition: background .2s;

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

.customize-control-kirki-number .customize-control-content .quantity {
    line-height: 30px;
}

.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: 3px;
    transition: background .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}: .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: 0 0 0 30px;
}

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

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


#accordion-section-mobile_bar_deprecated,
#accordion-section-category_type,
#accordion-section-custom_css_js,
#accordion-section-product_buy_now,
#accordion-section-static_front_page,
// #accordion-section-header_sticky,
#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;
}

// Styling
.accordion-section-title button.accordion-trigger {
    box-sizing: border-box;
    height: auto;
}

#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: .7;
    margin-#{$right}: .5rem;
}

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

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

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

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

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

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

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

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

#accordion-section-footer>h3>.accordion-trigger:before {
    background-image: url(./assets/option_footer.svg);
}

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

#accordion-section-share>h3>.accordion-trigger:before {
    background-image: url(./assets/option_share.svg);
}

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

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

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

#accordion-section-title_tagline>h3>.accordion-trigger:before {
    background-image: url(./assets/option_site.svg);
    background-size: 30px 30px !important;
}

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

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

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

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

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

#accordion-panel-mobile>h3>.accordion-trigger:before {
    background-image: url(./assets/option_mobile.svg);
}

#accordion-panel-dokan>h3>.accordion-trigger:before {
    background-image: url(./assets/option_dokan.png);
}

#input_cart_icon_type img {
    width: 67px;
}

// new customizer panel style
#customize-controls {
    font-family: Poppins, sans-serif;
}

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

.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, .5);
}

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

.wp-full-overlay-footer .devices {
    box-shadow: 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;
}

.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 .5rem 0 .2rem);
        border-radius: 4px;
        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;
        }
    }
}

.customize-control-kirki-toggle {
    label {
        align-items: center;
    }

    .switch {
        border: 1px solid #dfdfdf;
        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;
        box-shadow: rgba(0, 0, 0, 0.13) 0 6px 0 0 inset !important;

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

        &:after {
            left: 1px;
            background-color: #fff;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
        }

        &:before {
            content: none;
        }
    }

    input:checked+.switch {
        background-color: #0073aa;

        &:after {
            left: -4px;
            background-color: #fff;
        }

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

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

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

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

.select2-container .select2-selection--single {
    border-radius: 4px;
}

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

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

#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-title_tagline>h3,
#accordion-section-colors>h3 {
    border-top: 1px solid #ddd;
}

// customize navigator
@keyframes navCircleAnimate {
    0% {
        transform: scale(1, 1);
        opacity: 1;
    }

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

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

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

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

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

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

    h3 {
        display: flex;
        align-items: center;
        padding: 12px 20px;
        font-size: 15px;
        background-color: #005a88;
        color: #fff;
        margin: 0;

        .navigator-toggle {
            display: inline-block;
            position: fixed;
            #{$right}: 30px;
            width: 20px;
            height: 20px;
            text-align: center;
            color: #fff;
            background-color: #005a88;
            border: 2px solid #005a88;
            border-radius: 50%;

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

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

            &:after {
                content: '';
                position: absolute;
                #{$left}: 0;
                top: 0;
                border: 1px solid #005a88;
                width: 100%;
                height: 100%;
                border-radius: 50%;
                animation: navCircleAnimate 2s infinite linear 0s;
                box-sizing: border-box;
            }

        }

    }

    .customizer-nav-content {
        padding: side-values(20px 12px 20px 20px);
        height: 250px;
        max-height: 350px;
        overflow-y: scroll;

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

        &::-webkit-scrollbar-thumb {
            background: #005a88;
        }

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

    ul {
        margin: 0;

        li {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
        }
    }

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

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

    .customizer-nav-item,
    .customizer-nav-remove {
        color: #fafafa;
    }

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

        &:before {
            content: '';
            display: block;
            position: relative;
            top: 8px;
            width: 0;
            height: 2px;
            background-color: #fafafa;
            top: 8px;
            transition: .3s;
        }

        &:hover {
            &:before {
                width: 8px;
                margin-#{$right}: 5px;
            }
        }
    }

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

        .navigator-toggle {
            i {
                transform: rotateY(180deg);
            }

            &:after {
                content: none;
            }

            border-color: #fff;
        }
    }

    &:hover {
        box-shadow: 0 10px 10px rgba(34, 34, 34, .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: 14px;
    #{$right}: 20px;
    color: #0073aa;
    font-size: 20px;
    transition: color .3s;

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

    &.active i:before {
        content: '\e986';
    }

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

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

// Radio image controls
#customize-control-post_type .image label {
    max-width: 100%;
    margin: 10px 0;
    transition: border .3s;
}

.customize-control-kirki-radio-image .image {
    label {
        max-width: 20%;
        margin: 10px 2%;

        img {
            display: block;
        }
    }

    input:checked+label {
        border: 2px solid $primary-color;

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

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

    .post_type {
        max-width: 33%;
    }

    .post_typemask {
        max-width: 59%;
    }

    .post_typelist {}

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

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

#input_quickview_type.image img,
#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 {
    border: 1px solid #e1e1e1;
    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;
}

#input_site_type.image img {
    padding: 5px;
    border-radius: 5px;
}

#input_mobile_bar_type img,
#input_store_layout svg {
    padding: 5px;
}

.customize-control-kirki-number .customize-control-content .quantity {
    line-height: 30px;
}

#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 {
        max-width: 100%;
        margin: 5px;

        img {
            width: 100%;
        }
    }
}

#customize-control-category_type {
    .image label {
        max-width: 100%;
        margin: 5px 0;

        img {
            width: 100%;
        }
    }
}

.customize-control .button-xlarge {
    padding: 5px 16px;
    transition: background-color .3s;

    &+.button-xlarge {
        margin-#{$left}: 5px;
    }
}

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

// Customizer Alert Style
#customize-control-cs_post_type_alert,
#customize-control-cs_blog_page_alert,
#customize-control-cs_shop_page_alert {
    margin-bottom: 0;
}

.options-description {
    margin: 0;
    font-size: 12px;
    font-style: italic;
    background-color: #fff1d7;
    border-color: #fff1d7;
    padding: 10px;
}

// Compatibilty with WordPress 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;
    }
}

// Product Hover Style Option
#customize-control-hover_style .image label {
    max-width: 30%;
    margin: 10px 1.5%;
    border-radius: 10px;
    overflow: hidden;

    img {
        width: 100px;
    }
}

#customize-control-hover_style .image input:checked+label {
    box-shadow: 0 0 3px 0 rgb(0 0 0 / 10%);
}

#customize-control-cart_popup_type {
    .image {
        label {
            max-width: 46%;
        }

        img {
            width: 400px;
        }
    }
}

.customize-control-kirki-custom .wolmart-option-position {
    display: inline-block;
    border-radius: 3px;
    margin-top: 3px;
}

/* Mobile Floating Button Style */
#input_mobile_floating_button_type {
    label img {
        border-radius: 50%;
    }
}

/* Repeater */
.repeater-row {

    span,
    figure {
        color: #50575e;
    }
}

.customize-control .repeater-fields {
    height: auto;
    overflow: auto;
}

/* Milestone */
.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: $primary-color;
        border-color: $primary-color;

        &:hover {
            cursor: pointer;
        }
    }

    a.active,
    a:hover {
        color: #fff;
        background-color: $primary-color;
        border-color: $primary-color;
    }
}