.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.consent-banner[hidden],
.consent-modal[hidden] {
  display: none !important;
}

.consent-banner {
  position: fixed;
  z-index: 850;
  right: clamp(12px, 3vw, 28px);
  bottom: clamp(12px, 3vw, 28px);
  left: clamp(12px, 3vw, 28px);
  color: var(--navy-mid);
}

.consent-banner__inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: clamp(22px, 3vw, 32px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.42fr);
  gap: clamp(20px, 4vw, 40px);
  align-items: end;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.consent-eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy-mid);
}

.consent-banner h2,
.consent-modal h2 {
  margin: 0 0 10px;
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 600;
  line-height: 1.2;
  color: var(--navy);
}

.consent-banner__copy > p:not(.consent-eyebrow, .consent-banner__links, .consent-status) {
  max-width: 64ch;
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
}

.consent-banner__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  font-size: 13px;
}

.consent-banner__links a,
.consent-modal__legal a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent-banner__actions,
.consent-modal__actions {
  display: grid;
  gap: 8px;
}

.consent-button {
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--navy);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.consent-button:hover {
  border-color: var(--navy);
}

.consent-button--primary {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.consent-button--primary:hover {
  background: var(--blue);
  border-color: var(--blue);
}

.consent-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.consent-button:focus-visible,
.consent-modal__close:focus-visible,
.consent-switch input:focus-visible + span {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.consent-status {
  min-height: 1.5em;
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #b3374a;
}

.consent-modal {
  position: fixed;
  z-index: 900;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 32px);
}

.consent-modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: rgba(11, 38, 25, 0.55);
}

.consent-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  max-height: calc(100dvh - 24px);
  padding: clamp(24px, 4vw, 40px);
  overflow-y: auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(11, 38, 25, 0.28);
}

.consent-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.consent-modal__close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--navy);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.consent-modal__intro {
  margin: 6px 0 22px;
  font-size: 15px;
  line-height: 1.65;
}

.consent-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.consent-category h3 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
}

.consent-category p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.consent-category.is-unavailable h3,
.consent-category.is-unavailable p {
  opacity: 0.65;
}

.consent-switch {
  position: relative;
  display: inline-flex;
  width: 46px;
  height: 25px;
}

.consent-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.consent-switch > span:last-child {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.consent-switch > span:last-child::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--navy-mid);
  transition: transform 0.2s, background 0.2s;
}

.consent-switch input:checked + span {
  border-color: var(--navy);
  background: var(--navy);
}

.consent-switch input:checked + span::after {
  transform: translateX(21px);
  background: #fff;
}

.consent-switch input:disabled + span {
  cursor: not-allowed;
  opacity: 0.6;
}

.consent-modal__actions {
  margin-top: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.consent-modal__legal {
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.6;
}

body.consent-modal-open {
  overflow: hidden;
}

.consent-noscript {
  position: fixed;
  z-index: 850;
  right: 16px;
  bottom: 16px;
  left: 16px;
  max-width: 680px;
  margin: auto;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  font-size: 14px;
  line-height: 1.6;
}

.consent-placeholder {
  padding: clamp(24px, 5vw, 40px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  background: var(--ice);
  border: 1px solid var(--line);
  border-radius: 24px;
  min-height: 220px;
}

.consent-placeholder p {
  max-width: 52ch;
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
}

.consent-placeholder h3 {
  margin: 0;
  font-size: 20px;
}

[data-consent-block] iframe[hidden],
[data-consent-placeholder][hidden] {
  display: none !important;
}

@media (max-width: 860px) {
  .consent-banner__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .consent-banner__actions,
  .consent-modal__actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .consent-banner {
    right: 8px;
    bottom: 8px;
    left: 8px;
  }

  .consent-modal {
    padding: 0;
  }

  .consent-modal__panel {
    min-height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .consent-button,
  .consent-switch > span:last-child,
  .consent-switch > span:last-child::after {
    transition: none;
  }
}
