/* podhog admin tweaks, loaded via DAISY_SETTINGS["EXTRA_STYLES"].
   django-daisy's templates extend admin/base.html directly and never render
   admin/base_site.html, so this is the supported way to add site-wide CSS. */

/* Underline links inside table rows, so it's obvious which cells are clickable
   — the theme otherwise renders them the same weight and colour as plain text.

   tbody only: column headers are links too (they sort), but underlining every
   header reads as noise rather than as affordance. Anchors styled as buttons
   keep their own look. */
table tbody a:not(.btn):not([class*="btn-"]) {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* django-daisy caps the changelist results at 65vh and gives them their own
   scrollbar (admin/change_list.html: `overflow-auto max-h-[65vh]`), so a long
   list is squeezed into two-thirds of the window and scrolls inside a page that
   is already scrollable.

   Dropping the cap lets the list run to its natural height and the page scroll
   as one — the window becomes the only limit. Safe because the layout wrapper is
   `min-h-screen`, not a fixed height, so nothing else was relying on that box
   being short. `overflow-auto` stays: with no max-height it never produces a
   vertical scrollbar, but it still handles a table too wide for the column.

   The id raises specificity above daisy's single-class utility, so this wins
   regardless of stylesheet order. */
#changelist-form .max-h-\[65vh\] {
    max-height: none;
}

/* Django's tabular inline always renders an "original" column holding the row's
   __str__ plus its hidden pk input. On these read-only inlines that just repeats
   a column already shown, so hide it.

   Hidden, not removed: the hidden input inside that cell is what keeps the
   formset valid on save, so the markup has to stay in the DOM. */
#products-group th.original, #products-group td.original,
#listings-group th.original, #listings-group td.original,
#listing_images-group th.original, #listing_images-group td.original {
    display: none;
}

/* The page numbers under a list must stay put while pressed. daisy nudges a
   pressed .btn down half a pixel (`.btn:active { translate: 0 .5px }`), and the
   numbers sit in an `overflow-x-auto` strip — which makes overflow-y auto too —
   so the nudge overflowed it, a scrollbar flashed in and the block jumped,
   sometimes moving the button out from under the pointer before the click
   landed. No nudge, and no vertical scrolling in that strip. */
.paginator .btn:active {
    translate: none;
}
.paginator .join {
    overflow-y: hidden;
}
