/* Shared by the React island and the standalone consent banner.
   Desktop (>768 px): kompaktowa karta w prawym dolnym rogu.
   Mobile (<=768 px): niski pasek przyklejony do dołu + spacer o jego wysokości. */

/* --- Desktop: karta w rogu --- */
.dw-cookie-root {
  position: fixed; bottom: 24px; right: 32px; left: auto;
  width: 420px; max-width: calc(100vw - 48px); z-index: 100;
}
.dw-cookie-content {
  display: block;
  background: #fff; color: #0f2d37;
  border: 1px solid #f3f4f6; border-radius: 24px;
  box-shadow: 0 20px 50px rgb(15 45 55 / .15);
  padding: 18px;
  font: 400 13px/1.45 Inter, system-ui, sans-serif;
  max-height: 80dvh; overflow-y: auto;
}
.dw-cookie-content p { margin: 0; }
.dw-cookie-content a { color: #2d6a6a; text-decoration: underline; text-underline-offset: 2px; }
.dw-cookie-actions { display: flex; gap: 10px; margin-top: 12px; }
.dw-cookie-actions button {
  flex: 1; min-width: 0; min-height: 44px; padding: 10px 8px;
  border: 1px solid #0f2d37; border-radius: 12px; background: #fff; color: #0f2d37;
  font: 600 13px/1.25 Inter, system-ui, sans-serif; cursor: pointer;
}
.dw-cookie-actions button:hover, .dw-cookie-actions button:active { background: #f3f4f6; }
.dw-cookie-actions button:first-child {
  background: #0f2d37; border-color: #0f2d37; color: #fff;
}
.dw-cookie-actions button:first-child:hover,
.dw-cookie-actions button:first-child:active { background: #2d6a6a; border-color: #2d6a6a; }
.dw-cookie-content :focus-visible { outline: 3px solid #2d6a6a; outline-offset: 3px; }
/* Karta nie zabiera miejsca w treści na desktopie. */
.dw-cookie-spacer { display: none; }
html { scroll-padding-bottom: 0px; }

/* Kalkulator: po lewej stronie jest pusta przestrzeń, karta nie zasłania treści. */
@media (min-width: 769px) {
  .calc-page .dw-cookie-root { left: 32px; right: auto; }
  /* Miejsce pod kartą, żeby stopka dała się przewinąć nad nią. */
  .calc-page .dw-cookie-spacer {
    display: block; height: calc(var(--dw-cookie-height, 0px) + 24px);
  }
  .calc-page { scroll-padding-bottom: calc(var(--dw-cookie-height, 0px) + 24px); }
}

/* --- Mobile: niski pasek na dole --- */
@media (max-width: 768px) {
  .dw-cookie-root { bottom: 0; right: 0; left: 0; width: auto; max-width: none; }
  .dw-cookie-content {
    border: 0; border-top: 1px solid #d1d5db; border-radius: 0;
    box-shadow: 0 -4px 20px rgb(15 45 55 / .08);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    font: 400 13px/1.4 Inter, system-ui, sans-serif;
  }
  .dw-cookie-content p { margin: 0 0 8px; }
  .dw-cookie-actions { gap: 8px; margin-top: 0; }
  .dw-cookie-actions button {
    font: 600 14px/1.25 Inter, system-ui, sans-serif; border-radius: 10px;
  }
  .dw-cookie-spacer { display: block; height: var(--dw-cookie-height, 0px); flex-shrink: 0; }
  html { scroll-padding-bottom: var(--dw-cookie-height, 0px); }
}
