/* Baner zgód (cookies) — styl zgodny z motywem AEC Design
   Paleta z front/scss/config/variables.scss: marka #C7264E, tekst #1B171C, drugorzędny #666, ramki #DDD.
   Przyciski = istniejące klasy motywu .btn / .btn--black. Ostre kanty jak w całym motywie. */

.aecConsent {
  --aec-consent-brand: #c7264e;
  --aec-consent-text: #1b171c;
  --aec-consent-muted: #666;
  --aec-consent-border: #ddd;
  --aec-consent-bg: #fff;

  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  background: var(--aec-consent-bg);
  color: var(--aec-consent-text);
  border-top: 4px solid var(--aec-consent-brand);
  box-shadow: 0 8px 48px 0 hsla(0, 0%, 40%, .25);
  max-height: 100vh;
  overflow-y: auto;
}

.aecConsent[hidden],
.aecConsent [hidden],
.aecConsent__reopen[hidden] {
  display: none !important;
}

.aecConsent__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "text actions"
    "settings settings";
  column-gap: 2rem;
  row-gap: 1rem;
  align-items: center;
  padding: 1.5rem 0;
}

.aecConsent__text { grid-area: text; }
.aecConsent__settings { grid-area: settings; }
.aecConsent__actions { grid-area: actions; }

.aecConsent__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 .4rem;
}

.aecConsent__desc {
  margin: 0;
  color: var(--aec-consent-muted);
  line-height: 1.5;
  max-width: 75ch;
}

.aecConsent__policy {
  color: var(--aec-consent-brand);
  font-weight: 600;
  text-decoration: underline;
  white-space: nowrap;
}

.aecConsent__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  justify-content: flex-end;
}

.aecConsent__btn {
  min-width: 11rem;
}

.aecConsent__link {
  background: none;
  border: 0;
  padding: .5rem 0;
  color: var(--aec-consent-text);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.aecConsent__link:hover { color: var(--aec-consent-brand); }

/* Ustawienia szczegółowe */
.aecConsent__settings {
  border-top: 1px solid var(--aec-consent-border);
}

.aecConsent__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--aec-consent-border);
  margin: 0;
  cursor: pointer;
}

.aecConsent__option:first-child { cursor: default; }

.aecConsent__optionTitle {
  font-weight: 700;
  margin: 0 0 .2rem;
}

.aecConsent__optionDesc {
  margin: 0;
  color: var(--aec-consent-muted);
  font-size: .9rem;
}

.aecConsent__always {
  color: var(--aec-consent-brand);
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
}

/* Przełącznik = natywny checkbox motywu (input[type=checkbox] z dist/styles/main.css) */
.aecConsent__switch {
  flex-shrink: 0;
}

.aecConsent__switch:focus-visible,
.aecConsent__link:focus-visible,
.aecConsent__btn:focus-visible,
.aecConsent__reopen:focus-visible {
  outline: 2px solid var(--aec-consent-brand);
  outline-offset: 2px;
}

/* Ponowne otwarcie ustawień */
.aecConsent__reopen {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 99998;
  background: #fff;
  color: #1b171c;
  border: 1px solid #ddd;
  box-shadow: 0 2px 12px 0 hsla(0, 0%, 40%, .25);
  padding: .45rem .8rem;
  font: inherit;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  opacity: .85;
  transition: opacity .3s, color .3s;
}

.aecConsent__reopen:hover { opacity: 1; color: #c7264e; }

@media (max-width: 991.98px) {
  .aecConsent__inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "text"
      "settings"
      "actions";
  }
  .aecConsent__actions { justify-content: flex-start; }
}

@media (max-width: 575.98px) {
  .aecConsent__inner { padding: 1rem 0; }
  .aecConsent__btn { flex: 1 1 100%; min-width: 0; }
  .aecConsent__desc { font-size: .9rem; }
}
