/* Almost everything is Tailwind utilities in the templates. This file holds only the
   few rules a utility class cannot express: Alpine's pre-init cloak, the combo recipe
   picker (Django renders that list, so there is no element to put classes on), and the
   lightbox's open state. */

[x-cloak] { display: none !important; }

/* The combo recipe picker. Django renders CheckboxSelectMultiple as its own <ul>, which
   no template class can reach — and a <select multiple> of a hundred components is a
   trap anyway: one stray ctrl-click silently clears every tick. */
#id_components {
  list-style: none;
  margin: 0;
  padding: 0.75rem 0.9rem;
  max-height: 20rem;
  overflow-y: auto;
  border: 1px solid rgb(203 213 225);
  border-radius: 0.75rem;
  background: #fff;
  columns: 2;
  column-gap: 1.5rem;
}
.dark #id_components { border-color: rgb(51 65 85); background: rgb(2 6 23); }
#id_components > li, #id_components > div { break-inside: avoid; }
#id_components label {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
  font-size: 0.875rem;
  cursor: pointer;
}
#id_components input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  flex: none;
  accent-color: rgb(79 70 229);
  cursor: pointer;
}
@media (max-width: 700px) { #id_components { columns: 1; } }

/* app.js toggles [hidden]; Tailwind's `flex` would otherwise win over it. */
.lightbox[hidden] { display: none !important; }
.lightbox:not([hidden]) { display: flex; }
.no-scroll { overflow: hidden; }
