/**
 * Design Tab Styles
 *
 * Styles for the Design tab in popup editor
 * Loaded on: Popup editor pages (Design tab)
 */

/* Base styles for the toggle switch */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

/* Hide the default checkbox */
.switch input {
    z-index: 9999;
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

#popup_image::file-selector-button,
#popup_video::file-selector-button {
    background-color: #1A73E8;
    color: white;
    border: none;
    padding: 10px 40px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.instant_popup_setting .slider.round:before {
    width: 32px;
    background: white;
    bottom: 5px;
    height: 15px;
    width: 15px;
    left: 4px;
}

/* The circle inside the slider */
.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

/* Checked state */
input:checked + .slider {
    background-color: #2196F3;
}

.popup_active {
    align-items: center;
    width: 40%;
    display: flex;
    gap: 10px;
}

.popup_active label {
    color: #1A73E8;
    font-size: 14px;
}

.ipb_tog input:checked + .slider,
.ipb_background_wrapper input:checked + .slider {
    background-color: #03E334;
}

.popup_active .ipb_tog {
    width: 38px !important;
    height: 22px;
    padding: 0px 5px !important;
}

.ipb_sound_wrapper .toggle {
    flex-direction: column;
    gap: 20px;
}

.popup_active .ipb_tog .slider:before {
    height: 15px;
    width: 15px;
    left: 4px;
}

/* Move the slider when checked */
input:checked + .slider:before {
    transform: translateX(26px);
}

/* Rounded slider */
.slider.round {
    border-radius: 50px;
}

.slider.round:before {
    border-radius: 50%;
}

.ipb_background_wrapper {
    width: 85%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input {
    width: 50%;
    display: flex;
    flex-direction: row;
    gap: 14px;
}

.input.toggle.switch {
    width: 21%;
}

div#limitation .limit_fields .field_l {
    width: 32%;
}

#limitation .limit_fields h2 {
    width: fit-content !important;
}

span.range_val,
p.perc_count {
    color: black;
    padding: 5px 15px;
    border: 1px solid #E0E0E0;
    text-align: center;
    width: fit-content;
}

.background_field .label,
.limit_fields label,
.design_animate label {
    font-weight: 500;
    flex: 0 0 auto;
    width: fit-content;
    font-size: 18px;
    font-weight: 400;
    line-height: 24px;
}

.background_field .input.toggle.switch {
    flex: 0 0 auto;
    width: 38px !important;
    height: 22px;
    padding: 1px 5px !important;
}

.background_field {
    position: relative;
    background: white;
    padding: 10px;
    width: fit-content;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.background_field .back_pos .fields_p {
    margin: 10px 0;
    flex: 0 0 22%;
}

.back_pos .input_fields_p label {
    font-size: 14px;
}

.background_field .back_position {
    width: 200px;
    flex: 0 0 auto;
}

.back_pos .input_fields_p {
    gap: 3px;
    margin: 5px 0;
}

.back_pos .input_fields_p input[type="radio"] {
    height: 30px;
}

.design_animate {
    background: white;
    padding: 15px;
}

.design_animate label {
    flex: 0 0 140px;
    display: block;
}

#animation .animate_field {
    align-items: center;
    display: flex;
    position: relative;
    gap: 5px;
}

#animation .animate_wrap {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

#animation .input_animate {
    width: 360px;
    position: relative;
}

input#speed_range {
    width: 200px;
}

#animation .animate_field select {
    width: 220px;
}

#animation input#animate_speed {
    border-radius: 0;
    line-height: 20px;
    width: 45px;
    padding: 4px;
    font-size: 16px;
    text-align: center;
}

.input_animate .info {
    position: absolute !important;
    right: -24px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.background_field.background_color {
    display: none !important;
}

.background_field.background_color.show {
    display: flex !important;
}

.background_field.background_image {
    display: none !important;
}

.background_field.background_image.show {
    display: flex !important;
}

@media (min-width: 1024px) and (max-width: 1366px) {
    .background_field .back_pos .fields_p {
        flex: 0 0 20%;
    }
}
