/* ===============================
   GLOBAL LOADER
   =============================== */

#tpg_reporting_loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.35);
}

#tpg_reporting_loader .box {
    min-width: 280px;
    max-width: 520px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0,0,0,.25);
    padding: 18px 18px 14px;
    font-family: inherit;
}

#tpg_reporting_loader .row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    text-align: center;
}

#tpg_reporting_loader .spinnerImg {
    width: 44px;
    height: 44px;
    object-fit: contain;
    display: block;
}

#tpg_reporting_loader .title {
    font-weight: 600;
    margin: 0 0 2px;
    font-size: 14px;
    line-height: 1.2;
}

#tpg_reporting_loader .msg {
    margin: 0;
    font-size: 13px;
    opacity: .85;
    line-height: 1.35;
    word-break: break-word;
}


/* ===============================
   MODAL & LAYOUT
   =============================== */

#partEditorModal .modal-dialog {
    max-width: 1100px;
}

#partEditorModal .table-responsive {
    overflow: visible !important;
}

#pe_example_container,
#pe_preview_container {
    max-height: 340px;
    overflow: auto;
}


/* ===============================
   BOOTSTRAP SELECT FIXES
   =============================== */

.bs-container,
.bs-container .dropdown-menu {
    z-index: 200000 !important;
}

.bootstrap-select .dropdown-menu {
    z-index: 200000 !important;
}

.bootstrap-select.form-control-sm > .dropdown-toggle.btn {
    padding: 3px 8px !important;
    font-size: 14px !important;
    line-height: 1.5;
    border-radius: .2rem;
}

.bootstrap-select > .dropdown-toggle.btn {
    padding: 6.5px 12px !important;
}


/* ===============================
   FILTER TABLE (STRak BI-STYLE)
   =============================== */

#pe_filters_table th {
    font-size: 12px;
    text-transform: uppercase;
    color: #6b7280;
    padding: 6px 8px;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

#pe_filters_table td {
    padding: 6px 8px !important;
    vertical-align: middle !important;
    white-space: nowrap;
}

#pe_filters_table tr {
    background: #fff;
}

#pe_filters_table tr + tr {
    border-top: 1px solid #f0f0f0;
}

#pe_filters_table select,
#pe_filters_table input {
    height: 30px;
    font-size: 13px;
}

#pe_filters_table .btn {
    height: 28px;
    padding: 2px 8px;
    line-height: 1.2 !important;
}

#pe_filters_table .pe-date-append .btn.dropdown-toggle,
#pe_filters_table .pe-date-row-append .btn
{
    border-width: 1px !important;
    border-color: #ced4da;
    height: 30px;
    padding: 2px 8px;
    line-height: 0px !important;
}

button[data-id="pe_sort_column"] {
    padding-top: 5px !important;
}


/* ===============================
   FILTER VALUE CONTAINERS
   =============================== */

.pe_val_single,
.pe_val_between {
    width: 100%;
}

.pe_val_between .form-row {
    gap: 8px;
}


/* ===============================
   DATE FILTER UI
   =============================== */

.pe-date-group .form-control {
    font-family: monospace;
    font-size: 12px;
}

.pe-date-append .btn {
    height: 28px;
    padding: 2px 6px;
    line-height: 1.2;
    font-size: 12px;
}

.pe-date-menu .dropdown-item {
    font-size: 12px;
    padding: 4px 10px;
}


/* ===============================
   DELETE BUTTON
   =============================== */

.btn-link.text-danger {
    font-size: 18px;
    line-height: 1;
}

.pe-grid-row td {
    background: #fff;
    border-top: 1px solid #e5e7eb;
}

.pe-grid-row:hover td {
    background: #f9fafb;
}

.pe-grid-input {
    border: 1px solid #d1d5db;
    background: #fff;
    font-size: 12px;
}

.pe-grid-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37,99,235,.15);
}

.pe-grid-delete {
    opacity: .45;
}

.pe-grid-delete:hover {
    opacity: 1;
}

#pe_example_container {
    overflow: auto;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

#pe_example_container table {
    /* Compact look */
    font-size: 0.85rem;
    line-height: 1.1;

    /* Let the table grow to fit headers; container will scroll */
    width: max-content;
    min-width: 100%;
    table-layout: auto;
    margin: -10px;
}

/* Compact padding for all cells */
#pe_example_container thead th,
#pe_example_container tbody td {
    padding: 0.15rem 0.4rem;
}

#pe_example_container thead th {
    white-space: nowrap;
    overflow: visible;
    text-overflow: unset;
    vertical-align: middle;
}

#pe_example_container tbody td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    /* Tune: max width per cell before clipping */
    max-width: 280px;
}

#pe_example_container tbody td.pe-clipped {
    text-decoration: underline dotted;
    text-underline-offset: 2px;
    cursor: help;
}

/* Horizontal zebra striping (rows) */
#pe_example_container tbody tr:nth-child(odd) {
    background-color: #f9fafb;
}

#pe_example_container tbody tr:nth-child(even) {
    background-color: #ffffff;
}

/* Vertical zebra striping (columns) - body only (keep header fully opaque) */
#pe_example_container tbody td:nth-child(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Grid lines for maximum data-grid feel */
#pe_example_container table {
    border-collapse: separate;
    border-spacing: 0;
}

#pe_example_container thead th {
    border-bottom: 2px solid #dee2e6;
}

#pe_example_container tbody td {
    border-bottom: 1px solid #e5e7eb;
}

#pe_example_container tbody td:not(:last-child),
#pe_example_container thead th:not(:last-child) {
    border-right: 1px solid #e5e7eb;
}

/* Sticky header for extra grid vibes (optional but 🔥) */
#pe_example_container thead th {
    position: sticky;
    top: -8px;
    background-color: #f3f4f6 !important; /* solid header background (must be opaque) */
    background-clip: padding-box;
    z-index: 10;
    padding: 4px 6px;

}

/* Optional: subtle shadow so you can see the header edge while scrolling */
#pe_example_container thead {
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.06);
}

.report-column-item {
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 2px;
    background: #f8f9fa;
}

#SelectedColumns li.report-column-item-custom {
    background: #f4f7ff;           /* zacht blauw/grijs */
    border-color: #d9e4ff;         /* iets donkerdere rand */
}

.pe-col-label {
    display: inline-flex;
    align-items: center;          /* verticaal centreren badge + tekst */
}

/* Relation badge zelf */
.pe-rel-badge {
    display: inline-flex;
    align-items: center;
    margin-right: 0.5rem;         /* ruimte tussen badge en tekst */
    line-height: 1;               /* voorkomt hoge “blokjes” */
    padding: 0.25rem 0.55rem;     /* iets minder plomp dan default mag gewoon tuned worden */
    font-size: 0.75rem;           /* ongeveer standaard badge/grootte */
    border-radius: 999px;         /* pill-stijl */
}

/* Voor de zekerheid: tekst wit houden, ook bij overrides */
.pe-rel-badge,
.pe-rel-badge.text-white {
    color: #fff !important;
}