.consent-banner,
.consent-dialog {
  font-family: Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.consent-banner {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  left: max(18px, env(safe-area-inset-left));
  z-index: 3000;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  max-width: 1080px;
  margin-inline: auto;
  gap: 20px;
  padding: 20px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 18px;
  color: #fff;
  background: #073f52;
  box-shadow: 0 24px 60px rgb(1 32 43 / 28%), 0 4px 16px rgb(1 32 43 / 18%);
  box-sizing: border-box;
}

.consent-banner[hidden],
.consent-backdrop[hidden] { display: none; }

.consent-banner-copy { display: grid; gap: 5px; }
.consent-banner-copy strong { font-size: 17px; text-wrap: balance; }
.consent-banner-copy p { max-width: 680px; margin: 0; color: rgb(255 255 255 / 78%); line-height: 1.5; text-wrap: pretty; }
.consent-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.consent-actions button,
.consent-settings-button,
.consent-close {
  min-width: 40px;
  min-height: 40px;
  border: 1px solid rgb(255 255 255 / 26%);
  border-radius: 10px;
  padding: 8px 13px;
  color: #fff;
  background: rgb(255 255 255 / 8%);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition-property: background-color, border-color, box-shadow, transform;
  transition-duration: 150ms;
}
.consent-actions button:hover { background: rgb(255 255 255 / 16%); }
.consent-actions .consent-primary { border-color: #b8e1e9; color: #073f52; background: #d9f4f8; }
.consent-actions .consent-primary:hover { background: #fff; }
.consent-actions button:active,
.consent-settings-button:active,
.consent-close:active { transform: scale(.96); }
.consent-actions button:focus-visible,
.consent-settings-button:focus-visible,
.consent-close:focus-visible,
.consent-option input:focus-visible + label { outline: 3px solid #67c6dc; outline-offset: 3px; }

.consent-settings-button {
  min-width: 0;
  margin-top: 16px;
  border-color: currentColor;
  color: inherit;
  background: transparent;
  opacity: .82;
}

.consent-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgb(0 25 34 / 66%);
  box-sizing: border-box;
}
.consent-dialog-open { overflow: hidden; }
.consent-dialog {
  position: relative;
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 32px));
  overflow-y: auto;
  padding: 26px;
  border-radius: 20px;
  color: #17242a;
  background: #fff;
  box-shadow: 0 30px 90px rgb(0 20 28 / 38%);
  box-sizing: border-box;
}
.consent-dialog h2 { margin: 0 48px 20px 0; font-size: clamp(22px, 4vw, 30px); line-height: 1.15; text-wrap: balance; }
.consent-close { position: absolute; top: 16px; right: 16px; padding: 0; border-color: #d7e0e4; color: #173f4d; background: #f4f8f9; font-size: 25px; }
.consent-option { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; padding: 16px 0; border-top: 1px solid #e4eaed; }
.consent-option input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: #16758b; }
.consent-option label { display: grid; gap: 4px; border-radius: 4px; cursor: pointer; }
.consent-option label strong { font-size: 15px; }
.consent-option label span { color: #56656d; line-height: 1.45; text-wrap: pretty; }
.consent-option-locked { opacity: .7; }
.consent-option-locked label { cursor: default; }
.consent-dialog-actions { justify-content: flex-end; margin-top: 8px; }
.consent-dialog-actions button { border-color: #cbd9df; color: #174e61; background: #f4f8f9; }
.consent-dialog-actions .consent-primary { border-color: #075a71; color: #fff; background: #075a71; }

@media (max-width: 760px) {
  .consent-banner { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
  .consent-actions { align-items: stretch; }
  .consent-actions button { flex: 1 1 150px; }
}

@media (max-width: 420px) {
  .consent-banner { right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); left: 8px; border-radius: 14px; }
  .consent-actions { display: grid; grid-template-columns: 1fr; }
  .consent-dialog { padding: 22px 18px; border-radius: 16px; }
  .consent-dialog-actions { display: grid; grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .consent-actions button,
  .consent-settings-button,
  .consent-close { transition: none; }
}
