/* Responsive wrapper */
.pd-adt-wrapper {
    width: 100%;
    overflow-x: auto;
    /* Add a little padding to prevent controls from touching the edge */
    padding-right: 8px;
}

/* Table base styles */
.pd-adt-table table,
.pd-adt-table-init {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
    table-layout: auto;
}

/* Header and cell styles */
.pd-adt-table th,
.pd-adt-table td {
    padding: 8px;
    border: 1px solid #ccc;
    background: #fff;
    color: #222;
    text-align: left;
    vertical-align: middle;
    word-break: break-word;
}

/* Header row */
.pd-adt-table thead th {
    background: #2957CB;
    color: #fff;
    font-weight: bold;
}

/* Alternate row striping */
.pd-adt-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

/* Inline editing input */
.pd-adt-table td input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    font-size: inherit;
    padding: 4px;
    border: 1px solid #aaa;
}

/* DataTables integration (if used) */
.dataTables_wrapper .dataTables_filter {
    float: right;
    margin-right: 12px; /* Add space to the right */
    margin-bottom: 16px; /* Adjust value as needed */
}

.dataTables_wrapper .dataTables_filter input {
    margin-left: 0.5em;
    padding: 0.3em 0.8em 0.3em 0.3em; /* Extra right padding for clarity */
    border-radius: 4px;
    border: 1px solid #ccc;
    min-width: 180px;
    box-sizing: border-box;
}

.dataTables_wrapper .dataTables_paginate {
    float: right;
    margin-right: 0;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.3em 0.8em;
    margin: 0 0.2em;
    border-radius: 4px;
    border: 1px solid #2957CB;
    background: #fff;
    color: #2957CB;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #2957CB;
    color: #fff;
}

.dataTables_wrapper .dataTables_info {
    float: left;
    margin-left: 12px;
}

/* Ensure the table always shows its right border */
.pd-adt-table table,
.pd-adt-table-init {
    border-right: 1px solid #ccc;
}

/* Responsive: ensure controls don't overflow on small screens */
@media (max-width: 600px) {
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_paginate,
    .dataTables_wrapper .dataTables_info {
        float: none;
        text-align: left;
        margin: 8px 0 0 0;
    }
    .dataTables_wrapper .dataTables_filter input {
        min-width: 120px;
    }
}