/****css widget***/

.thim-widget-field {
    margin-bottom: 10px;
}

.bp-widget-field-description {
    font-size: 90%;
    font-style: italic;
}

.thim-widget-field label {
    width: auto;
    display: inline-block;
}

.thim-widget-field-type-radioimage .tf-radio-image {
    display: inline-block !important;
    width: 100px;
    text-align: center;
}

#display-setting td.tf-radio-image {
    width: auto;
}

.form-table th {
    width: 250px;
}

.thim-widget-field-type-color {
    .wp-picker-container {
        position: relative;
    }
    .wp-picker-holder {
        position: absolute;
        z-index: 9999;
    }
}

.thim-widget-field-type-radioimage .tp-radio-image {
    display: inline-block !important;
}

.icon-preview {
    float: left;
    font-size: 20px;
    background: #f6fafc;
    border: 1px solid #43aaec;
    color: #078dce;
    padding: 5px 8px;
    text-align: center;
    margin-right: 10px;
}

.wrapper_icon .search {
    padding: 6px 10px;
}

.thim-widget-field input[type="number"] {
    width: 100px;
}

.panel-dialog .thim-widget-section .color-mini {
    width: 33.3%;
    float: left;
}

.thim-widget-section:after {
    content: "";
    display: table;
    clear: both;
}

.tp-radio-image {
    input[type="radio"] {
        display: none;
    }
    width: 120px !important;
    margin-right: 0 !important;
    border: 2px solid transparent;
    padding-bottom: 1px;
    display: inline-block;
}

.tp-radio-active {
    border: 2px solid #ddd;
}

.tp-radio-image img {
    max-width: 100%;
}

/*.thim-widget-section .thim-widget-field-type-color:nth-child(4n+1) {*/
/*clear: both;*/
/*}*/

