/* Arlen Enterprises admin branding.
   django-daisy only renders SITE_LOGO inside the authenticated shell, so the
   login card gets the mark via CSS rather than by copying their login.html
   (which would need re-syncing on every django-daisy upgrade). */

body.login #content-main .card-body h2::before {
  content: "";
  display: block;
  width: 104px;
  height: 104px;
  margin: 0 auto 1.25rem;
  border-radius: 12px;
  background: url("/static/img/logo.png") center / contain no-repeat;
}

/* Group / permission pickers.
   django-daisy renders these as <ul style="columns:2">. Multi-column content
   overflows sideways rather than vertically, so admin-fixes.js forces a single
   column and this caps the height to give a vertical scrollbar. Rows are plain
   blocks — the checkboxes are their own marker, so no list bullets. */
ul#id_user_permissions,
ul#id_groups,
ul#id_permissions {
  column-count: 1 !important;
  column-width: auto !important;
  -webkit-column-count: 1 !important;
  -moz-column-count: 1 !important;
  display: block !important;
  width: 100%;
  max-width: 46rem;
  max-height: 20rem !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  margin: 0;
  padding: 0.6rem 0.75rem !important;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 0.5rem;
}

ul#id_user_permissions > li,
ul#id_groups > li,
ul#id_permissions > li {
  display: block !important;
  list-style: none !important;
  padding: 0.15rem 0 !important;
  break-inside: avoid;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Tabular inlines: django-daisy labels the "original" column, which stock Django
   leaves blank. It repeats the row's __str__ — already covered by the visible
   columns — so hide it. The cell stays in the DOM because it carries the row's
   hidden primary-key input. */
#items-group .original {
  display: none;
}
