/*
 * agrafconsent — wygląd banera zgody (wzorzec fbiol). Wszystko pod #agraf-consent / .agraf-consent-footer,
 * żeby nie dotykać motywu akira. Reguły z `display` nie odkrywają elementów z atrybutem [hidden].
 */
#agraf-consent {
  --agc-bg: #ffffff;
  --agc-text: #222222;
  --agc-muted: #555555;
  --agc-border: #d6d6d6;
  --agc-btn-bg: #222222;
  --agc-btn-text: #ffffff;
  --agc-focus: #0b62c4;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  box-sizing: border-box;
  max-height: 100vh;
  max-height: 100dvh;
  overflow-y: auto;
  padding: 16px 20px;
  background: var(--agc-bg);
  color: var(--agc-text);
  border-top: 2px solid var(--agc-border);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
  font-size: 14px;
  line-height: 1.5;
}
#agraf-consent[hidden],
#agraf-consent [hidden] { display: none !important; }
#agraf-consent:focus { outline: none; }

.agraf-consent__layer1 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  max-width: 1200px;
  margin: 0 auto;
}
.agraf-consent__copy { flex: 1 1 32rem; min-width: 0; }
.agraf-consent__title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: var(--agc-text);
}
.agraf-consent__title:focus { outline: none; }
.agraf-consent__text,
.agraf-consent__intro { margin: 0; }
.agraf-consent__links { margin: 8px 0 0; }
.agraf-consent__links a { color: var(--agc-focus); text-decoration: underline; }

.agraf-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
}
/* Równa ranga wizualna: ta sama klasa dla akceptacji, odmowy, ustawień i zapisu. */
.agraf-consent__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--agc-btn-bg);
  border-radius: 4px;
  background: var(--agc-btn-bg);
  color: var(--agc-btn-text);
  font: inherit;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
}
.agraf-consent__btn:hover { filter: brightness(1.25); }
.agraf-consent__btn:focus-visible,
.agraf-consent__more:focus-visible,
.agraf-consent__switch input:focus-visible,
.agraf-consent__links a:focus-visible,
.agraf-consent-footer__btn:focus-visible {
  outline: 2px solid var(--agc-focus);
  outline-offset: 2px;
}

.agraf-consent__settings {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 12px;
}
.agraf-consent__layer1 + .agraf-consent__settings { border-top: 1px solid var(--agc-border); margin-top: 12px; }
.agraf-consent__cat {
  padding: 10px 0;
  border-bottom: 1px solid var(--agc-border);
}
.agraf-consent__cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.agraf-consent__cat-name { font-weight: 700; }
.agraf-consent__switch input {
  width: 42px;
  height: 24px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--agc-btn-bg);
}
.agraf-consent__switch input:disabled { cursor: not-allowed; }
.agraf-consent__status { margin: 2px 0 0; color: var(--agc-muted); }
.agraf-consent__on { display: none; }
.agraf-consent__cat.is-on .agraf-consent__on { display: inline; }
.agraf-consent__cat.is-on .agraf-consent__off { display: none; }
.agraf-consent__more {
  margin: 4px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--agc-focus);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.agraf-consent__desc { margin: 6px 0 0; color: var(--agc-muted); }
.agraf-consent__settings .agraf-consent__actions { margin-top: 14px; }

@media (max-width: 575px) {
  #agraf-consent { padding: 12px 16px; }
  .agraf-consent__actions { width: 100%; }
  .agraf-consent__btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: no-preference) {
  .agraf-consent__btn { transition: filter 0.15s ease; }
}

.agraf-consent-footer { text-align: center; padding: 8px 0; }
.agraf-consent-footer__btn {
  padding: 4px 8px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
