/**
 * CMB2 Extension Global Styling
 * Copyright (c) 2019
 * Licensed GPLv2+
 */

/* ==========================================================================
   Ajax Search
   ========================================================================== */

.autocomplete-suggestions {
    border: 1px solid #DDD;
    background: #FFF;
    overflow: auto;
    box-sizing: border-box;
}

.autocomplete-suggestion {
    padding: 5px 5px;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
}

.autocomplete-no-suggestion {
    padding: 5px 5px;
    white-space: nowrap;
    overflow: hidden;
}

.autocomplete-selected {
    background: #F0F0F0;
}

.autocomplete-suggestions strong {
    font-weight: normal;
    color: #3399FF;
}

.autocomplete-group {
    padding: 2px 5px;
}

.autocomplete-group strong {
    display: block;
    border-bottom: 1px solid #000;
}

input.cmb-ext-ajax-search {
    width: 25em;
}

.cmb-ext-ajax-search-results {
    width: 25em;
    padding: 0 1px;
    box-sizing: border-box;
    margin-bottom: 5px;
}

.cmb-ext-ajax-search-results li {
    margin: 0;
    border-bottom: 1px solid #f4f4f4;
    padding: 7px 5px;
    background: #fff;
}

.cmb-ext-ajax-search-results li:last-child {
    border-bottom: none;
}

.cmb-ext-ajax-search-results li span.hndl {
    font-size: 13px;
    line-height: 16px;
    color: #ccc;
    margin: 0 8px 0 0;
    height: 16px;
    cursor: s-resize;
}

.cmb-ext-ajax-search-results li span.hndl:before {
    content: '\2807';
}

.cmb-ext-ajax-search-results li a.edit-link {
    color: #333;
    text-decoration: none;
}

.cmb-ext-ajax-search-results li a.edit-link:hover {
    color: #00a0d2;
    text-decoration: underline;
}

.cmb-ext-ajax-search-results li a.remover {
    float: right;
    cursor: pointer;
    color: #ccc;
}

.cmb-ext-ajax-search-results li a.remover span {
    height: 16px;
    line-height: 16px;
    font-size: 14px;
}

.cmb-ext-ajax-search-results li a.remover span.dashicons-dismiss {
    display: none;
}

.cmb-ext-ajax-search-results li a.remover:hover {
    color: #C00;
}

.cmb-ext-ajax-search-results li a.remover:hover span.dashicons-dismiss {
    display: inline-block;
}

.cmb-ext-ajax-search-results li a.remover:hover span.dashicons-no {
    display: none;
}

.cmb-ext-ajax-search-results .ui-state-highlight {
    background: #f4f4f4;
}

.cmb-ext-ajax-search-spinner {
    position: absolute;
    margin: 9px 0 0 -25px;
    width: 15px;
    display: none;
}

.columns-2 #postbox-container-1 .cmb-ext-ajax-search-spinner {
    right: 25px;
    margin: -23px 0 0 0;
}

#side-sortables .cmb2-wrap input + input.cmb-ext-ajax-search {
    margin-top: 1px;
}

/* Fix extra margin from CMB2 */

/* Repeatable groups */
.cmb-repeatable-group .cmb-type-post-ajax-search .cmb-td, .cmb-repeatable-group .cmb-type-user-ajax-search .cmb-td, .cmb-repeatable-group .cmb-type-term-ajax-search .cmb-td {
    position: relative;
}

.cmb-repeatable-group .cmb-ext-ajax-search-spinner {
    position: absolute;
    top: 50%;
    right: 10px;
    margin: -7px 0 0 0;
}

/* ==========================================================================
   unit Selector
   ========================================================================== */

.cmb-ext-unit-field {
    display: inline-block;
    width: 55px;
}

.cmb-ext-unit-field .cmb-ext-unit-select {
    margin-top: 0;
    vertical-align: baseline;
}

/* ==========================================================================
   Content Wrap Style Editor
   ========================================================================== */

.cmb-ext-content-wrap-field {
    display: inline-block;
    width: 55px;
}

.cmb-ext-content-wrap-field .cmb-ext-content-wrap-select {
    margin-top: 0;
    vertical-align: baseline;
}

.cmb-ext-content-wrap-field.cmb-ext-content-wrap-field-switch {
    width: 30px;
}

.cmb-ext-content-wrap-field-switch .button {
    vertical-align: baseline !important;
    padding: 0 5px 1px !important;
}

.cmb-ext-content-wrap-field-switch .button .dashicons {
    vertical-align: middle;
}

.cmb-ext-content-wrap-multiple .cmb-ext-content-wrap-field-all {
    display: none;
}

.cmb-ext-content-wrap-single .cmb-ext-content-wrap-field-top,
.cmb-ext-content-wrap-single .cmb-ext-content-wrap-field-right,
.cmb-ext-content-wrap-single .cmb-ext-content-wrap-field-bottom,
.cmb-ext-content-wrap-single .cmb-ext-content-wrap-field-left {
    display: none;
}

/* ==========================================================================
   Animation Selector
   ========================================================================== */

