/* Catopedia additions to Pico.css */

.flash { padding: 0.75rem 1rem; border-radius: var(--pico-border-radius); border-left: 0.3rem solid; }
.flash-ok { background: rgba(46, 125, 50, 0.12); border-color: #2e7d32; }
.flash-error { background: rgba(198, 40, 40, 0.12); border-color: #c62828; }

.field-error { color: var(--pico-del-color); margin-top: calc(var(--pico-spacing) * -0.5); display: block; }
.muted { color: var(--pico-muted-color); }

/* Login page, and the Log out button in the menu */
form.login { max-width: 24rem; }
form.logout { margin: 0; }

/* Cat list */
.thumb { width: 4rem; height: 4rem; object-fit: cover; border-radius: var(--pico-border-radius); display: block; }
.thumb-empty { width: 4rem; height: 4rem; border-radius: var(--pico-border-radius);
               background: var(--pico-muted-border-color); display: block; }
.filters { display: grid; grid-template-columns: 2fr 1fr auto auto; gap: var(--pico-spacing); align-items: center; }
.filters > * { margin-bottom: 0; }
/* Show linked cats sits on its own row, centred beneath the search row */
.filters .show-linked { grid-row: 2; grid-column: 1 / -1; justify-self: center; }
@media (max-width: 768px) {
  .filters { grid-template-columns: 1fr; }
  .filters .show-linked { grid-row: auto; grid-column: auto; justify-self: auto; }
}

/* Details laid out as label / value pairs */
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.5rem; }
dl.facts dt { font-weight: 600; }
dl.facts dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }

/* Photo gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: var(--pico-spacing); }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--pico-border-radius); }
.gallery figcaption { font-size: 0.875rem; overflow-wrap: anywhere; }

/* Small buttons and forms that sit in a line of text or a table cell */
form.inline { display: inline; margin: 0; }
button.small, a.small[role="button"] { padding: 0.15rem 0.6rem; font-size: 0.8rem; width: auto; margin: 0; }
.date-row { display: flex; gap: 0.5rem; align-items: flex-start; }
.date-row input { flex: 1; }
.date-row button { width: auto; white-space: nowrap; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.actions > * { margin-bottom: 0; width: auto; }

.file-list { list-style: none; padding: 0; margin: 0; }
.file-list li { list-style: none; margin-bottom: 0.3rem; overflow-wrap: anywhere; }

tr.adoption-actions td { border-top: none; padding-top: 0; }
.adoption-actions details { margin-bottom: 0.5rem; }
.adoption-actions summary { font-size: 0.9rem; }

.checklist label { display: block; }

/* The RIP tick box beside Edit details on a cat's page */
form.rip { display: flex; gap: 0.5rem; align-items: center; margin: 0 0 0 0.5rem; }
form.rip label { margin: 0; }

/* Searchable tick-list of cats (the cat_picker macro) */
.cat-picker-list { max-height: 18rem; overflow-y: auto; padding: 0.5rem 0.75rem; margin-bottom: 0.25rem;
                   border: 1px solid var(--pico-muted-border-color); border-radius: var(--pico-border-radius); }
.cat-picker-list label[hidden] { display: none; }
.cat-picker-list p { margin: 0; }
