
/* == Attachment Fields == */

body.eml-media-css .term-list {
    background-color: #fff;
    border: 1px solid #dfdfdf;
    border-radius: 3px;
    padding: 10px 10px 5px;
    margin: 10px 0;
}
body.eml-media-css .term-list li {
    line-height: 22px;
}
body.eml-media-css .term-list li input[type="checkbox"] {
    margin: -4px 10px 0 0 !important;
}
body.eml-media-css .term-list li input[type=checkbox]:indeterminate:before {
    float: left;
    display: inline-block;
    vertical-align: middle;
    width: 16px;
    font: normal 21px/1 'dashicons';
    speak: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    content: '\f147';
    margin: -3px 0 0 -4px;
    color: #CBCBCB;
}
body.eml-media-css .term-list .children {
    margin: 5px 0 0 20px;
}

body.eml-media-css .compat-item .eml-tax-label {
    width: 100%;
    float: none;
    text-align: left;
}
body.eml-media-css .compat-item .eml-tax-label span {
    text-align: left;
}
body.eml-media-css .compat-item .eml-tax-field {
    width: 100%;
    float: none;
}



/* == ACF Attachment Fields == */

body.eml-media-css .compat-attachment-fields > tbody > .acf-field {
    margin: 5px 0;
}
body.eml-media-css .compat-attachment-fields > tbody > .acf-field > .acf-label {
    min-width: 30%;
    margin: 0;
    padding: 0;
    text-align: right;
    display: block;
    float: left;
}
body.eml-media-css .compat-attachment-fields > tbody > .acf-field > .acf-label > label {
    padding-top: 6px;
    margin: 0;
    color: #666666;
    font-weight: 400;
    line-height: 16px;
}
body.eml-media-css .compat-attachment-fields > tbody > .acf-field > .acf-input {
    width: 65%;
    margin: 0;
    padding: 0;
    float: right;
    display: block;
}
/* == TODO: look deeper into this one == */
body.eml-media-css .compat-field-acf-form-data, 
body.eml-media-css .compat-field-acf-blank {
    display: none !important;
}



/* == Grid Mode == */

.media-frame.mode-eml-grid .attachments-browser .media-toolbar-secondary {
    max-width: none;
}

.media-frame.mode-eml-grid .media-toolbar select {
    margin: 8px 10px 8px 0;
}

.media-frame.mode-eml-grid.mode-edit .media-toolbar-secondary .media-button {
    margin: 8px 10px 8px 0;
    vertical-align: middle;

    opacity: 1;
    visibility: visible;
    -webkit-transition: visibility 0.2s linear, opacity 0.2s linear;
    -moz-transition: visibility 0.2s linear, opacity 0.2s linear;
    -o-transition: visibility 0.2s linear, opacity 0.2s linear;
}

.media-frame.mode-eml-grid.mode-edit .media-toolbar-secondary .media-button.hidden {
    display: none;
    opacity: 0;
    visibility: hidden;
}

.media-frame.mode-eml-grid.mode-edit .media-toolbar-secondary .search {
    margin: 8px 0 8px 0;
    padding: 3px 5px;
    max-width: 100%;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.5;
    vertical-align: middle;
}



/* == EML Grid == */

body.upload-php.eml-grid #wpfooter {
    display: none;
}
body.upload-php.eml-grid #wpbody  {
    position: fixed;
    top: 32px;
    bottom: 0;
    left: 165px;
    right: 0;
    height: auto;
}
body.upload-php.eml-grid.folded #wpbody {
    left: 40px;
}
@media only screen and (max-width: 960px) {

    body.upload-php.eml-grid.auto-fold #wpbody {
        left: 40px;
    }
}
@media only screen and (max-width: 782px) {

    body.upload-php.eml-grid #wpbody,
    body.upload-php.eml-grid.folded #wpbody,
    body.upload-php.eml-grid.auto-fold #wpbody {
        left: 0;
        top: 46px;
    }
}
body.upload-php.eml-grid #wpbody-content {
    padding: 0;
    float: none;
    height: 100%;
}
@media only screen and (max-width: 960px) {

    body.upload-php.eml-grid #wpbody-content {
        float: left;
    }
}
body.upload-php.eml-grid #wpbody-content > .wrap {
    position: absolute;
    left: 15px;
    top: 0;
    right: 0;
    bottom: 0;
}
body.upload-php.eml-grid #wpbody-content > #screen-meta-links,
body.upload-php.eml-grid #wpbody-content > #screen-meta {
    position: relative;
    z-index: 999;
}


