/**
 * @package         uFramework\CMB2
 * @author          Tsunoa
 * @copyright       Copyright (c) Tsunoa
 */
/* CMB2 */
@media screen and (min-width: 1024px) {
    #postbox-container-2 .cmb-th + .cmb-td {
        max-width: calc( 100% - 230px );
    }
}

/* CMB2 repeatable field inline */
.cmb-type-group.cmb-inline .cmb-group-description {
    border: none;
}

.cmb-type-group.cmb-inline .cmb-group-description .cmb-th {
    padding: 0;
}

.cmb-type-group.cmb-inline .cmb-group-description .cmb-th .cmb2-metabox-description {
    font-weight: normal;
}

.cmb-type-group.cmb-inline .postbox.cmb-repeatable-grouping {
    box-shadow: none;
    border: none;
    border-bottom: 1px solid #e9e9e9;
}

.cmb-type-group.cmb-inline .postbox.cmb-repeatable-grouping .cmb-field-list {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
}

.cmb-type-group.cmb-inline .postbox.cmb-repeatable-grouping > .cmb-remove-group-row,
.cmb-type-group.cmb-inline .postbox.cmb-repeatable-grouping > .cmbhandle,
.cmb-type-group.cmb-inline .postbox.cmb-repeatable-grouping > .cmb-group-title {
    display: none;
}

.cmb-type-group.cmb-inline .postbox.cmb-repeatable-grouping .cmb-field-list .cmb-row {
    padding: 0;
    border: none;
}

.cmb-type-group.cmb-inline .postbox.cmb-repeatable-grouping .cmb-field-list .cmb-row .cmb-th,
.cmb-type-group.cmb-inline .postbox.cmb-repeatable-grouping .cmb-field-list .cmb-row .cmb-td {
    width: 100%;
}

.cmb-type-group.cmb-inline .postbox.cmb-repeatable-grouping .cmb-field-list .cmb-row .cmb-th label {
    padding-top: 0;
}

.cmb-type-group.cmb-inline .cmb-remove-field-row .cmb-remove-row {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    flex-direction: column;
    justify-content: center;

    height: 100%;
}

/* CMB2 radio image */
.cmb-type-radio-image .cmb2-radio-list input[type="radio"]:checked + label {
    border-color: #5ea1ed !important;
}

/* CMB2 in Postbox container 1 */
.columns-2 #postbox-container-1 .cmb-row {
    border: none;
    margin: 0;
}

.columns-2 #postbox-container-1 .cmb-row:last-child {
    padding-bottom: 0;
}

.columns-2 #postbox-container-1 .cmb2-metabox-description {
    padding: 0;
}

.columns-2 #postbox-container-1 input + input.cmb-post-search-ajax {
    height: 28px;
    margin-top: 0;
}

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

.inner-sidebar .cmb2-metabox-title, #side-sortables .cmb2-metabox-title {
    font-size: 1.3em !important;
    font-style: normal !important;
    margin: 0 0 1.3em 0;
}

.inner-sidebar .cmb-row .cmb2-metabox-description, #side-sortables .cmb-row .cmb2-metabox-description {
    padding-bottom: 0.5em !important;
}

.columns-2 #postbox-container-1 .cmb2-wrap select {
    width: 100%;
}

/* CMB2 form on options page */
.cmb2-options-page.cmo-options-page {
    max-width: 100%;
}

.cmb2-options-page.cmo-options-page .cmb2-metabox > .cmb-row {
    border: none;
    box-shadow: none;
}

.cmb2-options-page.cmo-options-page .cmb2-metabox > .cmb-row:not(:first-of-type) {
    border-top: 1px solid #e9e9e9;
}

.cmb2-options-page.cmo-options-page .columns-2 #postbox-container-1 {
    margin-top: 20px;
}

.cmb2-options-page.cmo-options-page .columns-2 #postbox-container-1 .cmb-type-title {
    padding: 0 !important;
    background-color: transparent !important;
}

.cmb2-options-page.cmo-options-page .button[name="reset-cmb"] {
    margin-right: 15px;
}



/* CMB2 form on widgets */
.widget-content .cmb2-wrap.uframework-widget-form .cmb-row {
    margin: 1em 0;
}

.widget-content .uframework-widget-form .cmb-th,
.widget-content .uframework-widget-form .cmb-td {
    padding: 0;
}

.widget-content .uframework-widget-form .cmb-th {
    font-weight: normal;
}

.widget-content .uframework-widget-form .cmb-row:not(.cmb-type-checkbox) .cmb-td {
    width: 100%;
}

.widget-content .cmb2-wrap.uframework-widget-form input[type="text"],
.widget-content .cmb2-wrap.uframework-widget-form textarea,
.widget-content .cmb2-wrap.uframework-widget-form .cmb-repeat-group-field select {
    width: 100%;
    padding: 2px 5px;
    margin: 0;
}

.widget-content .cmb2-wrap.uframework-widget-form .cmb-repeat-group-field select {
    line-height: 14px;
    height: 25px;
}

.widget-content .uframework-widget-form .cmb-order-items {
    width: 100%;
}

/* CMB2 actions */
.cmb2-actions {
    padding: 10px;
    clear: both;
    border-top: 1px solid #ddd;
    background: #f5f5f5;

    text-align: right;

    margin-left: -12px;
    margin-right: -12px;
    margin-bottom: -12px;
}

.cmb2-actions input:first-child {
    float: left;
}

.cmb2-actions input {
    display: inline-block !important;
    margin-top: 0 !important;
}

/* uFramework icon link */
.cmb2-metabox .uframework-icon-link {
    display: block;
    padding: 2px 0;
    font-style: normal;
}

/* Style fixes */
.uframework-preview select {
    height: inherit;
}
