/* GutenBookPress Bulk Discount Popup 1.0.0
 * Hide the Discount Rules table in its original place (it is moved into the dialog).
 * Do not change Discount Rules calculation or settings. */

body.single-product .awdr-bulk-customizable-table {
    /* The table is relocated into the dialog; this is a fallback if JS has not run yet. */
}

.gbp-bdp-link-wrap {
    margin: 0.4em 0 0.85em;
    clear: both;
}

.gbp-bdp-open {
    display: inline;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 0.95em;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    line-height: 1.4;
}

.gbp-bdp-open:hover,
.gbp-bdp-open:focus {
    text-decoration: underline;
}

.gbp-bdp-open:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.gbp-bdp-dialog {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
}

.gbp-bdp-dialog.is-open {
    display: block;
}

.gbp-bdp-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.gbp-bdp-panel {
    position: relative;
    box-sizing: border-box;
    width: min(420px, calc(100% - 2rem));
    max-height: calc(100vh - 2rem);
    overflow: auto;
    margin: 10vh auto 0;
    padding: 1.15rem 1.25rem 1.25rem;
    background: #fff;
    color: #222;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.gbp-bdp-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0 0 0.75rem;
}

.gbp-bdp-title {
    margin: 0;
    padding: 0;
    font-size: 1.15em;
    font-weight: 700;
    line-height: 1.3;
    color: #111;
}

.gbp-bdp-close {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    margin: -0.25rem -0.35rem 0 0;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #333;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.gbp-bdp-close:hover,
.gbp-bdp-close:focus {
    background: #f0f0f0;
}

.gbp-bdp-close:focus {
    outline: 2px solid currentColor;
    outline-offset: 1px;
}

.gbp-bdp-dialog .awdr-bulk-customizable-table {
    display: block;
    margin: 0 0 0.85rem;
    overflow-x: auto;
}

.gbp-bdp-dialog .wdr_bulk_table_msg,
.gbp-bdp-dialog #sort_customizable_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
    background: #fff;
}

.gbp-bdp-dialog .wdr_bulk_table_td,
.gbp-bdp-dialog .wdr_bulk_table_thead th,
.gbp-bdp-dialog .wdr_bulk_table_tr td {
    border: 1px solid #ccc;
    padding: 0.4em 0.6em;
    text-align: left;
    vertical-align: middle;
}

.gbp-bdp-dialog .wdr_bulk_table_thead th {
    background: #f4f4f4;
    font-weight: 700;
}

.gbp-bdp-note {
    margin: 0;
    font-size: 0.9em;
    line-height: 1.45;
    color: #333;
}

body.gbp-bdp-open-scroll-lock {
    overflow: hidden;
}

@media (max-width: 600px) {
    .gbp-bdp-panel {
        width: calc(100% - 1.5rem);
        margin: 8vh auto 0;
        padding: 1rem 1rem 1.1rem;
    }
}
