.legalni-languages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.legalni-languages a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0.35rem 0.55rem;
  box-sizing: border-box;
  color: inherit;
  line-height: 1.35;
  border: 1px solid currentColor;
  border-radius: 0.35rem;
  text-decoration: none;
  text-underline-offset: 0.2em;
  white-space: normal;
}

.legalni-languages a[lang]::before {
  content: "";
  display: inline-block;
  flex: 0 0 24px;
  width: 24px;
  height: 16px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px 16px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 15%);
}

.legalni-languages a[lang="pl"]::before {
  background-image: url("flags/pl.svg");
}

.legalni-languages a[lang="en"]::before {
  background-image: url("flags/gb.svg");
}

.legalni-languages a[lang="es"]::before {
  background-image: url("flags/es.svg");
}

.legalni-languages strong a,
.legalni-languages a:has(strong),
.legalni-languages a[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.legalni-languages a:hover {
  text-decoration: underline;
}

.legalni-languages a:focus-visible,
.legalni-cookie-notice a:focus-visible,
.legalni-cookie-notice button:focus-visible,
#legalni-cookie-notice-reopen:focus-visible,
.legalni-cookie-notice-noscript a:focus-visible {
  outline: 3px solid #6d28d9;
  outline-offset: 4px;
  box-shadow: 0 0 0 2px #fff;
}

.legalni-cookie-notice[hidden],
#legalni-cookie-notice-reopen[hidden] {
  display: none !important;
}

.legalni-cookie-notice {
  position: fixed;
  z-index: 9999;
  inset-inline-end: 1rem;
  inset-block-end: 1rem;
  width: min(28rem, calc(100vw - 2rem));
  max-height: min(32rem, 65dvh);
  overflow: auto;
  box-sizing: border-box;
  padding: 1.25rem;
  border: 1px solid #d6c9e8;
  border-radius: 0.75rem;
  background: #fff;
  color: #242033;
  box-shadow: 0 0.5rem 2rem rgb(24 12 44 / 20%);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.6;
  text-align: start;
  overflow-wrap: anywhere;
}

.legalni-cookie-notice h2 {
  margin: 0 0 0.7rem;
  color: #2f174c;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
}

.legalni-cookie-notice p {
  margin: 0 0 0.85rem;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  text-align: start;
}

.legalni-cookie-notice a,
.legalni-cookie-notice-noscript a {
  color: #512780;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.legalni-cookie-notice button {
  min-height: 44px;
  min-width: 44px;
  padding: 0.65rem 1rem;
  border: 2px solid #512780;
  border-radius: 0.4rem;
  background: #512780;
  color: #fff;
  font: inherit;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
}

.legalni-cookie-notice button:hover {
  border-color: #32174f;
  background: #32174f;
}

.legalni-cookie-notice-reopen-wrap {
  text-align: center;
}

#legalni-cookie-notice-reopen {
  position: fixed;
  z-index: 9999;
  inset-inline-start: 1rem;
  inset-block-end: 1rem;
  display: inline-block;
  min-height: 44px;
  min-width: 44px;
  max-width: calc(100vw - 2rem);
  margin: 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid currentColor;
  border-radius: 0.35rem;
  background: #fff;
  color: #512780;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.legalni-cookie-notice-noscript {
  max-width: 70rem;
  margin: 1rem auto;
  padding: 1rem;
  color: #242033;
  background: #fff;
}

@media (max-width: 480px) {
  .legalni-cookie-notice {
    inset-inline-end: 0.5rem;
    inset-block-end: 0.5rem;
    width: calc(100vw - 1rem);
    padding: 1rem;
  }
}

@media (forced-colors: active) {
  .legalni-cookie-notice,
  .legalni-cookie-notice button {
    border: 2px solid CanvasText;
  }
}

@media print {
  .legalni-cookie-notice,
  .legalni-cookie-notice-reopen-wrap,
  .legalni-cookie-notice-noscript {
    display: none !important;
  }
}
