/* Customize Preview ---- Begin*/
.customize-partial-edit-shortcut button,
.widget .customize-partial-edit-shortcut button {
    display: none;
}

.wolmart-tooltip {
    padding: 5px 10px;
    max-width: 300px;
    white-space: nowrap;
    border-radius: 20px;
    background-color: rgba(#0071a1, 0.7);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background .3s;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);

    &:hover {
        background-color: #0071a1;
    }

    >a::#{$before} {
        content: '\e9b2';
        margin-#{$right}: 8px;
        font-family: 'wolmart';
        font-size: 11px;
        font-weight: 600;
    }

    &.tooltip-inner {
        padding: 0 !important;

        >a {
            display: inline-block;
            padding: 8px 22px;
        }
    }
}

.wolmart-tooltip-initialized {
    &.wolmart-tooltip-active {
        outline: 2px dotted #007cba;
        outline-offset: 5px;
    }
}

/* Customize Preview ---- End */


/**
 * Wolmart Mini Logo
 */
div.dashicons-wolmart-logo:before,
span.dashicons-wolmart-logo:before,
.wolmart-mini-logo:before {
    content: '';
    display: inline-block;
    background-image: url(../images/logo-white.svg);
    background-size: cover;
    width: 20px;
    height: 20px;
    padding: 7px;
}

#wp-admin-bar-wolmart .custom-mini-logo img {
    width: 20px;
    height: 20px;
    padding: 7px;
}

#wp-admin-bar-wolmart .dashicons-wolmart-logo:before,
#wp-admin-bar-wolmart .custom-mini-logo img {
    margin-top: -4px;
    margin-#{$right}: -6px;
}

#wp-admin-bar-wolmart-activate .ab-icon.dashicons-admin-network {
    margin-top: 3px;
}

/**
  * Admin menu's links
  */
#wp-admin-bar-edit-default li .ab-item {
    display: flex;
    width: 200px;
}

#wp-admin-bar-edit-default .wolmart-ab-template-type {
    margin-#{$left}: auto;
    background: #55595c;
    font-size: 11px;
    line-height: 9px;
    margin-top: 6px;
    padding: 4px 8px;
    border-radius: 3px;
    text-transform: capitalize;
    letter-spacing: 0.05em;
}

.comment-form-cookies-consent input[type="checkbox"]+label {
    display: inline;
    vertical-align: middle;
    line-height: 24px;
    margin-#{$left}: 5px;

    &::before {
        transform: none;
        top: 3px;
    }
}

/* Contact Form 7 */
@if use(wpcf7) {
    .wpcf7-form {
        position: relative;
        margin-bottom: 2rem;

        .ajax-loader {
            display: none !important;
            background: none;
        }

        .wpcf7-response-output {
            margin: 10px 0 0;
            padding: 5px 10px;
            border: 2px solid #dc3232;
            font-size: 1.4rem;
        }

        .wpcf7-form-control-wrap span {
            margin-top: 10px;
        }

        >p {
            display: flex;
            flex-wrap: wrap;
            align-items: flex-start;
            width: 100%;
            margin-bottom: 0;
            font-size: 1.4rem;
        }

        .wpcf7-form-control-wrap {
            flex: 1;
        }

        .wpcf7-form-control {
            height: 46px;
            font-size: inherit;
        }

        input {
            background: #fff;
        }

        span .wpcf7-form-control {
            width: 100%;
            padding: 1rem 1.5rem;
        }

        .btn {
            padding: 0 2rem;
        }

        textarea,
        textarea::placeholder,
        input,
        input::placeholder {
            color: #666;
        }

        textarea.wpcf7-form-control {
            height: auto;
        }

        input.wpcf7-form-control {
            &::placeholder {
                color: inherit;
                transition: color .3s;
            }

            &::-webkit-input-placeholder {
                color: inherit;
                transition: color .3s;
            }

            &::-moz-placeholder {
                color: inherit;
                transition: color .3s;
            }

            &:focus::placeholder {
                color: transparent;
            }

            &:focus::-webkit-input-placeholder {
                color: transparent;
            }

            &:focus::-moz-placeholder {
                color: transparent;
            }
        }

        .wpcf7-submit.with-right-arrow:after {
            content: '\e92c';
            display: inline-block;
            vertical-align: -0.15em;
            margin-left: 0.8rem;
            font-family: 'wolmart';
            font-size: 1.2em;
            line-height: 0;
        }
    }

    .wpcf7 form.failed .wpcf7-response-output,
    .wpcf7 form.aborted .wpcf7-response-output {
        margin: 1rem 0;
        padding: .8em 1.5em;
        border-radius: 3px;
        color: $danger-color;
        border: 1px solid $danger-color-light;
        background-color: $danger-color-light;
    }
}

/* Sidebar Widget */
@if use(widget-block) {
    .widget-block .wolmart-block {
        text-align: initial;
    }
}

@if use(wp-media-gallery) {
    .widget_media_gallery {
        .gallery {
            display: flex;
            flex-wrap: wrap;
            margin: -5px;
        }

        figure {
            width: 100%;
            padding: 5px;
        }
    }

    @for $i from 1 through 8 {
        .gallery-columns-#{$i}>* {
            max-width: #{ round( 100% / $i * 10000 ) / 10000 };
            flex: 0 0 #{ round( 100% / $i * 10000 ) / 10000 };
        }
    }
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
    display: none;
}