/**
 * Search Builder Base
 *
 * @package     EPL-SEARCH-BUILDER
 * @since       1.0.0
 * @subpackage  Base
 * @copyright   Copyright (c) 2023, Merv Barrett
 * @license     http://opensource.org/licenses/gpl-2.0.php GNU Public License
 */

.epl-search-wide,
.epl-search-slim,
.epl-search-fixed,
.epl-search-row-text,
.epl-search-row-number,
.epl-search-row-select,
.epl-search-row-checkbox,
.epl-search-row-text .field,
.epl-search-row-number .field,
.epl-search-row-select .field,
.epl-search-row-checkbox .field,
.epl-search-form .field-width,
.epl-search-form .epl-search-row,
.epl-search-form .epl-search-row-full,
.epl-search-form .epl-search-row-half,
.epl-search-form .epl-search-row-third,
.epl-search-form .epl-search-submit-row,
.epl-search-form .epl-search-btn {
        width: auto;
        box-sizing: border-box;
        display: inline-block;
}

.epl-search-row .field,
.epl-search-row .field-width,
.epl-search-row-text .field,
.epl-search-row-number .field,
.epl-search-row-select .field,
.epl-search-row-checkbox .field,
.epl-search-form .epl-search-btn {
        width: 100%;
}

/* Range Slider */
.epl-search-form .epl-lf-range-slider .field {
        min-width: 100%;
}

.ms-options-wrap,
.ms-options-wrap * {
        box-sizing: border-box;
}
.ms-options-wrap {
        position: relative;
}
.ms-options-wrap > button:focus,
.ms-options-wrap > button {
        position: relative;
        text-align: right;
        border: unset;
        background-color: #fff;
        padding: 0;
        line-height: 2.2;
        margin-top: 0;
        font-size: 1em;
        color: #aaa;
        outline-offset: -2px;
        white-space: nowrap;
        display: flex;
        box-sizing: border-box;
        z-index: 1;
}
.ms-options-wrap > button > span {
        display: block;
        /* line-height: 3.15em; */
        position: relative;
        z-index: 4;
        width: 100%;
        text-align: left;
        font-weight: 400;
        padding-left: 8px;
        font-size: 17px;
        color: #333;
        pointer-events: none;
}
.ms-options-wrap > button[disabled] {
        background-color: #e5e9ed;
        color: #808080;
        opacity: 0.6;
}
.ms-options-wrap > button {
        position: relative;
        width: 100%;
        background: #fff;
        border: 1px solid #dedede;
}
.ms-options-wrap > button:focus,
.ms-options-wrap > button {
}
.ms-options-wrap > button:after {
        content: '';
        position: absolute;
        display: block;
        width: 12px;
        height: 12px;
        margin-top: -6px;
        top: 50%;
        right: 6px;
        background: transparent url(images/arrow-down.svg) no-repeat right;
        background-size: 12px;
        z-index: 4;
}
.ms-options-wrap.ms-active > button:after {
        transform: rotate(180deg);
}
.ms-options-wrap.ms-has-selections > button {
        color: #333;
}
.ms-options-wrap > .ms-options {
        position: absolute;
        left: -2px;
        min-width: 100%;
        width: auto;
        margin-top: 1px;
        margin-bottom: 20px;
        background: white;
        z-index: 11;
        /*border: 2px solid #ccc;*/
        overflow: auto;
        visibility: hidden;
        border-top: unset;
        padding: 10px;
}
.ms-options-wrap.ms-active > .ms-options {
        visibility: visible;
        border: 1px solid #ccc;
        margin: 1px 2px;
}
.ms-options-wrap > .ms-options > .ms-search input {
        width: 100%;
        padding: 4px 5px;
        border: none;
        /*border-bottom: 1px groove;*/
        outline: none;
}
.ms-options-wrap > .ms-options .ms-selectall {
        display: inline-block;
        font-size: 0.9em;
        text-transform: lowercase;
        text-decoration: none;
}
.ms-options-wrap > .ms-options .ms-selectall:hover {
        text-decoration: underline;
}
.ms-options-wrap > .ms-options > .ms-selectall.global {
        margin: 4px 5px;
}
.ms-options-wrap > .ms-options > ul,
.ms-options-wrap > .ms-options > ul > li.optgroup ul {
        list-style-type: none;
        padding: 0;
        margin: 0;
}
.ms-options-wrap > .ms-options > ul li.ms-hidden {
        display: none;
}
.ms-options-wrap > .ms-options > ul > li.optgroup {
        padding: 5px;
}
.ms-options-wrap > .ms-options > ul > li.optgroup + li.optgroup {
        border-top: 1px solid #aaa;
}
.ms-options-wrap > .ms-options > ul > li.optgroup .label {
        display: block;
        padding: 5px 0 0 0;
        font-weight: bold;
}
.ms-options-wrap > .ms-options > ul label {
        position: relative;
        display: inline-block;
        width: 100%;
        padding: 4px 4px 4px 20px;
        margin: 1px 0;
        font-size: 16px;
        border: 1px dotted transparent;
        font-weight: 400;
}
.ms-options-wrap > .ms-options.checkbox-autofit > ul label,
.ms-options-wrap > .ms-options.hide-checkbox > ul label {
        padding: 4px;
}
.ms-options-wrap > .ms-options > ul label.focused,
.ms-options-wrap > .ms-options > ul label:hover {
        background-color: #efefef;
        border-color: #999;
}
.ms-options-wrap > .ms-options > ul li.selected label {
        border-color: transparent;
}
.ms-options-wrap > .ms-options > ul input[type='checkbox'] {
        margin: 0;
        position: absolute;
        left: 0;
        top: 7px;
        vertical-align: middle;
        width: 15px;
        height: 15px;
}
.ms-options-wrap > .ms-options.hide-checkbox > ul input[type='checkbox'] {
        position: absolute !important;
        height: 1px;
        width: 1px;
        overflow: hidden;
        clip: rect(1px, 1px, 1px, 1px);
}
.ms-options-wrap > button:hover,
.ms-options-wrap > button:focus {
        background-color: #fff;
        color: #333;
        box-shadow: inherit;
        border: 1px solid #dedede;
}
.ms-options-wrap > button::after {
        border: unset;
}
.ms-options ul {
        /* border-top: 2px solid #ccc; */
}
.ms-options li {
        min-width: 150px;
}
/* Hide any */
.ms-options ul li:nth-child(1) {
        display: none;
}

