/* GGS Site: the cookie table ([ggs_cookie_table]) and the control that opens the preferences ([ggs_consent_settings],
   action ggs_site_consent_link) in the content of a page (module consent). Author: GGSolutions.pl. License: Proprietary
   (GGSolutions). The same custom properties as css/consent.css (defaults repeated here, this file loads on its own with
   the page). The control looks like a link of the text; on phones every row of the table is a card with the label of
   each value from data-label (WCAG 1.4.10: no sideways scroll). */
:where(:root) {
  --ggs-consent-link: #1a56a8;
  --ggs-consent-link-hover: #123d78;
  --ggs-consent-border: #d0d7de;
  --ggs-consent-surface-alt: #f3f5f7;
  --ggs-consent-focus: #1a56a8;
}

.ggs-consent-link {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ggs-consent-link);
  font: inherit;
  text-decoration: underline 1px;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.ggs-consent-link:hover { color: var(--ggs-consent-link-hover); text-decoration-thickness: 2px; }
.ggs-consent-link:focus-visible { outline: 3px solid var(--ggs-consent-focus); outline-offset: 2px; }

.ggs-cookie-table { margin: 1.5em 0; }
.ggs-cookie-table table { width: 100%; border-collapse: collapse; }
.ggs-cookie-table :is(th, td) { padding: 0.5em 0.75em; border: 1px solid var(--ggs-consent-border); text-align: left; vertical-align: top; }
.ggs-cookie-table thead th, .ggs-cookie-table th[scope="colgroup"], .ggs-cookie-table th[scope="row"] { background: var(--ggs-consent-surface-alt); }
.ggs-cookie-table code { overflow-wrap: anywhere; }

@media screen and (max-width: 640px) {
  .ggs-cookie-table :is(table, thead, tbody, tr, th, td) { display: block; }
  .ggs-cookie-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ggs-cookie-table tr { margin-bottom: 0.75em; border: 1px solid var(--ggs-consent-border); }
  .ggs-cookie-table :is(th, td) { border: 0; }
  .ggs-cookie-table td::before { content: attr(data-label); display: block; font-weight: 700; }
}
