/*
 * WAGA — Control Panel overrides
 *
 * Injected via STATAMIC_CUSTOM_CSS_URL (Statamic Pro, see
 * vendor/statamic/cms/resources/views/partials/head.blade.php).
 *
 * Statamic 6 ships .widget-table with padding only — no row separators,
 * no header fill, no hover. That reads as a loose text list rather than a
 * table. These rules restore that structure for every dashboard widget,
 * including Statamic's own built-in collection widget, so custom and
 * built-in widgets stay visually identical.
 */

/* Full-bleed: cancel the .px-4 wrapper so rows span the whole card, then
   re-add the inset on the outer cells only. */
.widget-table {
    margin-left: -1rem;
    margin-right: -1rem;
    width: calc(100% + 2rem);
    max-width: calc(100% + 2rem);
    min-width: calc(100% + 2rem);
    border-collapse: collapse;
}

.widget-table thead th:first-child,
.widget-table tbody td:first-child {
    padding-left: 1.125rem;
}

.widget-table thead th:last-child,
.widget-table tbody td:last-child {
    padding-right: 1.125rem;
}

/* Header row — subtle fill + divider, matching the CP's own table chrome */
.widget-table thead th {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    background: rgba(156, 163, 175, 0.06);
    border-top: 1px solid rgba(156, 163, 175, 0.18);
    border-bottom: 1px solid rgba(156, 163, 175, 0.18);
}

:where(.dark) .widget-table thead th {
    background: rgba(255, 255, 255, 0.03);
    border-top-color: rgba(255, 255, 255, 0.08);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* Body rows — separators + hover affordance */
.widget-table tbody tr td {
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid rgba(156, 163, 175, 0.12);
}

:where(.dark) .widget-table tbody tr td {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.widget-table tbody tr:last-child td {
    border-bottom: 0;
}

.widget-table tbody tr:hover td {
    background: rgba(156, 163, 175, 0.05);
}

:where(.dark) .widget-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.025);
}

/*
 * One site switcher only. The top-right site menu is the language switch.
 * Hide Statamic's per-entry "Working In" panel (the list of site buttons
 * with status dots). Language-independent: do not match the heading text.
 */
[data-ui-panel]:has([role="group"] > button .little-dot) {
    display: none !important;
}