/* Autocomplete
----------------------------------*/

.ui-autocomplete {
        position: absolute;
        cursor: default;
}

.ui-autocomplete-loading {
        background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat;
        background-origin: content-box;
}

/* workarounds */

* html .ui-autocomplete {
        width: 1px;
}

/* without this, the menu expands to 100% in IE6 */

/* Menu
----------------------------------*/

.ui-menu {
        list-style: none;
        margin: 0;
        display: block;
        z-index: 999;
        background: #fff;
}

.ui-menu .ui-menu {
        margin-top: -3px;
}

.ui-menu .ui-menu-item {
        margin: 0;
        padding: 5px;
        cursor: pointer;
}

.ui-menu .ui-menu-item:hover {
        background: #f6f6f6;
}

.ui-menu .ui-menu-item a {
        text-decoration: none;
        display: block;
        padding: 0.2em 0.4em;
        line-height: 1.5;
        zoom: 1;
}

.ui-menu .ui-menu-item a.ui-state-hover,
.ui-menu .ui-menu-item a.ui-state-active {
        margin: -1px;
}

.ui-menu-item-wrapper {
        font-size: 14px;
}

/** Auto complete - end **/

.epl-search-builder__row {
}

.epl-search-builder__row__items {
        display: block;
}

.epl-search-builder__item,
.epl-search-form .epl-search-builder__item {
        flex: 0 1 auto;
        width: auto;
}

