/* Eco Groceries Finder - page style additions, version 1.2 (14 Nov 2026; shares ecolabel filter layout with EcoStay)
   Loaded AFTER the website's styles.css (or, in the standalone finder, after the copy of it in
   standalone\website-base.css). Every rule is limited to the Eco groceries page (.eg / #eg-...),
   so adding this file to the website changes nothing on the other pages. */

.eg[hidden], .eg .layout[hidden] { display: none; }

/* ecolabel colours: EU Ecolabel blue, Nordic Swan dark blue, Cradle to Cradle purple */
.eg { --c2c: #6B3FA0; --c2c-soft: #EFE7F8; }
@media (prefers-color-scheme: dark) { .eg { --c2c: #CDB2F2; --c2c-soft: #2E2440; } }
.eg .badge.c2c { background: var(--c2c-soft); color: var(--c2c); }

/* ecolabel buttons: "All" over the full width, then three in one row */

/* list columns */
#eg-tbl { min-width: 920px; }
#eg-tbl col.c-eco { width: 158px; } #eg-tbl col.c-ty { width: 170px; }
#eg-tbl col.c-co { width: 200px; } #eg-tbl col.c-ctry { width: 110px; } #eg-tbl col.c-id { width: 130px; }
#eg-tbl td.ty, #eg-tbl td.ctry { font-size: 12.5px; color: var(--muted); }
#eg-tbl td.co { font-size: 13px; }
#eg-tbl td.lid { font-family: Consolas, "Cascadia Mono", Menlo, monospace; font-size: 12.5px; }
#eg-tbl td.name .cat { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); margin-block-start: 1px; }

/* rankings */
#eg-rank-table { width: 100%; }

#eg-finder > main { grid-column: 2; grid-row: 1; min-width: 0; }
#eg-finder > aside { grid-column: 1; grid-row: 1; }
@media (max-width: 920px) and (min-width: 721px) {
  #eg-finder > aside, #eg-finder > main { grid-area: auto; }
  #eg-finder > aside { order: -1; }
}
@media (max-width: 720px) {
  #eg-finder > aside, #eg-finder > main { grid-area: auto; }
  #eg-finder > main { display: flex; flex-direction: column; }
  #eg-finder .kpis,
  #eg-finder .rank-field { display: none; }
  #eg-results-jump { width: 100%; margin: 12px 0 0; }
  #eg-tbl { min-width: 650px; }
  #eg-tbl col.c-eco { width: 116px; }
  #eg-tbl col.c-name { width: 158px; }
  #eg-tbl col.c-co { width: 110px; }
  #eg-tbl col.c-ty { width: 100px; }
  #eg-tbl col.c-ctry { width: 72px; }
  #eg-tbl col.c-id { width: 94px; }
  #eg-tbl th, #eg-tbl td, #eg-tbl td .badge { font-size: 12px; line-height: 1.3; }
  #eg-tbl td { padding: 5px 6px; overflow-wrap: anywhere; }
  #eg-tbl th button { padding-inline: 6px; white-space: normal; }
  #eg-tbl td .badge { padding-inline: 4px; white-space: normal; }
  #eg-tbl td.name { overflow-wrap: anywhere; }
  #eg-wrap { height: clamp(240px, 47svh, 420px); }
}

/* details panel */
#eg-drawer .lvl { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 6px; padding-block: 1px; padding-inline: 7px; background: var(--c2c-soft, #EFE7F8); color: var(--c2c, #6B3FA0); }
#eg-drawer .codes { font-family: Consolas, "Cascadia Mono", Menlo, monospace; font-size: 12.5px; }
#eg-drawer .links { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 6px; }
#eg-drawer .links a { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--link); text-decoration: none; border: 1px solid var(--line); border-radius: 6px; padding-block: 4px; padding-inline: 9px; background: var(--surface-2); }
#eg-drawer .links a:hover { background: var(--brand-soft); text-decoration: underline; }
#eg-drawer .links a::after { content: ""; width: 12px; height: 12px; flex: none; background: currentColor; -webkit-mask: var(--ext-icon) center / 12px 12px no-repeat; mask: var(--ext-icon) center / 12px 12px no-repeat; }
