/*
 * Baner zgód, mapa za zgodą i polityka prywatności — wspólny wygląd stron INTEBO.
 *
 * ŹRÓDŁO: wspolne/rodo/cookie-consent.css w katalogu ~/Projects/intebo. Kopie w repo stron
 * wgrywa `bin/rodo` — nie edytuj kopii. Logika: cookie-consent.js.
 *
 * Wygląd celowo neutralny (biały baner, grafitowe przyciski, systemowy font), żeby pasował
 * do każdej strony bez względu na jej kolory. Arkusz ładuj PO stylach strony (Bootstrap,
 * Tailwind, mystyle.css) — reguły niżej nadpisują ich globalne style h2/p/button/label.
 */

.cc,
.consent-embed,
.polityka,
.rodo-links {
  --rodo-text: #1d1d1f;
  --rodo-muted: #5f6368;
  --rodo-line: #e3e3e3;
  --rodo-btn: #1d1d1f;
  --rodo-btn-hover: #000;
  --rodo-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.cc[hidden],
.cc [hidden],
.consent-embed [hidden] {
  display: none !important;
}

/* --- Baner ------------------------------------------------------------------ */

.cc {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000; /* nad przyklejonymi nawigacjami stron (do z-index 9999) */
  display: flex;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
}

.cc *,
.cc *::before,
.cc *::after {
  box-sizing: border-box;
}

.cc__box {
  pointer-events: auto;
  width: 100%;
  max-width: 760px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  margin: 0;
  padding: 20px 24px;
  background: #fff;
  color: var(--rodo-text);
  border: 1px solid var(--rodo-line);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
  font-family: var(--rodo-font);
  font-size: 14px;
  line-height: 1.55;
  text-align: left;
}

.cc__box:focus {
  outline: none;
}

.cc__title,
.cc__text,
.cc__cat-desc,
.cc__cat-head,
.cc__btn {
  font-family: var(--rodo-font);
  letter-spacing: normal;
  text-transform: none;
  text-shadow: none;
}

.cc__title {
  margin: 0 0 8px;
  padding: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--rodo-text);
  text-align: left;
}

.cc__title::before,
.cc__title::after {
  content: none;
}

.cc__text {
  margin: 0;
  padding: 0;
  font-size: 14px;
  color: var(--rodo-text);
}

.cc__text a,
.cc__cat-desc a {
  color: var(--rodo-text);
  text-decoration: underline;
}

.cc__prefs {
  margin-top: 16px;
  border-top: 1px solid var(--rodo-line);
}

.cc__cat {
  padding: 12px 0;
  border-bottom: 1px solid var(--rodo-line);
}

.cc__cat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--rodo-text);
  cursor: pointer;
}

.cc__cat-head input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--rodo-btn);
  cursor: pointer;
}

.cc__cat-head input:disabled {
  cursor: default;
}

.cc__cat-badge {
  margin-left: auto;
  font-size: 12px;
  font-weight: 400;
  color: var(--rodo-muted);
}

.cc__cat-desc {
  margin: 4px 0 0 28px;
  padding: 0;
  font-size: 13px;
  color: var(--rodo-muted);
}

.cc__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.cc__spacer {
  flex: 1 1 auto;
}

/* „Odrzuć” i „Akceptuj wszystkie” celowo wyglądają identycznie — odmowa ma być
   równie łatwa jak zgoda (wytyczne EROD 05/2020, raport EROD o banerach z 2023 r.). */
.cc__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin: 0;
  padding: 8px 18px;
  border: 1px solid var(--rodo-btn);
  border-radius: 8px;
  background: var(--rodo-btn);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: none;
}

.cc__btn:hover {
  background: var(--rodo-btn-hover);
  border-color: var(--rodo-btn-hover);
  color: #fff;
}

.cc__btn--ghost {
  background: #fff;
  color: var(--rodo-text);
  border-color: #c8c8c8;
}

.cc__btn--ghost:hover {
  background: #f3f3f3;
  border-color: #9a9a9a;
  color: var(--rodo-text);
}

.cc__btn:focus-visible,
.consent-embed__btn:focus-visible,
.polityka__btn:focus-visible,
.rodo-links button:focus-visible {
  outline: 3px solid #1a73e8;
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .cc {
    padding: 8px;
  }

  .cc__box {
    padding: 16px;
    max-height: calc(100vh - 16px);
  }

  .cc__spacer {
    display: none;
  }

  .cc__btn {
    flex: 1 1 calc(50% - 4px);
  }
}

/* --- Mapa czekająca na zgodę -------------------------------------------------- */

.consent-embed iframe {
  display: none;
}

.consent-embed.is-loaded iframe {
  display: block;
}

.consent-embed.is-loaded .consent-embed__placeholder {
  display: none;
}

.consent-embed__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 300px;
  margin: 0;
  padding: 24px;
  background: #f4f4f4;
  border: 1px solid var(--rodo-line);
  border-radius: 6px;
  color: #333;
  font-family: var(--rodo-font);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.consent-embed__placeholder p {
  margin: 0;
  padding: 0;
  max-width: 340px;
  color: #333;
  font-family: var(--rodo-font);
  font-size: 14px;
}

.consent-embed__placeholder a {
  color: #333;
  font-size: 14px;
  text-decoration: underline;
}

.consent-embed__btn {
  margin: 0;
  padding: 9px 20px;
  border: 1px solid var(--rodo-btn);
  border-radius: 8px;
  background: var(--rodo-btn);
  color: #fff;
  font-family: var(--rodo-font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.consent-embed__btn:hover {
  background: var(--rodo-btn-hover);
}

/* --- Linki „Polityka prywatności” / „Ustawienia cookies” w stopce --------------- */

.rodo-links a,
.rodo-links button {
  color: inherit;
  text-decoration: underline;
}

.rodo-links button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

/* --- Polityka prywatności (treść ze wzoru wspolne/rodo/polityka.html) ------------- */

.polityka {
  box-sizing: border-box;
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 16px 56px;
  color: var(--rodo-text);
  font-size: 16px;
  line-height: 1.65;
  text-align: left;
}

.polityka h1,
.polityka h2 {
  color: var(--rodo-text);
  letter-spacing: normal;
  text-transform: none;
  text-align: left;
}

.polityka h1::before,
.polityka h1::after,
.polityka h2::before,
.polityka h2::after {
  content: none;
}

.polityka h1 {
  margin: 0 0 16px;
  padding: 0;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
}

.polityka h2 {
  margin: 32px 0 10px;
  padding: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.polityka p {
  margin: 0 0 12px;
  padding: 0;
  font-size: inherit;
  line-height: inherit;
}

.polityka ul {
  margin: 0 0 12px;
  padding: 0 0 0 22px;
  list-style: disc;
}

.polityka li {
  margin: 4px 0;
  padding: 0;
}

.polityka a {
  color: inherit;
  text-decoration: underline;
}

.polityka small {
  color: var(--rodo-muted);
  font-size: 0.85em;
}

.polityka code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #f1f1f1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  color: inherit;
}

.polityka__tabela {
  margin: 12px 0 16px;
  overflow-x: auto;
}

.polityka table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}

.polityka th,
.polityka td {
  padding: 8px 10px;
  border: 1px solid var(--rodo-line);
  vertical-align: top;
  text-align: left;
}

.polityka th {
  background: #f6f6f6;
  font-weight: 600;
}

.polityka__btn {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
