/* Responsive Filament tables (see public/js/responsive-tables.js) */

table.fi-ta-table .rt-hidden {
    display: none !important;
}

table.fi-ta-table .rt-toggle-cell {
    width: 1px;
    padding-inline: 0.75rem 0.25rem;
    vertical-align: middle;
}

.rt-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    border: 1.5px solid #2563eb;
    color: #2563eb;
    background: #ffffff;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s, transform 0.15s;
}

.rt-toggle::before {
    content: '+';
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.rt-toggle:hover {
    background: #eff6ff;
}

.rt-toggle:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.rt-toggle[aria-expanded='true'] {
    background: #2563eb;
    color: #ffffff;
}

.rt-toggle[aria-expanded='true']::before {
    content: '−';
}

tr.rt-expanded > td {
    background-color: #f8fafc;
}

tr.rt-detail-row > td {
    padding: 0.75rem 1rem 1rem;
    padding-inline-start: 3rem;
    background-color: #f8fafc;
    white-space: normal;
}

.rt-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem 1.5rem;
}

.rt-detail-item {
    min-width: 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #e5e7eb;
}

.rt-detail-label {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #6b7280;
}

.rt-detail-value {
    overflow-wrap: anywhere;
}

/* Filament cell content uses its own padding; tighten it inside the detail view. */
.rt-detail-value > * > div,
.rt-detail-value .fi-ta-col-wrp > * {
    padding: 0 !important;
}

.dark .rt-toggle {
    background: transparent;
    border-color: #60a5fa;
    color: #60a5fa;
}

.dark .rt-toggle[aria-expanded='true'] {
    background: #2563eb;
    color: #ffffff;
}

.dark tr.rt-expanded > td,
.dark tr.rt-detail-row > td {
    background-color: rgba(255, 255, 255, 0.04);
}

.dark .rt-detail-item {
    border-color: rgba(255, 255, 255, 0.1);
}

.dark .rt-detail-label {
    color: #9ca3af;
}
