/* ==========================================================================
   downloads — file list with year / month filters on a dark section
   (EXALCO-ESG "ESG downloads"). Filters are native selects (click / keyboard)
   instead of the mockup's hover panels.
   ========================================================================== */
/* Head, in the mockup's order: eyebrow → 22px → filter row → 26px → title → 26px → list. */
.ex-downloads__head { margin-bottom: 26px; }
.ex-downloads__eyebrow { margin-bottom: 22px; }
.ex-downloads__eyebrow:has(+ .ex-downloads__heading) { margin-bottom: 8px; }
.ex-downloads__heading { margin: 0; }

.ex-downloads__filters { display: flex; flex-wrap: wrap; align-items: center; gap: 14px clamp(14px, 2vw, 28px); margin: 0 0 26px; }
.ex-downloads__filter { display: flex; align-items: center; gap: 12px; }
.ex-downloads__filter-label { font-size: 11.5px; font-weight: 700; line-height: 1.2; letter-spacing: .18em; color: rgba(255, 255, 255, .55); }

.ex-downloads__select {
  width: auto;
  min-width: 148px;
  padding: 12px 40px 12px 15px;
  border-color: rgba(255, 255, 255, .28);
  background-color: transparent;
  background-position: right 15px center;
  color: var(--ex-white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}
.ex-downloads__select:hover { border-color: rgba(255, 255, 255, .6); }
.ex-downloads__select:focus { border-color: var(--ex-red); background-color: #2a2e39; box-shadow: none; }
.ex-downloads__select:focus-visible { outline: 2px solid var(--ex-white); outline-offset: 2px; }
.ex-downloads__select option { background: #2a2e39; color: var(--ex-white); font-weight: 500; }

.ex-downloads__list { max-width: 1280px; margin: 0; padding: 0; list-style: none; }
.ex-downloads__item { display: flex; min-width: 0; }

.ex-downloads__link {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 20px 22px;
  border: .5px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .05);
  color: var(--ex-white);
  transition: background var(--ex-t-base), border-color var(--ex-t-base);
}
a.ex-downloads__link:hover,
a.ex-downloads__link:focus-visible { border-color: var(--ex-red); background: rgba(255, 255, 255, .1); color: var(--ex-white); }

.ex-downloads__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 46px;
  height: 46px;
  border: var(--ex-border-w) solid var(--ex-red);
  color: var(--ex-red);
  transition: background var(--ex-t-base), color var(--ex-t-base);
}
a.ex-downloads__link:hover .ex-downloads__icon,
a.ex-downloads__link:focus-visible .ex-downloads__icon { background: var(--ex-red); color: var(--ex-white); }
/* Record without an uploaded file: same row, no link, no "Λήψη". The icon stays red like a linked row (beta audit v3;
   it was muted, which made the ESG list look grey while its files are not uploaded yet). */

.ex-downloads__body { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; }
.ex-downloads__title { margin: 0; font-size: 14px; font-weight: 800; line-height: 1.3; letter-spacing: 0; color: inherit; overflow-wrap: break-word; }
.ex-downloads__meta { margin: 0; font-size: 11px; line-height: normal; /* rendered: 12px line */ letter-spacing: .06em; color: rgba(255, 255, 255, .55); }

/* Visible "Λήψη" (func. spec 16.1.3) */
.ex-downloads__action {
  flex: none;
  padding-bottom: 2px;
  border-bottom: var(--ex-border-w) solid var(--ex-red);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .1em;
  color: var(--ex-white);
}

.ex-downloads__empty { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 0; padding: 18px 2px; font-size: 13px; line-height: 1.5; color: var(--ex-white); }
.ex-downloads__reset { padding-bottom: 2px; border-bottom: var(--ex-border-w) solid var(--ex-red); font-weight: 700; color: var(--ex-white); }
.ex-downloads__reset:hover { color: var(--ex-white); border-bottom-color: var(--ex-white); }

/* --------------------------------------------------------------------------
   Tabs variant (.ex-downloads--tabs, investor relations). Not designed — needs
   approval: eyebrow → title → one row with the category chips (base .ex-chip,
   as the thermal tabs of the product category) and the period filter → list.
   -------------------------------------------------------------------------- */
.ex-downloads__filters--tabs { justify-content: space-between; margin: 26px 0 0; }
.ex-downloads__tabs { flex: 1 1 auto; min-width: 0; }
.ex-downloads__period { display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: 14px clamp(14px, 2vw, 28px); max-width: 100%; }

.ex-downloads__group + .ex-downloads__group { margin-top: 34px; }
.ex-downloads__group-title { margin: 0 0 14px; font-size: var(--ex-fs-eyebrow); font-weight: 700; line-height: 1.3; letter-spacing: .1em; color: var(--ex-fg); }

/* Without scripting (or when main.js never arrived) there is nothing to switch: no chips, every group under its heading. */
html:not(.js) .ex-downloads__tabs,
html.js-fallback:not(.js-ready) .ex-downloads__tabs { display: none; }
/* With scripting the active chip names the group: its heading stays for assistive technology only, and a group whose rows
   are all filtered out takes no space (also without scripting, after a period was submitted). Until the controller has
   run, only the group of the tab rendered active shows. */
html.js:not(.js-fallback) .ex-downloads__group-title,
html.js-ready .ex-downloads__group-title { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html.js:not(.js-ready):not(.js-fallback) .ex-downloads__group:not(.ex-downloads__group--initial) { display: none; }
.ex-downloads__group:not(:has([data-filter-item]:not([hidden]))) { display: none; }
/* The empty state offers "all periods" only while a period is chosen (an empty category has nothing to reset). */
.ex-downloads--tabs:not(:has(.ex-downloads__select option:checked:not([value=""]))) .ex-downloads__reset { display: none; }

@media (max-width: 1439px) {
  .ex-downloads__link { gap: 14px; padding: 18px; }
}

@media (max-width: 899px) {
  .ex-downloads__filters { width: 100%; }
  .ex-downloads__filter { flex: 1 1 200px; }
  .ex-downloads__select { flex: 1; min-height: var(--ex-touch); font-size: 16px; letter-spacing: .02em; }
  .ex-downloads__title { font-size: 15px; }
  .ex-downloads__meta,
  .ex-downloads__action { font-size: 12px; }
  .ex-downloads__period { flex: 1 1 100%; }
  .ex-downloads__tabs .ex-chip { min-height: var(--ex-touch); }
}

@media (max-width: 599px) {
  .ex-downloads__filter { flex-basis: 100%; }
  .ex-downloads__filter-label { flex: none; width: 64px; }
  .ex-downloads__icon { width: 40px; height: 40px; }
  .ex-downloads__tabs .ex-chip { flex: 1 1 auto; white-space: normal; }
  .ex-downloads__group + .ex-downloads__group { margin-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .ex-downloads__link,
  .ex-downloads__icon { transition: none; }
}
