/*
 * Zgoda na cookies (tgcookieconsent) – baner na dole z przyciemnionym tłem, okno ustawień, link w stopce.
 * Mobile first; kolory motywu (zieleń #6dac23, grafit, jasne szarości), czcionka Poppins,
 * przyciski lekko zaokrąglone. „Zaakceptuj” (zielony) i „Odrzuć” (grafitowy) mają ten sam rozmiar
 * i równie wyraźny kolor (równa waga wyboru – RODO/EDPB), „Ustawienia” są jasne.
 */

.tgcc,
.tgcc-frame-ph {
  --tgcc-text: #2e2e2e;
  --tgcc-muted: #5a5a5a;
  --tgcc-green: #6dac23;
  --tgcc-green-hover: #4d8a14;
  --tgcc-dark: #3a3a3a;
  --tgcc-dark-hover: #1f1f1f;
  --tgcc-light: #ececec;
  --tgcc-light-hover: #dedede;
  --tgcc-panel: #f6f6f6;
  --tgcc-line: #e4e4e4;
  --tgcc-accent: #4d8a14;
  --tgcc-off: #a3a3a3;
  --tgcc-radius: 4px;

  color: var(--tgcc-text);
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}
.tgcc [hidden],
.tgcc[hidden] {
  display: none !important;
}
html.tgcc-lock,
html.tgcc-lock body {
  overflow: hidden;
}
.tgcc *,
.tgcc *::before,
.tgcc *::after {
  box-sizing: border-box;
}
.tgcc-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.tgcc-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(20, 24, 28, 0.55);
}

/* ---------- baner ---------- */

.tgcc-banner {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100001;
  background: #fff;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
  outline: none;
}
.tgcc-inner {
  display: flex;
  flex-direction: column;
  max-width: 1270px;
  max-height: 85vh;
  margin: 0 auto;
  padding: 18px 16px 16px;
}
.tgcc-scroll {
  overflow-y: auto;
  min-height: 0;
}
.tgcc-title {
  margin: 0 0 8px;
  color: var(--tgcc-text);
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  text-transform: none;
}
.tgcc-text {
  margin: 0 0 8px;
  color: var(--tgcc-muted);
  white-space: pre-line;
}
.tgcc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0 0 4px;
}
.tgcc a {
  color: var(--tgcc-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tgcc a:hover,
.tgcc a:focus {
  color: var(--tgcc-accent);
}

/* ---------- przyciski ---------- */

.tgcc-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}
.tgcc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 18px;
  border: 0;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.tgcc-btn:focus-visible,
.tgcc-close:focus-visible,
.tgcc-float:focus-visible,
.tgcc-cat-toggle:focus-visible,
.tgcc-switch input:focus-visible ~ .tgcc-switch-track {
  outline: 2px solid var(--tgcc-accent);
  outline-offset: 2px;
}
.tgcc-btn--accept {
  color: #fff;
  background: var(--tgcc-green);
}
.tgcc-btn--accept:hover {
  background: var(--tgcc-green-hover);
}
.tgcc-btn--reject {
  color: #fff;
  background: var(--tgcc-dark);
}
.tgcc-btn--reject:hover {
  background: var(--tgcc-dark-hover);
}
.tgcc-btn--light {
  color: var(--tgcc-text);
  background: var(--tgcc-light);
}
.tgcc-btn--light:hover {
  background: var(--tgcc-light-hover);
}

@media (min-width: 768px) {
  .tgcc-inner {
    padding: 26px 24px 22px;
  }
  .tgcc-title {
    font-size: 19px;
  }
  .tgcc-actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
  }
  .tgcc-btn {
    min-height: 40px;
    min-width: 170px;
    padding: 8px 22px;
    font-size: 14px;
  }
  .tgcc-btn--settings {
    margin-left: auto;
  }
}

/* ---------- okno ustawień ---------- */

.tgcc-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 100002;
  display: flex;
  flex-direction: column;
  width: calc(100% - 24px);
  max-width: 680px;
  max-height: calc(100% - 24px);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  outline: none;
}
.tgcc-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 10px;
}
.tgcc-modal-head .tgcc-title {
  margin: 4px 0 0;
}
.tgcc-close {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: var(--tgcc-radius);
  color: var(--tgcc-text);
  background: var(--tgcc-light);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.tgcc-close:hover {
  background: var(--tgcc-light-hover);
}
.tgcc-modal-body {
  overflow-y: auto;
  padding: 4px 16px 8px;
}
.tgcc-modal-actions {
  margin: 0;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--tgcc-line);
}
@media (min-width: 768px) {
  .tgcc-modal-head {
    padding: 22px 24px 12px;
  }
  .tgcc-modal-body {
    padding: 4px 24px 10px;
  }
  .tgcc-modal-actions {
    padding: 14px 24px 20px;
  }
  .tgcc-modal-actions .tgcc-btn {
    flex: 1 1 0;
    min-width: 0;
  }
}

/* kategorie – rozwijane karty */
.tgcc-cat {
  margin: 0 0 6px;
  background: var(--tgcc-panel);
  border: 1px solid var(--tgcc-line);
  border-radius: var(--tgcc-radius);
}
.tgcc-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 12px 6px 6px;
}
.tgcc-cat-name {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-transform: none;
}
.tgcc-cat-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 4px 6px;
  border: 0;
  border-radius: var(--tgcc-radius);
  color: var(--tgcc-text);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.tgcc-chevron {
  position: relative;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  background: transparent;
  border-radius: 50%;
}
.tgcc-chevron::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 7px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--tgcc-text);
  border-bottom: 2px solid var(--tgcc-text);
  transform: rotate(45deg);
  transition: transform 0.2s ease, top 0.2s ease;
}
.tgcc-cat-toggle[aria-expanded="true"] .tgcc-chevron::after {
  top: 9px;
  transform: rotate(-135deg);
}
.tgcc-cat-body {
  padding: 0 14px 14px 44px;
}
.tgcc-cat-desc {
  margin: 0;
  color: var(--tgcc-muted);
  font-size: 13px;
  white-space: pre-line;
}
.tgcc-cat-count {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 600;
}

