/* Optional wine range features, loaded only by pages that use them. */

.collection-search { flex: 1 0 100%; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; font-size: .875rem; }
.collection-search input { width: min(100%, 26rem); min-width: 0; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 0; background: var(--paper); color: var(--ink); font: inherit; font-size: 1rem; }
.collection-search input:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }

[data-theme="filigrane"] .wine-index {
  padding-top: 24px;
  .collection-rank > span { display: none; }
  @media (max-width: 740px) {
    .collection-toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-block: 12px; }
    .collection-search { grid-column: 1 / -1; align-items: stretch; flex-direction: column; gap: 4px; }
    .collection-search input { width: 100%; }
    .collection-colours { grid-column: 1 / -1; }
    .collection-toolbar .collection-colours button { padding-inline: 7px; }
    .collection-rank { min-width: 0; margin-left: 0; }
    .collection-rank select { width: 100%; min-width: 0; font-size: .9rem; }
    .collection-count { grid-column: 1 / -1; }
  }
}

.collection-rank + .collection-region { margin-left: 0; }
.collection-toolbar:has(.collection-region) { column-gap: 16px; }
.collection-toolbar:has(.collection-region) .collection-colours button { padding-inline: 12px; }
@media (max-width: 600px) {
  .collection-region { max-width: 100%; }
  .collection-region select { min-width: 0; max-width: 100%; }
}

/* Sparkling ranges add their own colour filter, like rosé. */
.collection-colours button[data-wine-color="sparkling"]::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; background: #e2d49a; box-shadow: inset 0 0 0 2px #fff8dc; }

/* Links between a wine's sheets, one per vintage, below the facts. */
.vintage-sheets { margin: -10px 0 30px; }
.vintage-sheets-label { margin: 0 0 8px; font-size: .875rem; color: var(--muted); }
.vintage-sheets ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.vintage-sheets a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); color: inherit; text-decoration: none; font-variant-numeric: tabular-nums; }
.vintage-sheets a:hover { border-color: currentColor; }
.vintage-sheets a[aria-current="page"] { border-color: var(--wine); background: var(--wine); color: var(--paper, #fff); }
.vintage-sheets a:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
@media print { .vintage-sheets { display: none; } }
