/**
 * All of the CSS for your admin-specific functionality should be
 * included in this file.
 */

#wpcontent {
    padding-left: 0;
}

/** General setup **/
table td {
    padding: 4px !important;
}

select,
input:not([type="checkbox"]) {
    height: 30px !important;
    font-size: 14px !important;
}

textarea {
    border: solid 1px #8C8F94 !important;
    font-size: 14px !important;
}

.fs-xs {
    font-size: 13px;
}

/** Until here **/



/** Others **/
.required-mark {
    color: red;
}

.inline-block>* {
    display: inline-block;
}

.blocked {
    pointer-events: none;
    opacity: 0.6;
}

.product-filter-container input,
.product-filter-container select {
    width: 100px;
}

.modal-backdrop {
    z-index: 9998 !important;
}

.modal {
    z-index: 9999 !important;
}

.floating-loader {
    position: fixed;
    top: 50%;
    right: 50%;
    transform: translateY(-50%);
    z-index: 10000;
}

/** Until here **/



/** Floating buttons **/
.float-div {
    position: fixed;
    bottom: 30px;
    z-index: 9997 !important;
    font-size: 1.1rem;
}

.float-div-left {
    left: 170px;
    /* Default WP admin menu width */
    transition: left 0.3s ease;
}

body.folded .float-div-left {
    left: 45px;
    /* Collapsed menu width */
}

.float-div-right {
    right: 10px;
}

.float-btn {
    height: 50px !important;
    border-radius: 25px !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/** Until here **/



/** Show on hover **/
.hover-child {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    top: 0;
    right: 0;
}

.hover-parent:hover .hover-child {
    opacity: 1;
    visibility: visible;
}

/** Change the default tr hover color */
#mdspbe-main-table tbody tr {
    --bs-table-hover-bg: rgb(182, 199, 231) !important;
}

/** Until here **/

.cursor-pointer {
    cursor: pointer !important;
}


/** Image selectors **/
.no-image-container {
    width: 100px;
    height: 100px;
    border: 1px solid gray;
    background-color: #FAF0E6;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container {
    width: 100px;
    height: 100px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/** Until here **/


/** Do this to avoid color issues on the notices **/
.alert-success {
    background-color: #D3E7DD !important;
}

.alert-warning {
    background-color: #FEF2CC !important;
}

.alert-danger {
    background-color: #F6D7DA !important;
}

.alert-primary {
    background-color: #D1E2FF !important;
}

.alert-secondary {
    background-color: #E2E3E5 !important;
}

/** Until here **/



/** Sticky columns **/
.sticky-col {
    position: sticky;
    left: 0;
    z-index: 2;
}

.sticky-col:after {
    content: " ";
    height: 100%;
    position: absolute;
    top: 0;
    width: 10px;
    box-shadow: 10px 0 10px -10px rgba(0, 0, 0, 0.3) inset;
    right: -10px;
}

thead.sticky-top {
    box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.3);
}

/** Until here **/


/** Make table columns resizable **/
.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    width: max-content;
    /* Key: allows natural width growth */
}

th,
td {
    border: 1px solid #ccc;
    padding: 8px;
    position: relative;
    min-width: 100px;
}

.resizer {
    position: absolute;
    right: 0;
    top: 0;
    width: 5px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    z-index: 10;
}

.resizing {
    cursor: col-resize;
    user-select: none;
}

/** Until here **/

@media (max-width: 991.98px) {
    .modal-backdrop {
        display: none !important;
        /** Hide this because somethimes it goes over the modal **/
    }
}