.epl-search-builder__section--animate {
        /* transition: max-height 0.3s; */
}

/** Hide & show classes **/
.epl-search-row--hidden,
.epl-search-builder__section--hidden {
        display: none;
}

.epl-search-builder__section--show {
}

.epl-search-builder__section--show-mobile {
        display: none;
}

.epl-search-builder__section--show-tab {
        display: none;
}

.epl-search-builder__section--hidden-desktop {
        display: none;
}

@media screen and (max-width: 768px) {
        .epl-search-builder__section--show-tab {
                display: inherit;
        }
        .epl-search-builder__section--hidden-tab {
                display: none;
        }
        .epl-search-builder__section--hidden-desktop {
                display: inherit;
        }
        .epl-search-builder__section--show-desktop {
                display: none;
        }
}

@media screen and (max-width: 560px) {
        .epl-search-builder__item {
                width: 100%;
                margin: 0;
        }
        .epl-search-builder__section--show-mobile {
                display: inherit;
        }
        .epl-search-builder__section--hidden-mobile {
                display: none;
        }
        .epl-search-builder__section--show-desktop {
                display: none;
        }
}

/** Select 2 **/

.epl-search-row span.select2.select2-container {
        width: 100%;
        max-width: 100%;
}

/** Toggle Arrows **/

.epl-search-builder__button__icon--arrow {
        border: 2px solid;
        border-width: 0 2px 2px 0;
        display: inline-block;
        padding: 3px;
        margin-left: 5px;
}

.epl-search-builder__button__icon--arrow-right {
        transform: rotate(-45deg);
        -webkit-transform: rotate(-45deg);
        margin-top: 3px;
}

.epl-search-builder__button__icon--arrow-left {
        transform: rotate(135deg);
        -webkit-transform: rotate(135deg);
        margin-top: 5px;
}

.epl-search-builder__button__icon--arrow-up {
        transform: rotate(-135deg);
        -webkit-transform: rotate(-135deg);
        margin-left: 10px;
}

.epl-search-builder__button__icon--arrow-down {
        transform: rotate(45deg);
        -webkit-transform: rotate(45deg);
        margin-left: 10px;
}
a.epl-search-builder__button--toggle {
        display: flex;
        align-items: center;
        font-size: 0.8em;
}
/** arrows - end **/
span.epl-search-builder__no-suggestion {
        display: inline-block;
        margin: 2px;
        font-size: 0.8em;
}

/** Search tags **/
.epl-search-tags-wrapper {
        display: flex;
        justify-content: flex-start;
        flex-wrap: wrap;
}
.epl-search-tag {
        background: #e9e9e9;
        color: #000;
        padding: 0.5em 1em;
        line-height: 1em;
        border-radius: 2px;
        margin: 0.5em 1em;
}
.epl-search-tag__close,
.epl-search-tags-undo-all {
        margin-left: 1em;
        padding: 0 0.5em;
        cursor: pointer;
        float: right;
}
.epl-search-tag-clear-all {
        order: 1;
        color: #000;
        padding: 0.5em 1em;
        line-height: 1em;
        margin: 0.5em 1em;
}
.epl-search-tags-undo-all {
        color: #999;
        border-bottom: 1px solid;
        padding: 0;
        float: unset;
}
.epl-search-builder__row__items--closed {
        display: none;
}
.epl-search-builder__row__closer {
        cursor: pointer;
}

/** Posts Dropdown Button **/

.epl-search-row-button .field {
        list-style-type: none;
        margin: 25px 0 0 0;
        padding: 0;
}

.epl-search-row-button .field .epl-field-row {
}

.epl-search-row-button .field input {
        display: none;
}

.epl-search-row-button .field label {
        display: inline-block;
}

.epl-search-row-button .field input[type='radio'] {
        opacity: 0.01;
}

.epl-search-row-button .field input[type='radio']:checked + label,
.Checked + label {
        background: #1d2327;
        color: #fff;
}

