html.hash-cookies-lock,
html.hash-cookies-lock body {
  overflow: hidden !important;
}

.hash-cookies-root {
  --hc-bg: #ffffff;
  --hc-text: #0f172a;
  --hc-primary: #56ccc8;
  --hc-primary-text: #0f172a;
  --hc-muted: #334155;
  --hc-border: rgba(15, 23, 42, 0.16);
  --hc-overlay: rgba(15, 23, 42, 0.48);
  --hc-radius: 6px;
  --hc-radius-panel: 8px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--hc-text);
}

.hash-cookies-root[data-theme="dark"] {
  --hc-bg: #0f172a;
  --hc-text: #f8fafc;
  --hc-primary: #56ccc8;
  --hc-primary-text: #0f172a;
  --hc-muted: #cbd5e1;
  --hc-border: rgba(248, 250, 252, 0.18);
  --hc-overlay: rgba(0, 0, 0, 0.62);
}

.hash-cookies-overlay {
  position: fixed;
  inset: 0;
  background: var(--hc-overlay);
  z-index: 99998;
}

.hash-cookies-overlay--soft {
  background: transparent;
  pointer-events: none;
}

.hash-cookies-panel {
  position: fixed;
  z-index: 99999;
  background: var(--hc-bg);
  color: var(--hc-text);
  border: 1px solid var(--hc-border);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.18);
  padding: 1.25rem 1.35rem 1.2rem;
  box-sizing: border-box;
}

.hash-cookies-panel h2 {
  margin: 0 0 0.35rem;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--hc-text);
}

.hash-cookies-panel > p {
  margin: 0 0 0.7rem;
  color: var(--hc-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 400;
}

/* Full-width bars */
.hash-cookies-panel--bar-top,
.hash-cookies-panel--bar-bottom {
  left: 0;
  right: 0;
  width: 100%;
  max-width: none;
  border-radius: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem 1.5rem;
  align-items: center;
  padding: 1.35rem 2rem 1.15rem;
}

.hash-cookies-panel--bar-top { top: 0; bottom: auto; }
.hash-cookies-panel--bar-bottom { bottom: 0; top: auto; }

.hash-cookies-panel--bar-top h2,
.hash-cookies-panel--bar-bottom h2 {
  grid-column: 1;
  margin: 0;
  font-size: 1.05rem;
}

.hash-cookies-panel--bar-top > p,
.hash-cookies-panel--bar-bottom > p {
  grid-column: 1;
  margin: 0.2rem 0 0;
  max-width: 48rem;
  font-size: 0.92rem;
}

.hash-cookies-panel--bar-top .hash-cookies-policy,
.hash-cookies-panel--bar-bottom .hash-cookies-policy {
  grid-column: 1;
  margin: 0.2rem 0 0;
}

.hash-cookies-panel--bar-top .hash-cookies-actions,
.hash-cookies-panel--bar-bottom .hash-cookies-actions {
  grid-column: 2;
  grid-row: 1 / span 3;
  flex-wrap: nowrap;
  justify-content: flex-end;
  width: auto;
}

.hash-cookies-panel--bar-top .hash-cookies-powered,
.hash-cookies-panel--bar-bottom .hash-cookies-powered {
  grid-column: 1 / -1;
  margin: 0.15rem 0 0;
  justify-self: start;
}

/* Corner / center compact — szerszy, by 3 przyciski w rzędzie */
.hash-cookies-panel--corner-bottom-left,
.hash-cookies-panel--corner-bottom-right,
.hash-cookies-panel--corner-top-left,
.hash-cookies-panel--corner-top-right,
.hash-cookies-panel--center {
  /* ~12% szerszy niż wcześniej (520 → ~585) */
  width: min(585px, calc(100vw - 1.25rem));
  border-radius: var(--hc-radius-panel);
  padding: 1.35rem 1.45rem 1.3rem;
}

.hash-cookies-panel--corner-bottom-left { left: 0.85rem; bottom: 0.85rem; }
.hash-cookies-panel--corner-bottom-right { right: 0.85rem; bottom: 0.85rem; }
.hash-cookies-panel--corner-top-left { left: 0.85rem; top: 0.85rem; }
.hash-cookies-panel--corner-top-right { right: 0.85rem; top: 0.85rem; }

.hash-cookies-panel--center {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.hash-cookies-panel--corner-bottom-left .hash-cookies-actions,
.hash-cookies-panel--corner-bottom-right .hash-cookies-actions,
.hash-cookies-panel--corner-top-left .hash-cookies-actions,
.hash-cookies-panel--corner-top-right .hash-cookies-actions,
.hash-cookies-panel--center .hash-cookies-actions {
  flex-wrap: nowrap;
  width: 100%;
}

.hash-cookies-panel--corner-bottom-left .hash-cookies-actions button,
.hash-cookies-panel--corner-bottom-right .hash-cookies-actions button,
.hash-cookies-panel--corner-top-left .hash-cookies-actions button,
.hash-cookies-panel--corner-top-right .hash-cookies-actions button,
.hash-cookies-panel--center .hash-cookies-actions button {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.85rem 0.55rem;
  font-size: 0.88rem;
  white-space: nowrap;
}

/* Expanded customize modal */
.hash-cookies-panel--modal {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(640px, calc(100vw - 1.5rem));
  max-height: min(88vh, 720px);
  overflow: auto;
  border-radius: var(--hc-radius-panel);
  padding: 1.2rem 1.25rem 1.1rem;
}

.hash-cookies-panel--modal .hash-cookies-actions {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  gap: 0.4rem;
}

.hash-cookies-panel--modal .hash-cookies-actions button {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  padding: 0.85rem 0.5rem;
  white-space: nowrap;
}

.hash-cookies-cats {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0.85rem 0 1rem;
}

.hash-cookies-cat {
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius);
  padding: 0.7rem 0.8rem;
}

.hash-cookies-cat-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.hash-cookies-cat strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--hc-text);
}

