/* Component styles (Symfony UX), loaded through AssetMapper. */

/* InventoryList */
.search input { width: 100%; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 14px; font-size: 1.05rem; }
.search input:focus, .field input:focus, .field select:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.chips { border: 0; padding: 0; margin: .9rem 0 1.1rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.chips legend { font-weight: 600; margin-bottom: .4rem; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .8rem; border: 1px solid var(--line); border-radius: 999px;
        background: var(--card); font-size: .9rem; font-weight: 500; cursor: pointer; user-select: none; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip small { color: var(--muted); font-weight: 600; }
.chip:has(input:checked) { background: var(--accent); border-color: var(--accent); color: #fff; }
[data-theme="dark"] .chip:has(input:checked) { color: var(--bg); }
.chip:has(input:checked) small { color: inherit; opacity: .8; }
.chip:has(input:focus-visible) { outline: 3px solid var(--accent-soft); }
.chip-warn { border-color: var(--warn); color: var(--warn); }

/* Grid of cards: big picture on top, name, then quantity. */
.items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .75rem; transition: opacity .15s; }
.items.loading { opacity: .6; }
.item { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.thumb { width: 100%; aspect-ratio: 1; display: grid; place-items: center; background: var(--bg); border-bottom: 1px solid var(--line); overflow: hidden;
         font-size: 3.5rem; text-decoration: none; }
.thumb img { width: 100%; height: 100%; object-fit: contain; padding: .5rem; background: #fff; }
.info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; padding: .6rem .7rem 0; text-decoration: none; }
.info strong { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.meta { color: var(--muted); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expiry { display: inline-block; width: fit-content; margin-top: .15rem; padding: .05rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.expiry-ok { background: var(--accent-soft); color: var(--accent); }
.expiry-soon { background: var(--warn-soft); color: var(--warn); }
.expiry-passed { background: var(--danger-soft); color: var(--danger); }
.quantity { display: flex; align-items: center; justify-content: center; gap: .3rem; padding: .5rem .7rem .7rem; }
.quantity span { min-width: 1.6rem; text-align: center; font-weight: 600; }
.quantity button { width: 2.2rem; height: 2.2rem; border: 1px solid var(--line); border-radius: 50%; background: var(--field); color: var(--ink); font-size: 1.1rem; line-height: 1; }
.quantity button:hover { border-color: var(--accent); }
.confirm { display: flex; align-items: center; justify-content: center; gap: .4rem; flex-wrap: wrap; padding: .5rem .7rem .7rem; font-size: .9rem; }
.empty { grid-column: 1 / -1; padding: 2rem 1rem; text-align: center; color: var(--muted); }
.add-floating { position: fixed; right: 1.1rem; bottom: 1.1rem; padding: .9rem 1.4rem; box-shadow: 0 10px 25px -10px rgba(0,0,0,.5); font-size: 1.05rem; }

/* ItemForm */
.item-header { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.item-header .picture { flex: 0 0 7rem; height: 7rem; display: grid; place-items: center; border-radius: 14px; background: var(--card);
                        border: 1px solid var(--line); overflow: hidden; font-size: 3rem; }
.item-header .picture img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.item-header h1 { margin-top: 0; }
.item-header .subtitle { margin: 0; }
.fields { display: flex; flex-direction: column; gap: .9rem; }
.field { display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.field > span { font-weight: 600; font-size: .95rem; }
.field small { color: var(--muted); font-weight: 400; }
.field input, .field select { width: 100%; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; font-size: 1rem; }
.row { display: flex; gap: .8rem; flex-wrap: wrap; }
.field-quantity { flex: 0 0 7rem; }
.fields .chips { margin: 0; }
.fields .button { align-self: flex-start; }
.hint { color: var(--muted); font-size: .9rem; margin: 0; }
.details dl { margin: 0 0 1rem; display: grid; gap: .4rem; }
.details dl div { display: grid; grid-template-columns: 9rem 1fr; gap: .6rem; }
.details dt { color: var(--muted); font-size: .9rem; }
.details dd { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1rem; }
@media (max-width: 480px) {
    .details dl div { grid-template-columns: 1fr; gap: 0; }
    .item-header .picture { flex-basis: 5rem; height: 5rem; }
    .fields .button { align-self: stretch; }
}
