.rbp-dxc-viewer {
    --rbp-dxc-ink: #162335;
    --rbp-dxc-muted: #617080;
    --rbp-dxc-line: #d8dee4;
    --rbp-dxc-panel: #f7f8f9;
    --rbp-dxc-accent: #c45120;
    --rbp-dxc-header-bg: #263746;
    --rbp-dxc-header-text: #fff;
    --rbp-dxc-row-alt: #fafbfc;
    --rbp-dxc-good: #167543;
    color: var(--rbp-dxc-ink);
    box-sizing: border-box;
    container-type: inline-size;
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--rbp-dxc-line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    font-size: 15px;
    line-height: 1.4;
}

.rbp-dxc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--rbp-dxc-line);
}

.rbp-dxc-header h2 {
    margin: 0;
    color: var(--rbp-dxc-ink);
    font-size: 21px;
    line-height: 1.25;
    letter-spacing: 0;
}

.rbp-dxc-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 24px;
    padding: 10px 14px;
    color: var(--rbp-dxc-header-text);
    background: var(--rbp-dxc-header-bg);
    cursor: pointer;
    list-style: none;
}

.rbp-dxc-summary::-webkit-details-marker {
    display: none;
}

.rbp-dxc-summary::before {
    content: "\25B6";
    flex: 0 0 auto;
    font-size: 11px;
    line-height: 1;
    transition: transform 0.15s ease;
}

.rbp-dxc-collapsible[open] > .rbp-dxc-summary {
    border-bottom: 1px solid var(--rbp-dxc-line);
}

.rbp-dxc-collapsible[open] > .rbp-dxc-summary::before {
    transform: rotate(90deg);
}

.rbp-dxc-summary-title {
    flex: 1 1 auto;
    color: inherit;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
}

.rbp-dxc-summary .rbp-dxc-status {
    color: inherit;
}

.rbp-dxc-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--rbp-dxc-muted);
    white-space: nowrap;
}

.rbp-dxc-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #8995a1;
}

.rbp-dxc-status.is-connected .rbp-dxc-status-dot {
    background: var(--rbp-dxc-good);
}

.rbp-dxc-status.is-error .rbp-dxc-status-dot {
    background: #b32d2e;
}

.rbp-dxc-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
    padding: 12px 16px;
    background: var(--rbp-dxc-panel);
    border-bottom: 1px solid var(--rbp-dxc-line);
}

.rbp-dxc-controls label {
    display: flex;
    flex: 0 1 100px;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

.rbp-dxc-controls label > span {
    color: var(--rbp-dxc-muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    text-transform: uppercase;
}

.rbp-dxc-controls .rbp-dxc-provider-field {
    flex-basis: 150px;
}

.rbp-dxc-controls .rbp-dxc-call-label {
    flex: 1 1 170px;
}

.rbp-dxc-controls select,
.rbp-dxc-controls input {
    box-sizing: border-box;
    width: 100%;
    min-height: 36px;
    margin: 0;
    padding: 5px 8px;
    border: 1px solid #aeb8c2;
    border-radius: 4px;
    color: var(--rbp-dxc-ink);
    background: #fff;
    font: inherit;
}

.rbp-dxc-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 36px;
    padding: 0;
    border: 1px solid #aeb8c2;
    border-radius: 4px;
    color: var(--rbp-dxc-ink);
    background: #fff;
    cursor: pointer;
    flex: 0 0 40px;
}

.rbp-dxc-refresh:hover,
.rbp-dxc-refresh:focus-visible {
    border-color: var(--rbp-dxc-accent);
    color: var(--rbp-dxc-accent);
}

.rbp-dxc-refresh.is-loading .dashicons {
    animation: rbp-dxc-spin 0.9s linear infinite;
}

.rbp-dxc-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-gutter: stable;
}

.rbp-dxc-table {
    width: 100%;
    min-width: 700px;
    border: 0;
    border-collapse: collapse;
    table-layout: fixed;
}

.rbp-dxc-table th,
.rbp-dxc-table td {
    box-sizing: border-box;
    padding: 7px 6px;
    border: 0;
    border-bottom: 1px solid #e5e9ed;
    text-align: left;
    vertical-align: top;
}

.rbp-dxc-table th {
    color: var(--rbp-dxc-header-text) !important;
    background: var(--rbp-dxc-header-bg);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    text-transform: uppercase;
}

.rbp-dxc-table tbody tr:nth-child(even) {
    background: var(--rbp-dxc-row-alt);
}

.rbp-dxc-table tbody tr:hover {
    background: #fff4ec;
}

.rbp-dxc-table th:nth-child(1),
.rbp-dxc-table td:nth-child(1) {
    width: 67px;
}

.rbp-dxc-table th:nth-child(2),
.rbp-dxc-table td:nth-child(2) {
    width: 116px;
}

.rbp-dxc-table th:nth-child(3),
.rbp-dxc-table td:nth-child(3) {
    width: 90px;
}

.rbp-dxc-table th:nth-child(4),
.rbp-dxc-table td:nth-child(4) {
    width: 62px;
}

.rbp-dxc-table th:nth-child(5),
.rbp-dxc-table td:nth-child(5) {
    width: 92px;
}

.rbp-dxc-table th:nth-child(7),
.rbp-dxc-table td:nth-child(7) {
    width: 66px;
}

.rbp-dxc-dx,
.rbp-dxc-frequency {
    color: var(--rbp-dxc-accent);
    font-weight: 700;
}

.rbp-dxc-dx {
    white-space: nowrap;
}

.rbp-dxc-utc,
.rbp-dxc-frequency,
.rbp-dxc-mode,
.rbp-dxc-source {
    white-space: nowrap;
}

.rbp-dxc-empty {
    margin: 0;
    padding: 28px 16px;
    color: var(--rbp-dxc-muted);
    text-align: center;
}

.rbp-dxc-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 16px;
    color: var(--rbp-dxc-muted);
    background: var(--rbp-dxc-panel);
    font-size: 12px;
}

@keyframes rbp-dxc-spin {
    to {
        transform: rotate(360deg);
    }
}

@container (max-width: 760px) {
    .rbp-dxc-controls {
        gap: 8px;
    }

    .rbp-dxc-controls .rbp-dxc-filter-field {
        flex: 1 1 90px;
    }

    .rbp-dxc-controls .rbp-dxc-call-label {
        flex: 2 1 160px;
    }

    .rbp-dxc-table th,
    .rbp-dxc-table td {
        padding: 6px 5px;
        font-size: 12px;
    }

    .rbp-dxc-table th {
        font-size: 9px;
    }

    .rbp-dxc-footer {
        flex-wrap: wrap;
    }
}

@container (max-width: 460px) {
    .rbp-dxc-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .rbp-dxc-controls {
        align-items: end;
    }

    .rbp-dxc-controls .rbp-dxc-filter-field {
        flex: 1 1 calc(50% - 8px);
    }

    .rbp-dxc-controls .rbp-dxc-call-label {
        flex: 1 1 calc(100% - 48px);
    }

    .rbp-dxc-footer {
        flex-direction: column;
        gap: 3px;
    }
}

@media (max-width: 900px) {
    .rbp-dxc-controls {
        gap: 8px;
    }
}

@media (max-width: 520px) {
    .rbp-dxc-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .rbp-dxc-controls {
        align-items: end;
    }

    .rbp-dxc-footer {
        flex-direction: column;
        gap: 3px;
    }
}