.cmb-ext-animation-preview-button, .cmb-ext-animation-preview-text {
    margin-left: 6px !important;
    margin-top: 2px !important;

    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.cmb-ext-animation-preview-button {
    padding: 2px 6px 2px 8px !important;
}

.cmb-ext-animation-preview-button .dashicons{
    vertical-align: middle;
}

.cmb-ext-animation-preview-text {
    display: inline-block;
    padding: 4px 0;
}

/* ==========================================================================
   Order Field
   ========================================================================== */

.cmb-ext-order-items {
    width: 30em;
    padding: 0 1px;
    box-sizing: border-box;
    margin-bottom: 5px;
}

.cmb-ext-order-items li {
    margin: 0;
    border-bottom: 1px solid #f4f4f4;
    background: #fff;
}

.cmb-ext-order-items:not(.cmb-ext-order-inline) li:last-child {
    border-bottom: none;
}

.cmb-ext-order-items li span {
    display: block;
    padding: 7px 5px;
    cursor: n-resize;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.cmb-ext-order-items .ui-state-highlight {
    background: #f4f4f4;
}

.columns-2 #postbox-container-1 .cmb-ext-order-items:not(.cmb-ext-order-inline) {
    width: 100%;
}

.cmb-ext-order-items.cmb-ext-order-inline {
    padding: 0;
}

.cmb-ext-order-items.cmb-ext-order-inline li {
    display: inline-block;
    border: 1px solid #f4f4f4;
    padding: 0;
}

.cmb-ext-order-items.cmb-ext-order-inline li:not(:last-child) {
    border-right: 0;
}

.cmb-ext-order-items.cmb-ext-order-inline li span {
    cursor: move;
    padding: 7px 10px;
    white-space: nowrap;
}

.cmb-ext-order-items.cmb-ext-order-inline .ui-state-highlight {
    display: inline-block;
    margin: 0;
    vertical-align: bottom;
}

/* ==========================================================================
   Image Select
   ========================================================================== */

.cmb-type-image-select .cmb-image-select-list {
    margin: 0 !important;
}

.cmb-type-image-select .cmb-image-select-list .cmb-image-select input[type="radio"] {
    display: none;
}

.cmb-type-image-select .cmb-image-select-list .cmb-image-select {
    display: inline-block;
    margin: 0 10px 3px;
    min-width: 80px;
    padding: 2px 15px 2px 0;
    text-align: center;
}

.cmb-type-image-select .cmb-image-select-list .cmb-image-select:first-child {
    margin-left: 0
}

.cmb-type-image-select .cmb-image-select-list .cmb-image-select img {
    border: 4px solid #F1F1F1;
}

.cmb-type-image-select .cmb-image-select-list .cmb-image-select.cmb-image-select-selected img {
    border-color: #005077;
}

/* ==========================================================================
   Switch Button
   ========================================================================== */

.cmb-ext-switch {
    position: relative;
    display: inline-block;
    width: 49px;
    height: 23px;
}

.cmb-ext-switch input {
    display: none;
}

.cmb-ext-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.cmb-ext-slider:before {
    position: absolute;
    content: "";
    height: 17px;
    width: 17px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .cmb-ext-slider {
    background-color: #2196F3;
}

input:focus + .cmb-ext-slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .cmb-ext-slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Rounded sliders */
.cmb-ext-slider.round {
    border-radius: 34px;
}

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

/* ==========================================================================
   Button set
   ========================================================================== */

.cmb2-ext-buttonset {
    margin-right: 20px;
}

.cmb2-ext-buttonset .state-default {
    background-color: #f5f5f5;
    background-image: none !important;
    border-color: #bfbfbf;
    border-image: none;
    border-style: solid;
    border-width: 1px;
    box-shadow: none !important;
    color: #707070;
    font-size: 13px;
    font-weight: normal;
    line-height: normal;
    overflow: visible;
    transition: background-image 0.1s linear 0s;
    vertical-align: middle;
}

.cmb2-ext-buttonset label.cmb2-ext-buttonset-label:nth-child(2) {
    border-bottom-left-radius: 4px;
    border-top-left-radius: 4px;
}

.cmb2-ext-buttonset label.cmb2-ext-buttonset-label:nth-last-child(1) {
    border-bottom-right-radius: 4px;
    border-top-right-radius: 4px;
}

.cmb2-ext-buttonset .cmb2-ext-buttonset-label {
    cursor: pointer;
    display: inline-block;
    font-size: 13px;
    line-height: normal;
    padding: 6px 12px;
    margin-left: 0;
    margin-right: -4px;
}

.cmb2-ext-buttonset .cmb2-ext-buttonset-label .buttonset-text {
    display: block;
}

.cmb2-ext-buttonset .cmb2-ext-buttonset-label.selected {
    background-color: #004a97 !important;
    background-image: none !important;
    border-color: #005077 !important;
    box-shadow: none !important;
    color: #fff !important;
}

.cmb2-ext-buttonset .cmb2-ext-buttonset-item {
    border: 0 none;
    clip: rect(0px, 0px, 0px, 0px);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    overflow-wrap: normal !important;
    padding: 0;
    position: absolute;
    width: 1px;
}
