table.model {
    overflow-x: auto;
}
th.model {
    background-color: #1a1a2e;
    color: white;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
}
td.model {
    background-color: #1a1a2e;
    color: white;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
}

th.model_sort {
    background-color: #222;
    border: 1px solid #444;
    color: white;
    font-size: 15px;
    padding-left: 6px;
    padding-right: 6px;
}

td.model_page {
    background-color: #222;
    border: 2px inset gray;
    border-radius: 0 6px 0 0;
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    color: white;
    height: 15px;
    width: 15px;
    padding: 1px;
}

td.model_page_current {
    background-color: #DDDDDD;
    border-radius: 0;
    color: #000000;
    font-size: 12px;
    font-weight: bold;
}

th.model_sort_current {
    background-color: #DDDDDD;
    color: #000000;
}

th.model_page {
    border: 0;
    padding: 2px 5px;
    border-radius: 6px;
    text-align: center;
    font-size: 15px;
    color: #DDDDDD;
}

th.model_foot {
    background-color: #222;
    border: 1px solid #333;
    color: white;
    font-size: 15px;
    padding-left: 6px;
    padding-right: 6px;
}

/* table loading spinner */
.table-loading {
    float: right;
    width: 14px;
    height: 14px;
    margin: 2px 4px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: table-spin 0.6s linear infinite;
    opacity: 0.6;
}
@keyframes table-spin { to { transform: rotate(360deg); } }

/* JSON nested tables */
td.json-cell { padding: 2px 4px; vertical-align: top; }
table.json-table { border-collapse: collapse; width: 100%; margin: 0; }
table.json-table th.json-key {
    background-color: #2a2a3e;
    color: #aaa;
    font-size: 11px;
    font-weight: normal;
    padding: 2px 6px;
    border: 1px solid #333;
    vertical-align: top;
    white-space: nowrap;
    text-align: left;
}
table.json-table td.json-val {
    background-color: #1a1a2e;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border: 1px solid #333;
    vertical-align: top;
}
.json-toggle-btn {
    cursor: pointer;
    color: #7a9ec2;
    font-size: 11px;
    user-select: none;
}
.json-toggle-btn:hover { text-decoration: underline; }
.json-toggle-btn::before { content: '▼ '; font-size: 8px; }
.json-collapsed > .json-toggle-btn::before { content: '▶ '; }
.json-collapsed > .json-content { display: none; }
.json-toolbar {
    font-size: 10px;
    margin-bottom: 2px;
}
.json-toolbar span {
    cursor: pointer;
    color: #7a9ec2;
    margin-left: 6px;
    user-select: none;
}
.json-toolbar span:hover { text-decoration: underline; }
.json-null { color: #666; font-style: italic; }
.json-bool { color: #e6a756; }
.json-truncated { color: #e65656; font-style: italic; }

/* Inline filter input rendered by the table extension when the model declares
   a `filter` option. Layout (right-align, margin) is set inline on the
   wrapper in Table.php so behaviour is consistent across themes; this rule
   only handles decorative styling of the input itself. Themes can override. */
.table-search-input {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #ddd;
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 2px;
    width: 200px;
    max-width: 100%;
}
.table-search-input:focus {
    outline: none;
    border-color: #7a9ec2;
}
