/* Kontener modułu */
.module.wrap-article { background:#fff; }

/* Karta zgody: checkbox, etykieta, toggle po prawej */
#consents-root .consent{
  display:grid;
  grid-template-columns:auto 1fr auto;
  column-gap:12px; row-gap:8px;
  align-items:center;
  padding:14px 16px;
  border:1px solid #dddddd;
  border-radius:4px;
  margin-bottom:12px;
  background:#fff;
}

/* Checkbox + label */
#consents-root .consent input[type="checkbox"]{
  width:18px; height:18px;
  accent-color:#125cab;
  -webkit-appearance:checkbox;
}
#consents-root .consent label{ font-size:16px; cursor:pointer; }

/* Toggle */
#consents-root .consent .toggle{
  justify-self:end;
  padding:6px 10px; font-size:14px; line-height:1;
  border:1px solid #dddddd; border-radius:4px;
  background:#f8f8f8; color:#125cab; cursor:pointer;
  min-width: 74px;
  text-align: right;
}
#consents-root .consent .toggle:hover{ background:#f2f6fc; border-color:#cfd8e3; }
#consents-root .consent .toggle:focus-visible{ outline:2px solid #125cab; outline-offset:2px; }

/* Sekcja treści – ANIMUJEMY TYLKO max-height (border jest overlayem, więc nie „żyje” osobno) */
#consents-root .consent .content{
  grid-column:1 / -1;
  position:relative;
  overflow:hidden;
  max-height:0;                 /* zamknięte */
  transition:max-height 350ms ease;
  margin-top:8px;               /* stały odstęp nad treścią */
}

/* Linia jako overlay (nie zmienia wymiarów, więc nie „skacze”) */
#consents-root .consent .content::before{
  content:"";
  position:absolute; left:0; right:0; top:0; height:1px;
  box-shadow:inset 0 1px 0 #dddddd;
  pointer-events:none;
}

/* Wnętrze treści – padding w środku, nie animujemy marginesów */
#consents-root .consent .content-inner{ padding-top:8px; }
#consents-root .consent .content-inner p{ margin:0 0 10px 0; }

/* Otwarta sekcja może mieć max-height:auto (ustawiane JS-em po animacji) */
#consents-root .consent .content.is-auto{ max-height:none; }

/* Główny przycisk – po prawej */
#submit-consents.btn-primary,
#submit-consents{
  display:inline-block; float:right;
  margin-top:8px; padding:12px 32px;
  background:#125cab; color:#fff;
  border:1px solid #125cab; border-radius:4px;
  cursor:pointer; font-size:16px;
}
#submit-consents.btn-primary:hover,
#submit-consents:hover{ background:#2B6EC4; border-color:#2B6EC4; }
#submit-consents:disabled{ opacity:.6; cursor:not-allowed; }

/* Clearfix dla float */
.module.wrap-article::after{ content:""; display:block; clear:both; }

/* Szacunek dla prefers-reduced-motion */
@media (prefers-reduced-motion:reduce){
  #consents-root .consent .content{ transition:none; }
}

#consents-root .consent {
  column-gap: 12px;
  row-gap: 0;            /* było 8px */
}

#consents-root .consent .content {
  margin-top: 0;         /* było 8px */
}

#consents-root .consent .content-inner > :last-child {
  margin-bottom: 0;
}

#consents-root .consent {
  padding: 12px 16px;    /* było 14px 16px */
}

#consents-root .consent .content-inner {
  padding-top: 30px;
}

#consents-root .consent .content::before {
  top: 20px;
}

/* wariant bez checkboxa */
#consents-root .consent.consent--info {
  display:grid;
  grid-template-columns: 1fr auto;  /* label + toggle */
  column-gap:12px; row-gap:8px; align-items:center;
  padding-bottom: 4px;
}
#consents-root .consent.consent--info .label-as-title {
  font-weight:700;
  font-size: 16px;
}

#t-CRMDataAdministrator::before {
	top: 12px!important;
}

#t-CRMDataAdministrator .content-inner {
	padding-top: 20px!important;
	padding-bottom: 8px!important;
}

@media screen and (max-width: 1024px) {
#consents-root .consent .content {
	margin-bottom: 0;
}
#consents-before-submit-text {
	margin-bottom: 20px;
}
.breadcrumbs {
	height: 20px !important;
	padding: 0 !important;
}
}

#consents-lang {
	display: none;
}

#consents-header-text {
	margin-bottom: 20px;
}

#consents-claim {
	margin-bottom: 24px;
}

#consents-before-submit-text {
	margin-top: 20px;
}

/** dodatki **/

/* Widoczny fokus na całej karcie przy pracy klawiaturą */
/*
#consents-root .consent:focus-within {
  outline: 2px solid #125cab;
  outline-offset: 2px;
}
*/

/* Fokus na samym checkboxie i toggle już masz – to tylko ujednolicenie */
#consents-root .consent input[type="checkbox"]:focus-visible {
  outline: 2px solid #125cab;
  outline-offset: 2px;
}

#consents-root .consent .content-inner {
  overflow-wrap: anywhere;    /* łamie bardzo długie URLe/ciągi */
  word-break: break-word;
}

/*
#consents-root .consent .content-inner a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
#consents-root .consent .content-inner a:hover {
  text-decoration-thickness: 2px;
}
*/

@media (forced-colors: active) {
  #consents-root .consent {
    border-color: CanvasText;
  }
  #consents-root .consent .toggle,
  #submit-consents {
    border: 1px solid CanvasText;
    background: ButtonFace;
    color: ButtonText;
  }
  #consents-root .consent .toggle:focus-visible,
  #submit-consents:focus-visible {
    outline: 2px solid Highlight;
  }
}

@media print {
  #consents-root .consent { box-shadow: none; border-color: #ccc; }
  #consents-root .consent .toggle,
  #submit-consents { display: none !important; }
  #consents-root .consent .content {
    max-height: none !important;
    overflow: visible !important;
  }
}

@media (hover: none) and (pointer: coarse) {
  #consents-root .consent input[type="checkbox"] { width: 22px; height: 22px; }
  #consents-root .consent label { line-height: 1.3; }
  #consents-root .consent .toggle { padding: 8px 12px; }
}

#consents-root .consent .toggle .material-icons {
  font-size: 20px;
  line-height: 1;
  vertical-align: middle;
  margin-left: 0px; /* ikona po prawej od tekstu */
  margin-right: -9px;
}

@media screen and (max-width: 550px) {
#consents-root .consent {
  padding: 12px 10px 12px 14px;
}
}