.epl-search-row-button .field label {
        padding: 5px;
        border: 1px solid #ccc;
        cursor: pointer;
        text-align: center;
}

.epl-search-row-button .field label:hover {
        background: #ddd;
}
.epl-search-builder-suggestion-item {
        display: flex;
        justify-content: space-between;
}

/** Field sliders **/
.epl-search-builder-slider-field {
        display: none !important;
}
.epl-ajax-screen-loader {
        position: relative;
}
.epl-ajax-screen-loader::before {
        background: rgba(255, 255, 255, 0.8);
        content: 'Updating Results...';
        position: absolute;
        width: 100%;
        height: 100%;
        z-index: 2;
        display: flex;
        justify-content: center;
        align-items: center;
        font-weight: bold;
        font-size: 1.6em;
        -webkit-animation: epl-search-builder-animation 5s ease-out infinite normal;
        animation: epl-search-builder-animation 5s ease-out;
        -webkit-font-smoothing: antialiased;
        animation-iteration-count: infinite;
}

.field.epl-search-builder-grouped-options {
        display: flex;
        flex-wrap: wrap;
}

.field.epl-sb-counter-field {
        display: flex;
        flex-direction: row;
        flex-grow: 1;
}
.epl-sb-counter-controls {
        display: flex;
        flex-direction: column;
}
.epl-sb-minus,
.epl-sb-plus {
        background: #f2f2f2;
        /* border-radius: 4px; */
        border: 1px solid #ddd;
        vertical-align: middle;
        text-align: center;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        height: 1.1em;
        font-size: 1.3em;
        font-weight: bold;
        width: 1.2em;
        cursor: pointer;
        line-height: 1;
}

.epl-search-builder--overlay {
        display: grid;
        place-items: center;
        position: fixed;
        inset: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1;
}

.epl-search-builder__section--popup {
        display: none;

        /*
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.8);
	*/
        background-color: white;
        padding: 20px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        transition: transform 0.3s ease, opacity 0.3s ease;
        opacity: 0;
        border-radius: 6px;
        z-index: 2;
}

.epl-search-builder__section--popup-visible {
        display: block;
        /* transform: translate(-50%, -50%) scale(1); */
        opacity: 1;
}
.epl-search-form .epl-search-row-switch {
        display: inline-flex;
        align-items: center;
        flex: 0 1 auto;
        gap: 0.5em;
}
.epl-search-builder-switch {
        position: relative;
        display: inline-block;
        width: 60px;
        height: 34px;
}
.epl-search-builder-switch input[type=checkbox]{
        opacity: 0;
        width: 0;
        height: 0;
}
input:checked + .epl-search-builder-toggle-switch-slider {
        background-color: #231F20;
}
input:checked + .epl-search-builder-toggle-switch-slider:before {
	-webkit-transform: translateX(26px);
	-ms-transform: translateX(26px);
	transform: translateX(26px);
}
.epl-search-builder-toggle-switch-slider:before {
        position: absolute;
        content: "";
        height: 26px;
        width: 26px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        -webkit-transition: 0.4s;
        transition: 0.4s;
        border-radius: 50%;
    }
.epl-search-builder-toggle-switch-slider {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #ccc;
        -webkit-transition: 0.4s;
        transition: 0.4s;
        border-radius: 34px;
        transform: scale(0.7);
}
@-webkit-keyframes epl-search-builder-animation {
        0% {
                font-size: 1.6em;
        }

        20% {
                font-size: 1.2em;
        }

        40% {
                font-size: 1.6em;
        }

        60% {
                font-size: 1.2em;
        }

        80% {
                font-size: 1.6em;
        }

        100% {
                font-size: 1.2em;
        }
}

@keyframes epl-search-builder-animation {
        0% {
                font-size: 1.6em;
        }

        20% {
                font-size: 1.2em;
        }

        40% {
                font-size: 1.6em;
        }

        60% {
                font-size: 1.2em;
        }

        80% {
                font-size: 1.6em;
        }

        100% {
                font-size: 1.2em;
        }
}