.hash-cookies-cat small {
  display: block;
  margin-top: 0.25rem;
  color: var(--hc-muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.hash-cookies-cookie-list {
  margin-top: 0.55rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--hc-border);
}

.hash-cookies-cookie-head {
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hc-muted);
  margin-bottom: 0.35rem;
}

.hash-cookies-cookie-empty {
  margin: 0;
  font-size: 0.84rem;
  color: var(--hc-muted);
}

.hash-cookies-cookie-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.hash-cookies-cookie-list li {
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--hc-muted);
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.hash-cookies-cookie-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 0.75rem;
}

.hash-cookies-cookie-list code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--hc-text);
  background: transparent;
  padding: 0;
}

.hash-cookies-cookie-duration {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--hc-text);
  opacity: 0.78;
  white-space: nowrap;
}

.hash-cookies-cookie-meta {
  font-size: 0.8rem;
  color: var(--hc-muted);
}

.hash-cookies-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  align-items: stretch;
}

.hash-cookies-actions button {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--hc-border);
  background: var(--hc-bg);
  color: var(--hc-text);
  border-radius: var(--hc-radius);
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  text-transform: none;
  transition:
    filter 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease,
    border-color 0.15s ease;
}

.hash-cookies-actions button:hover {
  filter: brightness(0.88) contrast(1.05);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

.hash-cookies-actions button:active {
  filter: brightness(0.82);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14);
  transform: translateY(0);
}

.hash-cookies-actions button:focus-visible {
  outline: 2px solid var(--hc-primary);
  outline-offset: 2px;
}

/* Dostosuj / Wstecz — kolory z --hc-btn-customize-* gdy ustawione */
.hash-cookies-actions button.hc-secondary {
  background: var(--hc-btn-customize-bg, transparent) !important;
  border-color: var(--hc-btn-customize-bg, var(--hc-border)) !important;
  color: var(--hc-btn-customize-text, var(--hc-text)) !important;
  font-weight: 600;
}

.hash-cookies-actions button.hc-secondary:hover {
  filter: brightness(0.92) contrast(1.08);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.14);
}

/* Akceptuję / Odrzucam / Zapisz — zawsze ten sam wygląd (równa waga) */
.hash-cookies-actions button.hc-primary {
  background: var(--hc-btn-decision-bg, var(--hc-primary)) !important;
  border-color: var(--hc-btn-decision-bg, var(--hc-primary)) !important;
  color: var(--hc-btn-decision-text, var(--hc-primary-text)) !important;
  font-weight: 700;
}

.hash-cookies-actions button.hc-primary:hover {
  filter: brightness(0.86) saturate(1.08);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.22);
}

.hash-cookies-fab {
  --hc-fab-bg: #ffffff;
  --hc-fab-icon: #111111;
  position: fixed;
  z-index: 99990;
  width: 48px;
  height: 48px;
  border-radius: var(--hc-radius);
  border: 1px solid var(--hc-border);
  background: var(--hc-fab-bg);
  color: var(--hc-fab-icon);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.hash-cookies-fab-icon {
  display: block;
  width: 22px;
  height: 22px;
}

.hash-cookies-fab.bottom-left { left: 1rem; bottom: 1rem; }
.hash-cookies-fab.bottom-right { right: 1rem; bottom: 1rem; }
.hash-cookies-fab.top-left { left: 1rem; top: 1rem; }
.hash-cookies-fab.top-right { right: 1rem; top: 1rem; }

.hash-cookies-footer-link {
  margin-left: 0.35rem;
}

.hash-cookies-switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  margin-top: 0.1rem;
}