/* przełącznik */
.tgcc-switch {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 24px;
  margin: 0;
  cursor: pointer;
}
.tgcc-switch input {
  position: absolute;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.tgcc-switch-track {
  position: absolute;
  inset: 0;
  background: var(--tgcc-off);
  border-radius: 12px;
  transition: background-color 0.2s ease;
  pointer-events: none;
}
.tgcc-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.tgcc-switch input:checked ~ .tgcc-switch-track {
  background: var(--tgcc-green);
}
.tgcc-switch input:checked ~ .tgcc-switch-track::after {
  transform: translateX(20px);
}
.tgcc-switch--locked,
.tgcc-switch--locked input {
  cursor: not-allowed;
}
.tgcc-switch--locked .tgcc-switch-track {
  opacity: 0.6;
}

/* lista cookies */
.tgcc-table-wrap {
  overflow-x: auto;
  margin-top: 6px;
}
.tgcc-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 12px;
}
.tgcc-table th,
.tgcc-table td {
  padding: 6px 8px;
  border: 1px solid var(--tgcc-line);
  text-align: left;
  vertical-align: top;
}
.tgcc-table th {
  background: #f7f9fa;
  font-weight: 600;
}
.tgcc-table code,
.tgcc-id code {
  color: var(--tgcc-text);
  background: #f3f5f6;
  font-size: 12px;
  word-break: break-all;
}
.tgcc-id {
  margin: 12px 0 4px;
  color: #8a949b;
  font-size: 12px;
}

/* ---------- pływający przycisk i link w stopce ---------- */

.tgcc-float {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--tgcc-green);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}
.tgcc-float:hover {
  background: var(--tgcc-green-hover);
}
.tgcc-footer-link {
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- zablokowany film / mapa ---------- */

.tgcc-frame-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 200px;
  margin: 0 0 16px;
  padding: 24px 16px;
  color: #2f3337;
  background: #eef2f4;
  border-radius: 8px;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  text-align: center;
}
.tgcc-frame-ph p {
  max-width: 460px;
  margin: 0;
}

/* ---------- strona polityki: krótki baner bez przyciemnienia ---------- */

.tgcc--policy .tgcc-text,
.tgcc--policy .tgcc-links {
  display: none;
}
.tgcc--policy .tgcc-inner {
  padding-top: 14px;
  padding-bottom: 12px;
}
.tgcc--policy .tgcc-title {
  margin-bottom: 0;
  font-size: 15px;
}
.tgcc--policy .tgcc-actions {
  margin-top: 10px;
}
@media (max-width: 767px) {
  /* na telefonie trzy przyciski w dwóch rzędach zamiast trzech – niższy baner */
  .tgcc--policy .tgcc-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .tgcc--policy .tgcc-btn {
    flex: 1 1 40%;
    min-height: 36px;
    padding: 7px 12px;
    font-size: 13px;
  }
  .tgcc--policy .tgcc-btn--settings {
    flex-basis: 100%;
  }
}

/* strona polityki przed wyborem: wszystko poza treścią polityki przygaszone i nieaktywne (inert) */
.tgcc-dim {
  opacity: 0.35;
  transition: opacity 0.2s ease;
}

/* ---------- nakładka z treścią polityki ---------- */

.tgcc-doc {
  max-width: 860px;
  height: calc(100% - 24px);
}
.tgcc-doc .tgcc-modal-body {
  flex: 1 1 auto;
  border-top: 1px solid var(--tgcc-line);
  padding-top: 14px;
}
.tgcc-doc-body {
  color: var(--tgcc-text);
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.tgcc-doc-body.is-loading {
  color: var(--tgcc-muted);
}
.tgcc-doc-body h1,
.tgcc-doc-body h2,
.tgcc-doc-body h3,
.tgcc-doc-body h4,
.tgcc-doc-body h5,
.tgcc-doc-body h6 {
  margin: 20px 0 8px;
  color: var(--tgcc-text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  text-transform: none;
}
.tgcc-doc-body > :first-child,
.tgcc-doc-body > :first-child > :first-child {
  margin-top: 0;
}
.tgcc-doc-body p,
.tgcc-doc-body ul,
.tgcc-doc-body ol,
.tgcc-doc-body blockquote {
  margin: 0 0 10px;
}
.tgcc-doc-body ul,
.tgcc-doc-body ol {
  padding-left: 22px;
}
.tgcc-doc-body ul {
  list-style: disc;
}
.tgcc-doc-body ol {
  list-style: decimal;
}
.tgcc-doc-body table {
  display: block;
  overflow-x: auto;
  margin: 0 0 12px;
  border-collapse: collapse;
  font-size: 13px;
}
.tgcc-doc-body th,
.tgcc-doc-body td {
  padding: 6px 8px;
  border: 1px solid var(--tgcc-line);
  text-align: left;
  vertical-align: top;
}
@media (min-width: 768px) {
  .tgcc-doc .tgcc-modal-actions .tgcc-btn {
    flex: 0 0 auto;
    min-width: 170px;
    margin-left: auto;
  }
}