.eml-grid .wrap .notice,
.eml-grid .wrap div.updated,
.eml-grid .wrap div.error {
	z-index: 20;
	position: relative;
}
.media-frame.mode-eml-grid {
    top: 50px;
    z-index: 10;
}
.media-frame.mode-eml-grid .media-frame-title,
.media-frame.mode-eml-grid .media-frame-menu {
    display: none;
}
.media-frame.mode-eml-grid .media-frame-content {
    top: 0;
    bottom: 60px;
    border: none;
    background: none;
    overflow: hidden;
}
.media-frame.mode-eml-grid .attachments-browser {
    position: absolute;
    left: 0;
    top: 71px;
    right: 0;
    bottom: 0;
    width: auto;
    height: auto;
    border: 1px solid #ddd;
    border-right: 0;
    background: #fff;
    overflow: visible;

    -webkit-transition: all 0.2s;
    -moz-transition: all 0.2s;
    -o-transition: all 0.2s;
    -ms-transition: all 0.2s;
    transition: all 0.2s;
}
.media-frame.mode-eml-grid .attachments-browser .media-toolbar {
    left: -1px;
}
.media-frame.mode-eml-grid .attachments-browser .media-toolbar.wp-filter select {
    font-size: 14px;
}
.media-frame.mode-eml-grid .attachments-browser .attachments,
.media-frame.mode-eml-grid .attachments-browser .uploader-inline {
    top: 0;
}

/* a fix for infinite scroll */
.attachments-browser:not(.has-load-more) .attachments {
    position: static;
}
.attachments-browser.has-load-more .attachments-wrapper,
.attachments-browser:not(.has-load-more) .attachments-wrapper {
    position: absolute;
    top: 72px;
    right: 300px;
    left: 0;
    bottom: 0;
    overflow: auto;
    outline: none;
}

.media-frame.mode-eml-grid .attachments-browser .attachments-wrapper,
.media-frame.mode-eml-grid .attachments-browser .attachments {
    -webkit-transition: all 0.2s;
    -moz-transition: all 0.2s;
    -o-transition: all 0.2s;
    -ms-transition: all 0.2s;
    transition: all 0.2s;
}
.media-frame.mode-eml-grid .attachments-browser .attachments {
    padding: 8px;
}
.media-frame.mode-eml-grid .delete-attachment,
.media-frame.mode-eml-grid .trash-attachment,
.media-frame.mode-eml-grid .untrash-attachment {
    color: #bc0b0b;
}
.media-frame.mode-eml-grid .delete-attachment:hover,
.media-frame.mode-eml-grid .delete-attachment:focus,
.media-frame.mode-eml-grid .trash-attachment:hover,
.media-frame.mode-eml-grid .trash-attachment:focus,
.media-frame.mode-eml-grid .untrash-attachment:hover,
.media-frame.mode-eml-grid .untrash-attachment:focus {
    color: #ff0000;
}
.media-frame.mode-eml-grid .attachments-browser .uploader-inline {
    position: absolute;
    top: 10px;
    right: 310px;
    left: 10px;
    bottom: auto;
    padding: 0;
    margin: 0;
    border: 4px dashed #bbb;
    background-color: #fff;
}
@media only screen and (max-width: 900px) {

    .media-frame.mode-eml-grid .attachments-browser .uploader-inline {
        right: 272px;
    }
}
@media only screen and (max-width: 640px), screen and (max-height: 400px) {

    .media-frame.mode-eml-grid .attachments-browser .uploader-inline {
        right: 10px;
    }
}
.media-frame.mode-eml-grid .uploader-inline-content {
    position: static;
    margin-top: 30px;
}
.media-frame.mode-eml-grid .attachments-browser .no-media {
    text-align: center;
    font-size: 20px;
    line-height: 28px;
    font-weight: 400;
    padding: 40px 0 0;
    margin: 0 300px 0 0;
    color: #777;
}



/* == Media Selection == */

.media-frame-toolbar .media-toolbar {
    bottom: -60px;
    height: 60px;
}
.media-frame.mode-eml-grid .media-frame-toolbar {
    bottom: 0;
    height: 60px;
}
.media-frame .media-frame-toolbar .media-toolbar-primary {
    position: relative;
    width: auto;
    min-height: 45px;
}
.media-frame.mode-eml-grid .media-frame-toolbar .media-toolbar {
    padding: 0;
    bottom: 0;
    height: 60px;
}
.media-frame.mode-eml-grid .media-frame-toolbar .media-toolbar-secondary {
    float: none;
    position: absolute;
    right: 320px;
    left: 0;
}
.media-frame.mode-eml-grid .media-frame-toolbar .media-toolbar-secondary .media-button {
    float: left;
    margin: 10px 10px 0 0;
}
.media-frame.mode-eml-grid .media-frame-toolbar .media-toolbar-secondary .media-selection {
    position: relative;
}
.media-frame.mode-eml-grid .media-frame-toolbar .media-toolbar-secondary .media-selection:after {
    background-image: none;
}

