/* ==========================================================================
   Chique — Wardrobe screen
   Toolbar (search, quick chips, sort, grid/list toggle, size slider), the "more filters" panel
   and the item grid / list layout. Card appearance itself is in components/cards.css.
   ========================================================================== */

/* ----- toolbar ----- */
.toolbar { display: grid; gap: 10px; }

.toolrow { display: flex; align-items: center; gap: 8px; }
.toolrow .select { margin-left: auto; }

/* sort dropdown (custom arrow drawn with gradients) */
.select select { min-height: 38px; padding: 0 30px 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; font-size: .9rem; }

/* grid / list toggle */
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--surface); }
.seg button { width: 42px; height: 38px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-contrast); }

/* number badge on the "More filters" button */
.count { min-width: 20px; height: 20px; border-radius: 10px; background: var(--accent); color: var(--accent-contrast); font-size: .72rem; display: inline-grid; place-items: center; padding: 0 6px; }

/* card-size slider */
.density { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; }
.density input { flex: 1; accent-color: var(--accent); }

/* expandable filter panel */
.filter-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: grid; gap: 14px; animation: fade .2s var(--ease); }
.fgroup h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; font-weight: 650; }
.filter-panel .btn { justify-self: start; }

/* ----- item grid (size follows the --card-min variable set by the slider) ----- */
.item-grid { display: grid; gap: 14px; }
.item-grid.grid { grid-template-columns: repeat(auto-fill, minmax(var(--card-min, 160px), 1fr)); }
.item-grid.list { grid-template-columns: 1fr; gap: 10px; }

/* list layout: photo on the left, text on the right */
.item-grid.list .card { display: grid; grid-template-columns: 104px 1fr; }
.item-grid.list .media { aspect-ratio: 1 / 1; }

/* very small grid cells ("s" size): hide labels to keep cards tidy */
.item-grid[data-size="s"] .card-actions .btn span, .item-grid[data-size="s"] .sub { display: none; }
.item-grid[data-size="s"] .meta { padding: 8px; }
.item-grid[data-size="s"] .meta h3 { font-size: .82rem; }
.item-grid[data-size="s"] .icon-btn { width: 32px; height: 32px; }
