.exchange-main { padding-top: 28px; }
.exchange-sr-only,
.exchange-board caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.exchange-board {
  --exchange-row-divider: #c5d7cb;
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #d6e3d5;
  border-radius: 15px;
  overflow: hidden;
  color: #20392f;
  font-size: 15px;
  line-height: 1.35;
  background: #fff;
  box-shadow: 0 9px 26px #17392e10;
}
.exchange-board [hidden],
.exchange-pagination[hidden] { display: none !important; }
.exchange-board th,
.exchange-board td {
  text-align: start;
  padding: 14px clamp(8px, 1.25vw, 17px);
}
.exchange-board th {
  color: #fff;
  background: #245443;
  font-weight: 700;
}
.exchange-board th + th { border-inline-start: 1px solid #ffffff30; }
.exchange-board td { vertical-align: middle; }
.exchange-board td + td { border-inline-start: 1px solid #e4ebe2; }
.exchange-board tbody tr + tr td { border-top: 2px solid var(--exchange-row-divider); }
.exchange-board tbody tr:nth-child(even) { background: #f7faf6; }
.exchange-board col.exchange-route { width: 15%; }
.exchange-board col.exchange-cargo { width: 17%; }
.exchange-board col.exchange-measure { width: 9%; }
.exchange-board col.exchange-access { width: 17%; }
.exchange-board th.exchange-measure,
.exchange-board td.exchange-measure { text-align: center; }
.exchange-city { display: block; color: #18362c; font-weight: 700; }
.exchange-zip { white-space: nowrap; font-variant-numeric: tabular-nums; }
.exchange-country {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: #496257;
}
.exchange-flag {
  position: relative;
  flex: none;
  display: inline-block;
  width: 18px;
  height: 12px;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: 0 0 0 1px #30463e30;
}
.exchange-flag--pl { background: linear-gradient(#fff 50%,#dc143c 50%); }
.exchange-flag--de { background: linear-gradient(#111 33.333%,#da1618 33.333% 66.666%,#ffce00 66.666%); }
.exchange-flag--cz { background: linear-gradient(#fff 50%,#d7141a 50%); }
.exchange-flag--cz::before { content:""; position:absolute; inset:0; background:#11457e; clip-path: polygon(0 0,50% 50%,0 100%); }
.exchange-flag--nl { background: linear-gradient(#ae1c28 33.333%,#fff 33.333% 66.666%,#21468b 66.666%); }
.exchange-flag--se {
  background:
    linear-gradient(90deg, transparent 31.25%,#fecc02 31.25% 43.75%,transparent 43.75%),
    linear-gradient(transparent 40%,#fecc02 40% 60%,transparent 60%) #006aa7;
}
.exchange-cargo-name { color: #18362c; font-weight: 700; }
.exchange-value {
  color: #18362c;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.exchange-value small { color: #516a5e; font-size: inherit; font-weight: 400; }
.exchange-access-text { color: #3d5b4e; line-height: 1.25; }
.exchange-mobile-label { display: none; }
.exchange-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin-top: 17px; }
.exchange-pagination a {
  display: inline-flex; align-items: center; min-height: 42px; padding: 8px 14px; border: 1px solid #cfdfd0;
  border-radius: 8px; background: #fff; color: #196044; font-weight: 700;
}
.exchange-pagination a:hover { background: #edf5ed; }
.exchange-pagination span { color: #496257; }
.exchange-pagination a:focus-visible { outline: 2px solid #196044; outline-offset: 2px; }

@media (width > 980px) {
  .exchange-board { overflow: visible; }
  .exchange-board td.exchange-access { padding-inline: 8px; }
  .exchange-board th:first-child { border-start-start-radius: 14px; }
  .exchange-board th:last-child { border-start-end-radius: 14px; }
  .exchange-board tbody tr:last-child { background: transparent; }
  .exchange-board tbody tr:last-child:nth-child(even) td { background: #f7faf6; }
  .exchange-board tbody tr:last-child td:first-child { border-end-start-radius: 14px; }
  .exchange-board tbody tr:last-child td:last-child { border-end-end-radius: 14px; }
  .gc-pinned .exchange-board thead {
    position: sticky;
    top: var(--exchange-heading-top, 92px);
    z-index: 5;
    box-shadow: 0 4px 7px #17392e24;
  }
}

@media (max-width: 980px) {
  .exchange-main { padding-top: 20px; }
  .exchange-board { display: block; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 14px; }
  .exchange-board colgroup { display: none; }
  .exchange-board thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
  }
  .exchange-board tbody { display: grid; gap: 13px; }
  .exchange-board tbody tr {
    display: grid; grid-template-columns: repeat(4,minmax(0,1fr));
    border: 2px solid var(--exchange-row-divider); border-radius: 12px;
    background: #fff; overflow: hidden;
  }
  .exchange-board tbody tr:nth-child(even) { background: #f7faf6; }
  .exchange-board tbody td { padding: 12px; border: 0; min-width: 0; }
  .exchange-board tbody tr + tr td { border-top: 0; }
  .exchange-board .exchange-route { grid-column: span 2; }
  .exchange-board .exchange-cargo, .exchange-board .exchange-access {
    grid-column: 1 / -1;
    border-top: 1px solid #e4ebe2;
    border-inline-start: 0;
  }
  .exchange-board .exchange-measure {
    border-top: 1px solid #e4ebe2;
    padding: 10px 3px;
  }
  .exchange-board .exchange-measure:first-of-type,
  .exchange-board .exchange-measure:nth-child(4) { border-inline-start: 0; }
  .exchange-board tbody td.exchange-measure + td.exchange-measure,
  .exchange-board tbody td.exchange-route + td.exchange-route { border-inline-start: 1px solid #e4ebe2; }
  .exchange-board tbody tr + tr :is(.exchange-cargo,.exchange-measure,.exchange-access) { border-top: 1px solid #e4ebe2; }
  .exchange-mobile-label { display: block; color: #52695d; font-size: 12px; font-weight: 700; margin-bottom: 5px; }
}

.exchange-intro {
  margin: 0 0 16px;
  color: #17392e;
  font-size: clamp(23px, 2.4vw, 34px);
}
.exchange-country-flags { display: inline-flex; gap: 4px; }
.exchange-board .exchange-measure { padding-inline: clamp(4px, .65vw, 10px); }
.exchange-city { overflow-wrap: anywhere; }
.exchange-value--missing { color: #667e72; }
.exchange-pagination :is(a,.exchange-current) { min-width: 42px; justify-content: center; }
.exchange-pagination .exchange-current {
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #245443;
  border-radius: 8px;
  background: #245443;
  color: #fff;
  font-weight: 800;
}

.exchange-flag--at { background: linear-gradient(#ed2939 33.333%,#fff 33.333% 66.666%,#ed2939 66.666%); }
.exchange-flag--be { background: linear-gradient(90deg,#191919 33.333%,#f8db23 33.333% 66.666%,#ef3340 66.666%); }
.exchange-flag--bg { background: linear-gradient(#fff 33.333%,#00966e 33.333% 66.666%,#d62612 66.666%); }
.exchange-flag--ch {
  background: linear-gradient(#fff,#fff) center / 57% 22% no-repeat,
    linear-gradient(#fff,#fff) center / 15% 69% no-repeat #da291c;
}
.exchange-flag--dk {
  background: linear-gradient(90deg,transparent 28%,#fff 28% 41%,transparent 41%),
    linear-gradient(transparent 41%,#fff 41% 59%,transparent 59%) #c60c30;
}
.exchange-flag--ee { background: linear-gradient(#0072ce 33.333%,#171717 33.333% 66.666%,#fff 66.666%); }
.exchange-flag--es { background: linear-gradient(#aa151b 25%,#f1bf00 25% 75%,#aa151b 75%); }
.exchange-flag--fi {
  background: linear-gradient(90deg,transparent 27%,#003580 27% 45%,transparent 45%),
    linear-gradient(transparent 36%,#003580 36% 64%,transparent 64%) #fff;
}
.exchange-flag--fr { background: linear-gradient(90deg,#002654 33.333%,#fff 33.333% 66.666%,#ed2939 66.666%); }
.exchange-flag--gb {
  background: linear-gradient(90deg,transparent 43%,#c8102e 43% 57%,transparent 57%),
    linear-gradient(transparent 40%,#c8102e 40% 60%,transparent 60%),
    linear-gradient(90deg,transparent 38%,#fff 38% 62%,transparent 62%),
    linear-gradient(transparent 33%,#fff 33% 67%,transparent 67%),
    linear-gradient(33deg,transparent 44%,#fff 44% 48%,#c8102e 48% 52%,#fff 52% 56%,transparent 56%),
    linear-gradient(-33deg,transparent 44%,#fff 44% 48%,#c8102e 48% 52%,#fff 52% 56%,transparent 56%) #012169;
}
.exchange-flag--gr { background: repeating-linear-gradient(#0d5eaf 0 11.11%,#fff 11.11% 22.22%); }
.exchange-flag--gr::before {
  content: ''; position: absolute; inset: 0 auto auto 0; width: 39%; height: 56%;
  background: linear-gradient(90deg,transparent 40%,#fff 40% 60%,transparent 60%),
    linear-gradient(transparent 39%,#fff 39% 61%,transparent 61%) #0d5eaf;
}
.exchange-flag--hr { background: linear-gradient(#ff0000 33.333%,#fff 33.333% 66.666%,#171796 66.666%); }
.exchange-flag--hr::before {
  content: ''; position: absolute; inset: 26% 35% 21%; border-radius: 0 0 45% 45%;
  background: conic-gradient(#ec1b24 25%,#fff 0 50%,#ec1b24 0 75%,#fff 0) 0 0 / 2px 2px;
}
.exchange-flag--hu { background: linear-gradient(#ce2939 33.333%,#fff 33.333% 66.666%,#477050 66.666%); }
.exchange-flag--ie { background: linear-gradient(90deg,#169b62 33.333%,#fff 33.333% 66.666%,#ff883e 66.666%); }
.exchange-flag--it { background: linear-gradient(90deg,#009246 33.333%,#fff 33.333% 66.666%,#ce2b37 66.666%); }
.exchange-flag--lt { background: linear-gradient(#fdb913 33.333%,#006a44 33.333% 66.666%,#c1272d 66.666%); }
.exchange-flag--lv { background: linear-gradient(#9e3039 40%,#fff 40% 60%,#9e3039 60%); }
.exchange-flag--no {
  background: linear-gradient(90deg,transparent 32%,#00205b 32% 40%,transparent 40%),
    linear-gradient(transparent 45%,#00205b 45% 55%,transparent 55%),
    linear-gradient(90deg,transparent 26%,#fff 26% 46%,transparent 46%),
    linear-gradient(transparent 38%,#fff 38% 62%,transparent 62%) #ba0c2f;
}
.exchange-flag--ro { background: linear-gradient(90deg,#002b7f 33.333%,#fcd116 33.333% 66.666%,#ce1126 66.666%); }
.exchange-flag--sk { background: linear-gradient(#fff 33.333%,#0b4ea2 33.333% 66.666%,#ee1c25 66.666%); }
.exchange-flag--sk::before {
  content: ''; position: absolute; inset: 28% 49% 24% 22%; border: .5px solid #fff; border-radius: 0 0 50% 50%;
  background: linear-gradient(#fff,#fff) center 42% / 69% 18% no-repeat,
    linear-gradient(#fff,#fff) center 24% / 45% 15% no-repeat,
    linear-gradient(#fff,#fff) center 34% / 17% 70% no-repeat #ee1c25;
}
.exchange-flag--ua { background: linear-gradient(#0057b7 50%,#ffd700 50%); }

@media (max-width: 980px) {
  .exchange-board .exchange-measure { padding-inline: 4px; }
}
@media (max-width: 540px) {
  .exchange-pagination { gap: 7px; }
  .exchange-pagination :is(a,.exchange-current) { min-width: 37px; padding-inline: 8px; }
}

.exchange-row-hint {
  position: fixed;
  z-index: 12;
  box-sizing: border-box;
  width: max-content;
  max-width: min(300px, calc(100vw - 16px));
  padding: 9px 12px;
  border-radius: 8px;
  background: #17392e;
  color: #fff;
  box-shadow: 0 4px 14px #16392e40;
  font: 700 13px / 1.4 Lato, Arial, sans-serif;
  overflow-wrap: anywhere;
  pointer-events: none;
}
.exchange-row-hint[hidden] { display: none; }