.hash-cookies-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.hash-cookies-switch span {
  position: absolute;
  inset: 0;
  background: #94a3b8;
  border-radius: 999px;
  transition: 0.15s;
}

.hash-cookies-switch span:before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.15s;
}

.hash-cookies-switch input:checked + span {
  background: var(--hc-primary);
}

.hash-cookies-switch input:checked + span:before {
  transform: translateX(18px);
}

.hash-cookies-switch input:disabled + span {
  opacity: 0.55;
}

.hash-cookies-policy {
  display: inline-block;
  margin-bottom: 0.55rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--hc-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hash-cookies-powered {
  display: block;
  margin: 0.65rem 0 0;
  font-size: 0.68rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--hc-text);
  opacity: 0.38;
  text-decoration: none;
}

.hash-cookies-powered:hover {
  opacity: 0.62;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 600px) {
  .hash-cookies-panel--corner-bottom-left,
  .hash-cookies-panel--corner-bottom-right,
  .hash-cookies-panel--corner-top-left,
  .hash-cookies-panel--corner-top-right,
  .hash-cookies-panel--center {
    width: calc(100vw - 1rem);
    left: 0.5rem;
    right: 0.5rem;
    transform: none;
  }

  .hash-cookies-panel--center {
    left: 0.5rem;
    right: 0.5rem;
    top: auto;
    bottom: 0.75rem;
    transform: none;
  }

  .hash-cookies-panel--bar-top,
  .hash-cookies-panel--bar-bottom {
    grid-template-columns: 1fr;
    padding: 1.2rem 1.25rem 1.05rem;
  }

  .hash-cookies-panel--bar-top .hash-cookies-actions,
  .hash-cookies-panel--bar-bottom .hash-cookies-actions {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
  }

  .hash-cookies-panel--bar-top .hash-cookies-powered,
  .hash-cookies-panel--bar-bottom .hash-cookies-powered {
    grid-column: 1;
  }

  /*
   * Mobile actions:
   * 1) decision buttons (Odrzucam/Zapisz + Akceptuję) — full-width pair on top
   * 2) secondary (Dostosuj / Wstecz) — centered underneath
   */
  .hash-cookies-actions,
  .hash-cookies-panel--modal .hash-cookies-actions,
  .hash-cookies-panel--corner-bottom-left .hash-cookies-actions,
  .hash-cookies-panel--corner-bottom-right .hash-cookies-actions,
  .hash-cookies-panel--corner-top-left .hash-cookies-actions,
  .hash-cookies-panel--corner-top-right .hash-cookies-actions,
  .hash-cookies-panel--center .hash-cookies-actions,
  .hash-cookies-panel--bar-top .hash-cookies-actions,
  .hash-cookies-panel--bar-bottom .hash-cookies-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex-wrap: unset;
    width: 100%;
    gap: 0.4rem;
  }

  .hash-cookies-actions button.hc-primary,
  .hash-cookies-panel--modal .hash-cookies-actions button.hc-primary,
  .hash-cookies-panel--corner-bottom-left .hash-cookies-actions button.hc-primary,
  .hash-cookies-panel--corner-bottom-right .hash-cookies-actions button.hc-primary,
  .hash-cookies-panel--corner-top-left .hash-cookies-actions button.hc-primary,
  .hash-cookies-panel--corner-top-right .hash-cookies-actions button.hc-primary,
  .hash-cookies-panel--center .hash-cookies-actions button.hc-primary,
  .hash-cookies-panel--bar-top .hash-cookies-actions button.hc-primary,
  .hash-cookies-panel--bar-bottom .hash-cookies-actions button.hc-primary {
    order: 1;
    flex: unset;
    width: 100%;
    min-width: 0;
    white-space: normal;
    font-size: 0.82rem;
    padding: 0.75rem 0.45rem;
  }

  .hash-cookies-actions button.hc-secondary,
  .hash-cookies-panel--modal .hash-cookies-actions button.hc-secondary,
  .hash-cookies-panel--corner-bottom-left .hash-cookies-actions button.hc-secondary,
  .hash-cookies-panel--corner-bottom-right .hash-cookies-actions button.hc-secondary,
  .hash-cookies-panel--corner-top-left .hash-cookies-actions button.hc-secondary,
  .hash-cookies-panel--corner-top-right .hash-cookies-actions button.hc-secondary,
  .hash-cookies-panel--center .hash-cookies-actions button.hc-secondary,
  .hash-cookies-panel--bar-top .hash-cookies-actions button.hc-secondary,
  .hash-cookies-panel--bar-bottom .hash-cookies-actions button.hc-secondary {
    order: 2;
    grid-column: 1 / -1;
    justify-self: center;
    flex: unset;
    width: auto;
    min-width: 7.5rem;
    white-space: nowrap;
    font-size: 0.82rem;
    padding: 0.75rem 1.1rem;
  }
}