@media only screen and (max-width: 640px) {

    .media-frame.mode-eml-grid .media-frame-toolbar .media-toolbar-primary {
        display: none;
    }
}



/* == Single Attachment Inline Toolbar == */

.eml-attacment-inline-toolbar {
    position: absolute;
    z-index: 10;
    left: 7px;
    top: 7px;

    -webkit-transition: all 0.2s;
    -moz-transition: all 0.2s;
    -o-transition: all 0.2s;
    -ms-transition: all 0.2s;
    transition: all 0.2s;

    visibility: hidden;
    opacity: 0;
}
.js--select-attachment:hover .eml-attacment-inline-toolbar {
    visibility: visible;
    opacity: 1;
}
.eml-attacment-inline-toolbar i {
    margin: 0 5px 0 0;
    padding: 2px;
    width: 24px;
    height: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    background-color: #000;
    background-color: rgba(0,0,0,0.9);
    cursor: pointer;
    color: white;
    font-size: 24px;
    line-height: 24px;
}
.eml-attacment-inline-toolbar i:hover {
    box-shadow: 0 1px 3px rgba(0,0,0,0.8);
    background-color: #000;
    color: #2ea2cc;
}



/* == Attachment(s) Details == */

body.eml-media-css .attachment-details {
    overflow-y: hidden;
}

.media-sidebar .eml-toggle-collapse {
    text-decoration: none;
    height: 14px;
    line-height: 14px;
    border-radius: 10px;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
    padding: 3px 10px;
    background: #fff;
    display: inline-block;
    margin: 10px 0 0;
}

.media-sidebar h3, 
.image-details .media-embed h3 {
    position: relative;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    color: #646970;
    margin: 24px 0 8px;
}

.media-sidebar .setting label {
    width: 80px;
    text-align: left;
}
.media-sidebar .setting select {
    box-sizing: border-box;
    margin: 1px;
    font-size: 13px;
}

.media-sidebar ul.eml-filter-based {
    margin: 0;
}
.media-sidebar ul.eml-filter-based li {
    font-size: 13px;
    color: #646970;
}
.media-sidebar .eml-filter-based label {
    font-size: 12px;
}




/* == Attachment(s) Details Saving Styles == */

.media-frame .media-frame-toolbar .button.button-large {
    float: right;
}

.media-frame .media-frame-toolbar #eml-save-changes-button {
    float: right;
}
.media-frame .media-frame-toolbar #eml-save-changes-button {
    margin: 14px 0 0 10px;

}
.media-frame .media-frame-toolbar #eml-save-changes-message {
    white-space: nowrap;
    float: right;
    margin: 10px 0 0 0;
    display: none;
}



/* == Media Popup Positions == */

body.eml-media-css .attachments-browser .media-toolbar {
    height: auto;
}

body.eml-media-css .attachments-browser .media-toolbar-secondary {
    max-width: none;
    width: auto;
}

body.eml-media-css .media-modal-content .media-frame select.attachment-filters {
    width: auto;
    max-width: calc(48% - 12px);
    margin-right: 10px;
    margin-top: 10px;
    vertical-align: middle;
    line-height: 28px;
    height: 28px;
}

/* duplicate from the core for Elementor, temp solution */
.media-modal.wp-core-ui select {
    font-size: 14px;
    line-height: 2;
    -webkit-appearance: none;
     background: #fff url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E) no-repeat right 5px top 55%; 
     background-size: 16px 16px; 
     padding: 0 18px 0 8px;
     padding-inline: 8px 18px !important;
}
.media-modal.wp-core-ui select:hover {
    color: #2271b1;
}

body.eml-media-css .attachments-browser .media-toolbar-secondary > .media-button {
    margin: 10px 10px 0 0;
    vertical-align: middle;
}

body.eml-media-css .media-modal-content .attachments-browser .search {
    width: auto;
    vertical-align: middle;
    padding: 6px 8px;
    margin-top: 10px;
}

@media only screen and (max-width: 900px) {

    body.eml-media-css .media-modal-content .attachments-browser .search {
    float: none;
    }
}



/* == Spinners == */

body.eml-media-css .media-frame .spinner {
    margin-top: 0;
}
.media-frame .attachments-browser .media-toolbar .spinner {
    float: none;
    position: absolute;
}
.media-frame.mode-eml-grid .attachments-browser .media-toolbar .spinner {
    top: 15px;
    right: 5px;
}
.media-modal-content .media-frame .attachments-browser .media-toolbar .spinner {
    right: 10px;
    top: 14px;
}



/* == Gallery, Playlist :: Edit :: Classic Editor == */
/* == a problem since wp 5 == */
/* == TODO: look deeper into this == */

body.eml-media-css .media-menu .media-menu-item.hidden {
    display: none !important;
}
