@media (min-width: 320px) {
    .wpdt-cart-modal-overlay {
        position: fixed;
        top: 0;
        left: 0;

        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: 1000;
        justify-content: center;
        align-items: center;
    }

    .wpdt-cart-modal-wrapper {
        position: absolute;
        width: 90%;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: #fff;
        padding: 20px;
        border-radius: 10px;
        display: grid;
        grid-template-rows: 2em auto;
    }

    .wpdt-cart-modal-close-wrapper {
        padding-bottom: 30px;
    }

    .wpdt-cart-modal-overall {
        overflow-y: initial !important;
    }

    .wpdt-cart-modal-content {
        height: calc(100vh - 300px);
        overflow-y: auto;
        margin-bottom: 20px;
        padding: 10px 10px 10px 10px;
    }

    .wpdt-cart-modal-footer {
        display: grid;
        grid-template-columns: auto auto auto auto;
        align-items: center;
        grid-gap: 10px;
    }

    #wpdt-cart-modal-quantity {
        margin-bottom: 0px !important;
    }

    #wpdt-cart-modal-submit {
        background-color: rgb(255, 80, 0);
        color: white;
        border-radius: 5px;
    }

    #wpdt-cart-modal-submit:hover {
        background-color: rgb(255, 120, 0);
    }
}

@media (min-width: 1281px) {
    .wpdt-cart-modal-wrapper {
        width: var(--wpdt-cart-modal-width, 800px);
        max-width: 95vw;
    }

    .wpdt-cart-modal-content {
        height: calc(100vh - 256px);
    }

    .wpdt-cart-modal-footer {
        grid-template-columns: auto auto auto auto;
    }

    #wpdt-cart-modal-submit {
        grid-column: auto;
        padding: 10px 22px;
    }

    #wpdt-cart-modal-submit:hover {
        background-color: rgb(255, 120, 0);
    }
}

.wpdt-cart-modal-content span {
    font-family: var(--wpdt-cart-font, 'Roboto Mono');
}

.wpdt-cart-modal-overlay img {
    transform: translateZ(0);
}

/* Scrolling the table doesn't remove borders in the header, used in combination
 * with the following rule */
#table_1 {
    border-collapse: separate;
}

/* Makes the top of the dataTable sticky (doesn't scroll with the content)
 * The table borders will disappear with this rule, therefore the previous rule
 * is required */
thead {
    position: sticky;
    top: 0;
}

/**
 * Obey scrollbar
 */
.dtfh-floatingparent.dtfh-floatingparenthead {
    padding-right: 32px !important;
}

.wpdt-cart-float-left {
    float: left;
}

.wpdt-cart-float-right {
    float: right;
}

/* The + and x icon buttons at the top of the modal. Everything a theme might
 * style on a <button> is set explicitly. */
.wpdt-cart-modal-top-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    color: #555;
    line-height: 0;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.wpdt-cart-modal-top-button:hover,
.wpdt-cart-modal-top-button:focus-visible {
    background-color: #eee;
    color: #000;
}

#master-details {
    margin-top: 0px !important;
}

h5.category-title {
    font-size: 16px !important;
    font-weight: bold !important;
}

.form-control {
    color: rgb(192, 0, 0) !important;
}

.wpdt-cart-hide-me {
    display: none !important;
}

.wpdt-cart-cart-scroll {
    overflow-x: auto;
}

.wpdt-cart-unselectable {
    user-select: none;
}

.wpdt-cart-cart-table thead th {
    border-style: solid;
    border-width: 1px;
}

.wpdt-cart-cart-table tbody tr:nth-child(odd) {
    background-color: white;
    color: black !important;
}

.wpdt-cart-cart-table tbody tr:nth-child(even) {
    color: black !important;
}

.wpdt-cart-cart-table th,
.wpdt-cart-cart-table td {
    vertical-align: middle;
    white-space: nowrap;
}

.wpdt-cart-quantity-container {
    display: grid;
    grid-template-columns: 25px 60px 25px;
    grid-gap: 2px;
}

.wpdt-cart-button {
    background-color: rgb(0, 150, 255);
    color: white;
    border-radius: 5px;
    border: none;
    padding: 10px 22px;
    margin-bottom: 20px;
}

.wpdt-cart-button:hover {
    background-color: rgb(0, 200, 255);
    cursor: pointer;
}

.wpdt-cart-no-scroll {
    height: 100vh;
    width: 100vw;
    touch-action: none;
    -webkit-overflow-scrolling: none;
    overflow: hidden;
    overscroll-behavior: none;
}

/* Color the SKU column blue, with underline */
#table_1 td.column-sku {
    color: #0070c0 !important;
    text-decoration: underline;
    cursor: pointer;
}

.wpdt-cart-clickable {
    color: #0070c0 !important;
    text-decoration: underline;
    cursor: pointer;
}

.wpdt-cart-clickable:hover {
    color: #54b5ff !important;
}

.wpdt-cart-hoverable:hover {
    cursor: pointer;
}

.wpdt-cart-text {
    line-height: 13px !important;
    margin-bottom: 0px !important;
    background-color: #ffffff !important;
    min-height: auto !important;
}

textarea.wpdt-cart-text {
    min-width: 175px;
}

[disabled].wpdt-cart-text {
    background-color: #f8f8f8 !important;
}

.wpdt-cart-remarks-container {
    display: grid;
    grid-template-columns: auto 25px;
    align-items: center;
    grid-gap: 5px;
}

.wpdt-cart-error-message-container {
    align-items: center;
    display: flex;
    background-color: #fdf3f1;
    margin-top: 5px;
    border: 1px solid #d13212 !important;
    animation: fadeIn 1s;
}

.wpdt-cart-error-message {
    font-size: 12px;
    color: black;
    float: left;
    padding: 4px 4px 4px 8px;
}

.wpdt-cart-clickable-img {
    height: 50px;
}

.wpdt-cart-clickable-img:hover {
    cursor: pointer;
}

.wpdt-cart-filled {
    background-color: #f3e0df !important;
}

.wpdt-c td {
    font-size: 14px !important;
    font-family: var(--wpdt-cart-font, 'Roboto Mono');
}

.wdtscroll {
    max-height: var(--wpdt-cart-table-scroll-height, 57vh);
    overflow: auto;
}

h2.wpdt-c {
    font-size: var(--wpdt-cart-title-font-size, 14px) !important;
    line-height: 1em;
    margin-bottom: 0;
}

/* Spinning loader graphic */
.loader {
    width: 24px;
    height: 24px;
    border: 5px solid #fff;
    border-bottom-color: #ff3d00 !important;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
