/* Premium design enhancements for Unfold admin — loaded via UNFOLD["STYLES"].
 * Every rule here is either (a) our own convention applied via a data-*
 * attribute we control, or (b) confirmed against Unfold's ACTUAL rendered
 * markup before being written — never a guessed selector
 * (docs/knowledge/AVOID_LIST.md entry 19: a guessed selector silently
 * matches nothing and produces zero error, zero symptom other than "the
 * style doesn't apply").
 *
 * NOTE: badge pill/tint refinements are deliberately not added — Unfold's
 * own display(label=...) badges already render correctly colored (confirmed
 * via the real browser gate, see docs/knowledge/CHANGELOG.md). The
 * bulk-action-bar mobile fix below WAS confirmed necessary and IS included —
 * see the comment at its definition.
 */

/* --- CSS-only tooltips (Unfold ships no native tooltip component) --------- */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--color-base-900);
    color: var(--color-base-50);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease, transform 120ms ease;
    z-index: 50;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --- Compact/high-density view (?dense=1 toggles body.dense) -------------- */
body.dense .module,
body.dense table.results td,
body.dense table.results th {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}

body.dense {
    font-size: 0.8125rem;
}

/* --- Bulk-action bar overlap fix (docs/knowledge/AVOID_LIST.md entry 15/32) -
 * Confirmed via direct DOM inspection on our actual pinned Unfold version
 * (0.99.1): the bulk-action bar (#changelist-actions-wrapper's containing
 * element) is `position: fixed; bottom: 0` at EVERY breakpoint, ~98px tall
 * on a 390px-wide mobile viewport. Because it's fixed, it overlays whatever
 * changelist rows are scrolled underneath it instead of pushing them up —
 * on a short table this can be invisible (desktop screenshot with only 4
 * rows showed no overlap), but it WILL overlap the last rows on any
 * changelist that fills the viewport, on any screen size. Reserve bottom
 * space unconditionally on changelist pages using Django's own stable
 * `body.change-list` convention (not an Unfold-internal class, which would
 * be more likely to change across versions) so this can never happen,
 * regardless of row count or viewport. Targets `.changelist-actions`
 * (the class), never `#changelist-actions` (a different, unrelated id) —
 * docs/knowledge/AVOID_LIST.md entry 19. */
body.change-list {
    padding-bottom: 7rem;
}
