/* Minimal overrides */
:root {
    --pico-font-size: 16px;
}
/* Make the body a flex column so main can grow and push the footer
   to the viewport bottom even when content is shorter than viewport.
*/
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1 0 auto }
/* Hide elements waiting for alpine to bind. visibility (not display)
   preserves layout boxes so Chart.js / Leaflet can size canvases
   correctly during their IIFE. Soft fade once Alpine remove the
   attribute, so the page comes in as one composed block.
*/
[x-cloak] { visibility: hidden; opacity: 0; }
[x-data] { transition: opacity 150ms ease-out }
nav .brand {
    font-weight: 700;
    font-size: 1.2rem;
}
/* Keep site nav anchored to the top of the viewport so any sticky
   page-level HUD can dock just beneath it.
*/
.site-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--pico-background-color);
    border-bottom: 1px solid var(--pico-muted-border-color);
}
/* Mirror nav at the bottom: footer stays at viewport bottom while
   overflowing content scrolls under it. Falls back to its natural
   position when there's no overflow.
*/
.site-footer {
    position: sticky;
    bottom: 0;
    z-index: 20;
    background: var(--pico-background-color);
    border-top: 1px solid var(--pico-muted-border-color);
    margin-top: 1rem;
    padding: 0.5rem 1rem;
}
.flash {
    padding: 0.75rem 1rem;
    border-radius: var(--pico-border-radius);
    margin-bottom: 1rem;
}
.flash-success { background: var(--pico-ins-color); }
.flash-error { background: var(--pico-del-color); }
.htmx-indicator {
    display: none;
}
.htmx-request .htmx-indicator {
    display: inline;
}

input:not([type=checkbox],[type=radio]), select, textarea {
  font-size: 0.85rem;
}

label {
  font-size: 0.85rem;
}

.status {
  font-size: 0.85rem;
  opacity: 0.7;
}

.btn-remove {
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid #dc2626;
  color: #dc2626;
  background: transparent;
  border-radius: var(--pico-border-radius);
  cursor: pointer;
  width: auto;
  display: inline-block;
  min-height: 1.65rem;
  margin: 0;
  white-space: nowrap;
}

.btn-remove:hover {
  background: #fef2f2;
}

.inline-form {
  margin: 0;
}

.link-button {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  color: var(--pico-primary);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

.link-button:hover {
  color: var(--pico-primary-hover);
}

.link-button-reset {
  all: unset;
  color: var(--pico-primary);
  text-decoration: underline;
  cursor: pointer;
}

.link-button-reset:hover {
  color: var(--pico-primary-hover);
}

.validation-note .field-validation-valid {
  display: none;
}

.validation-note .field-validation-error {
  color: var(--pico-del-color);
  font-weight: 600;
}

.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--pico-border-radius);
  margin-bottom: 1rem;
}

.flash-close {
  all: unset;
  cursor: pointer;
  line-height: 1;
  font-size: 1.1rem;
  color: inherit;
  opacity: 0.9;
}

.flash-close:hover {
  opacity: 1;
}

.flash-success {
  background: var(--pico-ins-color);
  color: #fff;
}

.flash-error {
  background: var(--pico-del-color);
  color: #fff;
}

.flash a {
  color: inherit;
}

.validation-summary:empty {
  display: none;
}

.validation-summary {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--pico-del-color);
  border-radius: var(--pico-border-radius);
  border: 1px solid var(--pico-muted-border-color);
  background: color-mix(in srgb, var(--pico-del-color) 12%, white);
  color: var(--pico-del-color);
}

.validation-summary ul {
  margin: 0.25rem 0 0 1.25rem;
}

.validation-summary li {
  margin: 0.15rem 0;
}

.litter-hud {
  display: flex;
  justify-content: space-between;
  align-items: center; /* tighter vertical alignment */
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0 0.4rem; /* compact HUD */
  border-bottom: 1px solid var(--pico-muted-border-color); /* separator */
}

.litter-hud__filters,
.litter-hud__actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: nowrap;
  align-items: center;
  white-space: nowrap;
}

/* make controls shorter */
.litter-hud input,
.litter-hud select,
.litter-hud a[role="button"] {
  margin: 5px;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  min-height: 2rem;
  font-size: 0.8rem;
}
.litter-hud input[type="search"] {
  width: 22rem;
  min-width: 18rem;
}

.action-btn {
  min-height: 1.65rem !important;
  padding: 0.2rem 0.5rem !important;
  font-size: 0.72rem !important;
  margin: 0 !important;
}

.pager {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0.5rem;
}