.thim-widget-form {
    margin: 15px 0;
    .thim-widget-field-type-icon {
        .icon-preview i {
            margin: 2px 4px;
        }
        ul.icon-list li i {
            margin-left: -5px;
            font-size: 20px;
            line-height: 28px;
        }
    }
    .thim-widget-field {
        margin: 1em 0;
        label {
            display: block;
            margin-bottom: 3px;
        }
        .bp-widget-field-description {
            font-size: 0.9em;
            margin-top: 0.2em;
            color: #999999;
            font-style: italic;
        }
        &.thim-widget-field-separator {
            margin: 1.75em 0;
        }
    }
    .thim-widget-field-repeater {
        /* This is for sub level forms */
        .thim-widget-field-repeater-top {
            background: #F0F0F0;
            border: 1px solid #D0D0D0;
            padding: 10px;
            position: relative;
            h3 {
                font-size: 13px;
                margin: 0;
            }
        }
        .thim-widget-field-expand, .thim-widget-field-remove {
            width: 14px;
            height: 14px;
            position: absolute;
            top: 50%;
            margin-top: -7px;
            cursor: pointer;
            font-size: 14px;
            line-height: 14px;
            text-align: center;
        }
        .thim-widget-field-expand:before, .thim-widget-field-remove:before {
            font-family: dashicons;
            vertical-align: middle;
            color: #999999;
        }
        .thim-widget-field-expand {
            right: 12px;
            &:before {
                content: "\f140";
            }
            &:hover {
                background: #989fa5;
                &:before {
                    color: #FFFFFF;
                }
            }
        }
        .thim-widget-field-remove {
            right: 28px;
            &:before {
                content: '\f158';
            }
            &:hover {
                background: #ff0000;
                &:before {
                    color: #FFFFFF;
                }
            }
        }
        .thim-widget-field-repeater-items {
            background: #FCFCFC;
            border: 1px solid #EEEEEE;
            border-top: 0;
            border-bottom: 0;
            .thim-widget-field-repeater-item {
                background: #FCFCFC;
                border-bottom: 1px solid #EEEEEE;
                .thim-widget-field-repeater-item-top {
                    padding: 10px;
                    cursor: move;
                    position: relative;
                    background: #F6F6F6;
                    h4 {
                        font-size: 12px;
                        margin: 0;
                    }
                }
                h4 {
                    font-size: 15px;
                    margin: 0;
                }
                &:last-child {
                    border-bottom: 0;
                }
                .thim-widget-field-repeater-item-form {
                    border-top: 1px solid #EEEEEE;
                    display: none;
                    padding: 10px;
                }
            }
        }
        .thim-widget-field-repeater-add {
            padding: 7px 10px;
            background: #F0F0F0;
            border: 1px dashed #D0D0D0;
            font-size: 12px;
            line-height: 1em;
            text-align: center;
            cursor: pointer;
            &:hover {
                background: #F4F4F4;
            }
        }
        .thim-widget-field-repeater {
            .thim-widget-field-repeater-top {
                background: #eaf2f6;
                border-color: #c9d0d4;
                h3 {
                    color: #42484b;
                }
            }
            .thim-widget-field-repeater-items {
                background: #f6fdff;
                border-color: #e8eff3;
                .thim-widget-field-repeater-item {
                    background: #f8fdff;
                    border-bottom-color: #e8eff3;
                    .thim-widget-field-repeater-item-top {
                        background: #f0f8fc;
                    }
                    .thim-widget-field-repeater-item-form {
                        border-top-color: #e8eff3;
                    }
                }
            }
            .thim-widget-field-repeater-add {
                background: #eaf2f6;
                border-color: #c9d0d4;
                color: #42484b;
                &:hover {
                    background: #edf5f9;
                }
            }
        }
    }
    .media-field-wrapper {
        position: relative;
        display: block;
        float: left;
        background: #f4f4f4;
        background: -moz-linear-gradient(top, #f9f9f9 0%, #f2f2f2 100%);
        background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f9f9f9), color-stop(100%, #f2f2f2));
        background: -webkit-linear-gradient(top, #f9f9f9 0%, #f2f2f2 100%);
        background: -o-linear-gradient(top, #f9f9f9 0%, #f2f2f2 100%);
        background: -ms-linear-gradient(top, #f9f9f9 0%, #f2f2f2 100%);
        background: linear-gradient(to bottom, #f9f9f9 0%, #f2f2f2 100%);
        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#f2f2f2', GradientType=0);
        border: 1px solid #bbbbbb;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        -webkit-border-radius: 3px;
        -moz-border-radius: 3px;
        border-radius: 3px;
        height: 32px;
        &:hover {
            background: #ffffff;
            background: -moz-linear-gradient(top, #ffffff 0%, #f7f7f7 100%);
            background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f7f7f7));
            background: -webkit-linear-gradient(top, #ffffff 0%, #f7f7f7 100%);
            background: -o-linear-gradient(top, #ffffff 0%, #f7f7f7 100%);
            background: -ms-linear-gradient(top, #ffffff 0%, #f7f7f7 100%);
            background: linear-gradient(to bottom, #ffffff 0%, #f7f7f7 100%);
            filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f7f7f7', GradientType=0);
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
        }
        > div {
            -moz-box-sizing: border-box;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
            float: left;
            height: 32px;
        }
        .current {
            padding: 4px;
            border-right: 1px solid #bbb;
            position: relative;
            box-shadow: 1px 0 0 #FFF;
            .title {
                display: none;
                position: absolute;
                bottom: 34px;
                left: 0;
                padding: 4px 12px;
                background: #333;
                color: #CCC;
                font-weight: bold;
                width: auto;
                white-space: nowrap;
            }
        }
        .thumbnail-wrapper {
            border: 1px solid #999;
            line-height: 0;
            width: 22px;
            height: 22px;
            background: #cfcfcf;
            background: -moz-linear-gradient(top, #cfcfcf 0%, #dbdbdb 50%, #d1d1d1 51%, #cccccc 100%);
            background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #cfcfcf), color-stop(50%, #dbdbdb), color-stop(51%, #d1d1d1), color-stop(100%, #cccccc));
            background: -webkit-linear-gradient(top, #cfcfcf 0%, #dbdbdb 50%, #d1d1d1 51%, #cccccc 100%);
            background: -o-linear-gradient(top, #cfcfcf 0%, #dbdbdb 50%, #d1d1d1 51%, #cccccc 100%);
            background: -ms-linear-gradient(top, #cfcfcf 0%, #dbdbdb 50%, #d1d1d1 51%, #cccccc 100%);
            background: linear-gradient(to bottom, #cfcfcf 0%, #dbdbdb 50%, #d1d1d1 51%, #cccccc 100%);
            filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#cfcfcf', endColorstr='#cccccc', GradientType=0);
            box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
            img {
                height: 100%;
                width: 100%;
                box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
            }
        }
        .media-upload-button {
            display: inline-block;
            color: #666;
            text-decoration: none;
            text-shadow: 0 1px 0 #FFF;
            font-weight: 600;
            font-size: 11px;
            padding: 7px 8px 7px 6px;
            outline: none;
            cursor: pointer;
        }
        &:hover .media-upload-button {
            color: #707070;
        }
    }
}

.media-content li {
    float: left;
    width: 150px;
    height: 150px;
    overflow: hidden;
    .thumbnail-wrapper {
        border: 1px #ccc solid;
        position: relative;
    }
    img {
        width: 150px;
        height: 150px;
        cursor: move;
    }
}

.multi-media-field-wrapper a.media-upload-button {
    display: inline-block;
    color: #666;
    text-decoration: none;
    text-shadow: 0 1px 0 #FFF;
    font-weight: 600;
    font-size: 11px;
    padding: 7px 8px 7px 6px;
    outline: none;
    cursor: pointer;
    background: #ddd;
}

.media-content {
    li .thumbnail-wrapper a {
        &.media-remove-button {
            position: absolute;
            top: 0;
            right: 0;
            z-index: 1;
            display: block;
            background: #ddd;
            padding: 2px 10px;
            text-decoration: blink;
        }
        &.multimedia-remove-button {
            position: absolute;
            top: 0;
            right: 0;
            z-index: 1;
            background: #ddd;
            text-decoration: blink;
            display: none;
            padding: 4px 10px;
        }
    }
    &:after {
        content: "";
        display: block;
        clear: both;
    }
}

.thim-widget-form {
    .media-remove-button {
        display: none;
        position: absolute;
        top: 0;
        left: 100%;
        text-decoration: none;
        color: #AAA;
        font-size: 11px;
        padding: 6px 0 6px 8px;
        &:hover {
            color: #BC0B0B;
        }
    }
    .sow-select-posts {
        margin-top: 6px;
        position: relative;
        .sow-current-count {
            position: absolute;
            top: -10px;
            right: -10px;
            border-radius: 9px;
            background: #f92700;
            border: 1px solid #da0900;
            display: block;
            line-height: 14px;
            font-size: 7px;
            width: 17px;
            height: 17px;
            text-align: center;
            vertical-align: middle;
            font-weight: bold;
            color: #FFFFFF;
            box-sizing: border-box;
            padding-top: 1px;
        }
    }
    .thim-widget-field-type-widget > label, .thim-widget-field-type-section > label {
        background: #F0F0F0;
        border: 1px solid #D0D0D0;
        padding: 10px;
        display: block;
        margin-bottom: 0;
    }
    .thim-widget-field-type-widget > label:before, .thim-widget-field-type-section > label:before {
        float: left;
        margin: 3px 6px 0 0;
        display: block;
        width: 14px;
        height: 14px;
        font-size: 14px;
        line-height: 1;
        font-family: "dashicons";
        content: "\f132";
    }
    .thim-widget-field-type-widget > label.thim-widget-section-visible:before, .thim-widget-field-type-section > label.thim-widget-section-visible:before {
        content: "\f460";
    }
    .thim-widget-field-type-widget .thim-widget-section, .thim-widget-field-type-section .thim-widget-section {
        padding: 10px;
        background: #FCFCFC;
        border: 1px solid #EEEEEE;
        border-top: 0;
    }
}

.panel-dialog .thim-widget-section .color-mini:nth-child(3n+1) {
    clear: both;
}

.thim-widget-form {
    .thim-widget-field-type-widget .thim-widget-section.thim-widget-section-hide, .thim-widget-field-type-section .thim-widget-section.thim-widget-section-hide {
        display: none;
    }
}

.wrapper_icon {
    padding: 10px;
    border: 1px solid #D8D8D8;
    background: #FFFFFF;
    -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.0275);
    -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.0275);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.0275);
}

.icon-list {
    height: 175px;
    overflow-y: scroll;
    margin-top: 10px;
    li {
        -ms-box-sizing: border-box;
        -moz-box-sizing: border-box;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        float: left;
        width: 43px;
        height: 38px;
        margin: 3px;
        padding: 4px 0;
        border: 1px solid #D0D0D0;
        background: #FFFFFF;
        font-size: 30px;
        overflow: hidden;
        cursor: pointer;
        text-align: center;
        label {
            display: none !important;
        }
        &.selected, &:hover {
            background: #f6fafc;
            border: 1px solid #43aaec;
            color: #078dce;
            -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
            -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
        }
    }
}

.thim-widgets-query-builder {
    .query-builder-content {
        padding: 20px;
        .query-builder-form-field {
            margin-bottom: 10px;
            label span {
                display: block;
                font-size: 13px;
                line-height: 24px;
                color: #666;
            }
            .sow-select-posts {
                margin-top: 2px;
            }
            input {
                &[type="text"] {
                    width: 400px;
                }
                &[type="number"] {
                    width: 150px;
                }
            }
            .sow-order-button {
                display: inline-block;
                width: 19px;
                height: 19px;
                margin: 0 0 -6px 10px;
                cursor: pointer;
                background: url(img/ordering-icons.png);
                &.sow-order-button-desc {
                    background-position: left top;
                }
                &.sow-order-button-asc {
                    background-position: left bottom;
                }
            }
        }
    }
    .media-toolbar-secondary {
        .sow-post-count-message {
            margin-top: 21px;
        }
        .sow-post-selector-summary {
            margin-top: 10px;
            display: block;
            width: 41px;
            height: 41px;
            float: left;
            overflow: hidden;
            background: green;
            margin-right: 10px;
            &:last-child {
                margin-right: 0;
            }
        }
    }
    .sow-post-selector-summary {
        display: block;
        float: left;
        margin: 0 15px 15px 0;
        width: 130px;
        .sow-thumbnail {
            width: 130px;
            height: 130px;
            margin-bottom: 4px;
            img {
                width: 100%;
                height: auto;
            }
        }
        .sow-title {
            height: 2.5em;
            overflow: hidden;
            line-height: 1.2em;
            text-align: center;
        }
        &.sow-post-loading .sow-thumbnail {
            background: url(img/loading.gif) center center no-repeat #eeeeee;
            img {
                display: none;
            }
        }
        .sow-remove {
            display: none;
        }
    }
    #sow-post-selector {
        .sow-autocomplete-field {
            text-align: right;
            margin-bottom: 20px;
            input[type=text] {
                width: 320px;
                margin-left: 10px;
            }
        }
        .sow-posts-sortable {
            .ui-state-highlight {
                display: block;
                float: left;
                margin: 0 15px 15px 0;
                background: #F3F3F3;
            }
            .sow-post-selector-summary {
                cursor: move;
                position: relative;
                .sow-remove {
                    position: absolute;
                    top: -5px;
                    right: -5px;
                    width: 19px;
                    height: 19px;
                    z-index: 10;
                    text-decoration: none;
                    background: #333333;
                    text-align: center;
                    &:before {
                        content: '\f158';
                        font: 14px/1 dashicons;
                        vertical-align: middle;
                        color: #EEEEEE;
                    }
                    &:hover {
                        background: #444444;
                        &:before {
                            color: #FFFFFF;
                        }
                    }
                }
                &:hover .sow-remove {
                    display: block;
                }
            }
            &:after {
                content: "";
                display: table;
                clear: both;
            }
        }
    }
}

.thim-widget-help-link {
    display: block;
    margin: 1em 0;
}

.thim-widgets-preview-modal-overlay {
    position: fixed;
    z-index: 99999;
    top: 32px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.thim-widgets-preview-modal {
    position: fixed;
    z-index: 100000;
    top: 64px;
    left: 32px;
    right: 32px;
    bottom: 32px;
    background-color: #ffffff;
    .thim-widgets-preview-close {
        position: absolute;
        z-index: 10;
        top: 0;
        right: 0;
        font-size: 32px;
        line-height: 1em;
        text-align: center;
        cursor: pointer;
        padding: 4px;
        background: #666666;
        color: #ffffff;
        width: 40px;
        height: 40px;
        -ms-box-sizing: border-box;
        -moz-box-sizing: border-box;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        &:hover {
            background: #FF404B;
            color: #ffffff;
        }
    }
    .thim-widgets-preview-iframe {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
    }
}

.thim-widget-form .thim-widget-field-type-slider {
    .thim-widget-slider-wrapper {
        margin: 10px 0;
        border: 1px solid #E0E0E0;
        padding: 12px 15px;
        background: #F4F4F4;
        -webkit-border-radius: 4px;
        -moz-border-radius: 4px;
        border-radius: 4px;
        max-width: 500px;
        display: block;
        margin-left: 55px;
    }
    .thim-widget-slider-value {
        display: block;
        float: left;
        margin-top: 0;
        border: 1px solid #E0E0E0;
        padding: 11px 0;
        background: #F4F4F4;
        font-weight: bold;
        color: #666;
        width: 45px;
        text-align: center;
    }
    .thim-widget-value-slider {
        position: relative;
        height: 5px;
        background: #A0A0A0;
        -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
        -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
        box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
        -webkit-border-radius: 4px;
        -moz-border-radius: 4px;
        border-radius: 4px;
    }
    .ui-slider-handle {
        cursor: move;
        -ms-box-sizing: border-box;
        -moz-box-sizing: border-box;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        border: 1px solid #a4a3a8;
        z-index: 10;
        position: absolute;
        width: 18px;
        height: 18px;
        margin-top: -7px;
        margin-left: -9px;
        background: #F9F9F9;
        -webkit-border-radius: 10px;
        -moz-border-radius: 10px;
        border-radius: 10px;
        top: 0;
        left: 0;
        -webkit-box-shadow: inset 0 1px 0 #FFFFFF, 0 1px 1px rgba(0, 0, 0, 0.1);
        -moz-box-shadow: inset 0 1px 0 #FFFFFF, 0 1px 1px rgba(0, 0, 0, 0.1);
        box-shadow: inset 0 1px 0 #FFFFFF, 0 1px 1px rgba(0, 0, 0, 0.1);
    }
    input[type="number"] {
        display: none;
    }
}

.thim-widget-field-is-hidden {
    display: none;
}

.clear-both {
    clear: both;
}