/*
* Base CSS for all controls
*/

.components-popover {
    z-index: 99999 !important;
}

.components-input-control__input {
    text-align: center;
}

// Controls Container
.progressmatify-control-container {
    margin-bottom: 16px !important;
    .components-flex {
        margin-bottom: 8px;
        width: 100%;
    }

    &.progressmatify-box {
        .components-flex {
            align-items: center;
        }
    }

    .components-input-control__input {
        height: 32px !important;
        text-align: center !important;
    }
}

.progressmatify-btn {
    &:focus {
        outline: none !important;
        box-shadow: none !important;
    }
}

// Margin Bottom
.progressmatify-mb-0 {
    margin-bottom: 0;
}

.progressmatify-mb-8 {
    margin-bottom: 8px;
}

.progressmatify-mb-12 {
    margin-bottom: 12px;
}

.progressmatify-mb-16 {
    margin-bottom: 16px;
}

.progressmatify-mb-24 {
    margin-bottom: 24px;
}

// Padding Bottom
.progressmatify-pb-0 {
    padding-bottom: 0;
}

// Display
.progressmatify-inline-block {
    display: inline-block;
}

.progressmatify-block {
    display: block;
}

// Buttons Group
.progressmatify-btn-group {
    display: inline-flex;
    width: 100%;
    &.progressmatify-full-group {
        width: 100%;
        display: flex;
        .components-button {
            width: 100%;
            padding: 0;
            justify-content: center;
        }
    }
    .components-button {
        box-shadow: inset 0 0 0 1px #e0e0e0;
        font-size: 11px;
        text-transform: capitalize;
        font-weight: 500;
        box-sizing: border-box;
        height: 30px;
        width: 100%;
        &:focus {
            outline: none;
            box-shadow: inset 0 0 0 1px #e0e0e0;
        }
        &.active {
            background: #eee;
            color: #014568;
        }
    }
}

// label
.progressmatify-label,
.progressmatify-control-container .components-base-control__label {
    font-size: 13px;
    font-weight: 400;
    text-transform: none !important;
    display: inline-block;
}

// reset button
.progressmatify-reset-button {
    width: 12px;
    padding: 0 !important;
    margin: 0 !important;
    min-width: unset !important;
    height: auto !important;
    color: #2563eb;
    &:focus {
        outline: none !important;
        box-shadow: none !important;
    }
    &.disabled {
        cursor: not-allowed;
        .dashicon {
            color: #e0e0e0;
        }
    }
    &.active {
        .dashicon {
            color: #2563eb;
        }
    }
    .dashicon {
        font-size: 12px;
        line-height: 20px;
    }
}

.progressmatify-reset-control {
    .components-base-control__field {
        margin-bottom: 0 !important;
    }
    .components-range-control__wrapper span[aria-hidden='true'] {
        height: 2px !important;
    }
    .components-range-control__thumb-wrapper {
        height: 8px !important;
        width: 8px !important;
        margin-top: 10px !important;

        span:before {
            height: 12px !important;
            width: 12px !important;
            left: -2px !important;
            top: -5px !important;
        }
    }
    .components-simple-tooltip {
        display: none !important;
    }
}

// editor icon
.progressmatify-editor-icon {
    width: 100%;
    align-items: center;
    justify-content: center;
    &:focus {
        outline: none;
        box-shadow: none !important;
    }
    svg,
    .dashicon {
        width: 16px;
        font-size: 12px;
        line-height: 20px;
    }
    &.active-btn {
        background-color: #f3f4f5;
        svg {
            fill: #2563eb;
        }
    }
}

// Control unit
.progressmatify-control-container {
    // margin-bottom: 16px;
    .components-flex {
        // padding-bottom: 8px;
        .progressmatify-units-wrapper {
            display: flex;
            align-items: center;
            gap: 5px;
            .unit-btn {
                background: none;
                border: none;
                cursor: pointer;
                font-size: 10px;
                font-weight: 600;
                text-transform: uppercase;
                margin: 0;
                padding: 0;
                &.active {
                    color: #2563eb;
                }
            }
        }
    }

    // control label
    // .components-base-control__label,
    .components-base-control__field {
        margin: 0 !important;
        padding: 0 !important;
    }
}

// Popover
.progressmatify-popover {
    .components-input-control__backdrop {
        border: 1px solid #e5e5e5 !important;
    }
}

// inner popover
.gutslider-inner-popover {
    width: 250px;
    padding: 10px;
    .progressmatify-control-container {
        margin: 0;
    }
}

.progressmatify-res-btn {
    .components-button-group {
        margin-bottom: 0 !important;
    }
}

// custom help
.progressmatify_custom__help {
    margin-top: 8px;
    font-size: 12px;
    color: #999;
    font-style: italic;
    display: block;
}

// progressmatify reset range control
.progressmatify-reset-control {
    .components-range-control__track {
        color: #2563eb !important;
    }
    .components-range-control__thumb-wrapper {
        background-color: #2563eb !important;
    }
}

// style copy-paste
.progressmatify-copy-paste-styles-popover {
    .components-popover__content {
        width: 150px;
        svg {
            margin-right: 5px;
            width: 16px;
        }
    }
}

// editor responsive canvas

//class="edit-post-visual-editor has-inline-canvas progressmatify-desktop"
.edit-post-visual-editor.has-inline-canvas {
    &.progressmatify-tablet > div {
        width: 768px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        .editor-styles-wrapper.has-global-padding {
            padding: 0 20px !important;
        }
    }
    &.progressmatify-mobile > div {
        width: 360px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        .editor-styles-wrapper.has-global-padding {
            padding: 0 20px !important;
        }
    }
}

// Editor Append Button
.progressmatify-append-btn {
    background: #2d62ff;
    border: none;
    line-height: 1;
    height: 50px;
    width: 150px;
    border-radius: 3px;
    color: #fff;
    margin-top: 10px;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 500;
    cursor: pointer;
    transition: 0.3s;
    &:hover {
        background: #1545d4;
    }
}

// flex
.progressmatify-flex {
    display: flex;
    justify-content: space-between;
    gap: 16px;

    .progressmatify-flex-item {
        width: 100%;
    }
}

.progressmatify-add-btn {
    display: inline-block;
    width: 100px;
    background: #fff;
    color: #1545d4;
    border: 1px solid #1545d4;
    border-radius: 3px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    cursor: pointer;
    font-size: 15px;
    text-transform: uppercase;
    font-weight: 500;
}

.progressmatify-remove-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: #cacaca;
    cursor: pointer;
    transition: 0.3s;
    &:hover {
        color: #ff0c0b;
    }
}
