/* vs-listings.css — Generisches Pattern fuer klickbare Tabellen-Listings.
 *
 * Markup-Konvention:
 *   <table class="vs-listing"
 *          data-bulk-endpoint="/modul/entity/bulk-delete"
 *          data-bulk-label-singular="Position"
 *          data-bulk-label-plural="Positionen">
 *     <thead><tr>
 *       <th class="vs-listing-check"><input type="checkbox" class="vs-all-check"></th>
 *       <th>...</th>
 *     </tr></thead>
 *     <tbody>
 *       <tr data-href="/modul/entity/edit/123" data-id="123">
 *         <td class="vs-listing-check"><input type="checkbox" class="vs-row-check" value="123"></td>
 *         <td>...</td>
 *       </tr>
 *     </tbody>
 *   </table>
 */

table.vs-listing tbody tr[data-href] {
    cursor: pointer;
    transition: background var(--vs-transition);
}
table.vs-listing tbody tr[data-href]:hover {
    background: var(--vs-surface-alt);
}
table.vs-listing tbody tr.is-selected {
    background: color-mix(in srgb, var(--vs-primary) 12%, transparent);
}
table.vs-listing tbody tr.is-selected:hover {
    background: color-mix(in srgb, var(--vs-primary) 18%, transparent);
}

table.vs-listing th.vs-listing-check,
table.vs-listing td.vs-listing-check {
    width: 1%;
    padding: 0.4rem 0.5rem;
    text-align: center;
    white-space: nowrap;
}
table.vs-listing input.vs-row-check,
table.vs-listing input.vs-all-check {
    cursor: pointer;
    accent-color: var(--vs-primary);
    width: 16px;
    height: 16px;
    margin: 0;
    vertical-align: middle;
}

.vs-bulk-bar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 1.5rem;
    z-index: 1500;
    display: none;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 1.1rem;
    background: var(--vs-surface);
    border: 1px solid var(--vs-border-strong);
    border-radius: var(--vs-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    color: var(--vs-text);
}
.vs-bulk-bar.is-active { display: inline-flex; }

.vs-bulk-bar-count {
    font-weight: 600;
    font-size: 0.92rem;
}
.vs-bulk-bar .vs-bulk-btn {
    border: 1px solid transparent;
    padding: 0.45rem 0.95rem;
    border-radius: var(--vs-radius-sm);
    cursor: pointer;
    font-size: 0.88rem;
    font-family: inherit;
    transition: background var(--vs-transition), color var(--vs-transition), border-color var(--vs-transition);
}
.vs-bulk-bar .vs-bulk-btn-danger {
    background: var(--vs-danger);
    color: var(--vs-on-primary);
}
.vs-bulk-bar .vs-bulk-btn-danger:hover {
    background: color-mix(in srgb, var(--vs-danger) 88%, black);
}
.vs-bulk-bar .vs-bulk-btn-cancel {
    background: transparent;
    color: var(--vs-text-muted);
    border-color: var(--vs-border);
}
.vs-bulk-bar .vs-bulk-btn-cancel:hover {
    color: var(--vs-text);
    border-color: var(--vs-border-strong);
}

@media (max-width: 600px) {
    .vs-bulk-bar {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        transform: none;
        justify-content: space-between;
    }
}


/* === F39b (2026-05-19): Bulk-Delete Preview-Modal === */
.vs-bulk-preview-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000;
    padding: 1rem;
}
.vs-bulk-preview-modal {
    background: var(--vs-surface, #1f2937);
    color: var(--vs-text, #fff);
    border: 1px solid var(--vs-border-strong, rgba(255,255,255,0.18));
    border-radius: 14px;
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 24px 64px rgba(0,0,0,0.45);
}
.vs-bulk-preview-modal h2 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
}
.vs-bulk-preview-summary {
    margin: 0 0 1.25rem;
    color: var(--vs-text-muted, #9ca3af);
    font-size: 0.9rem;
}
.vs-bulk-skip {
    opacity: 0.7;
    font-style: italic;
}
.vs-bulk-cat {
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--vs-border, rgba(255,255,255,0.12));
    background: rgba(255,255,255,0.03);
}
.vs-bulk-cat h3 {
    margin: 0 0 0.4rem;
    font-size: 0.95rem;
    font-weight: 600;
}
.vs-bulk-cat-help {
    margin: 0 0 0.5rem;
    font-size: 0.82rem;
    color: var(--vs-text-muted, #9ca3af);
}
.vs-bulk-cat-orphan {
    border-color: rgba(239,68,68,0.45);
    background: rgba(239,68,68,0.08);
}
.vs-bulk-cat-orphan h3 { color: #fca5a5; }
.vs-bulk-cat-partial {
    border-color: rgba(251,191,36,0.45);
    background: rgba(251,191,36,0.07);
}
.vs-bulk-cat-partial h3 { color: #fcd34d; }
.vs-bulk-emaillist {
    margin: 0;
    padding-left: 1.2rem;
    list-style: disc;
    font-size: 0.88rem;
    max-height: 200px;
    overflow-y: auto;
}
.vs-bulk-emaillist li { margin-bottom: 0.2rem; }
.vs-bulk-remaining {
    color: var(--vs-text-muted, #9ca3af);
    font-size: 0.8rem;
    font-style: italic;
}
.vs-bulk-preview-actions {
    display: flex; gap: 0.6rem; justify-content: flex-end;
    margin-top: 1rem;
}
