.mx-consent-banner {
  position: fixed;
  inset: auto 0 0;
  /* Stay above the page, but below Bootstrap's modal backdrop (1050). */
  z-index: 1045;
  max-height: min(50dvh, 22rem);
  overflow-y: auto;
  padding: 0.65rem 0;
  color: #fff;
  background: #20252b;
  border-top: 3px solid #7c3aed;
  box-shadow: 0 -0.5rem 1.5rem rgba(0, 0, 0, 0.22);
}

.mx-consent-banner a { color: #fff; text-decoration: underline; }

.mx-consent-banner__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.mx-consent-banner__summary {
  max-width: 48rem;
  font-size: 0.9rem;
  line-height: 1.35;
}

.mx-consent-banner__actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mx-consent-banner__actions .btn {
  min-width: 6.75rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.875rem;
}

.mx-consent-dialog {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  max-height: calc(100dvh - 1rem);
}

.mx-consent-dialog .modal-content,
.mx-consent-settings-form {
  max-height: calc(100dvh - 1rem);
  min-height: 0;
}

.mx-consent-settings-form {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mx-consent-settings-form .modal-header,
.mx-consent-settings-form .modal-footer {
  flex: 0 0 auto;
}

.mx-consent-settings-form .modal-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mx-consent-settings-trigger {
  position: fixed;
  z-index: 1040;
  left: 1rem;
  bottom: 1rem;
  border: 1px solid #6c757d;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.18);
}

/* Floating page CTAs must not compete with the consent decision. */
body:has(.mx-consent-banner) #rx-get-quote-fab,
body:has(.mx-consent-banner) .rx-cta-fab {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 767.98px) {
  .mx-consent-banner {
    max-height: min(45dvh, 18rem);
    padding: 0.55rem 0;
  }
  .mx-consent-banner__content { align-items: stretch; flex-direction: column; gap: 0.45rem; }
  .mx-consent-banner__summary { font-size: 0.82rem; line-height: 1.25; }
  .mx-consent-banner .small { font-size: 0.75rem; }
  .mx-consent-banner__actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
  .mx-consent-banner__actions form,
  .mx-consent-banner__actions .btn { width: 100%; }
  .mx-consent-banner__actions .btn {
    min-width: 0;
    min-height: 2.35rem;
    padding: 0.35rem 0.2rem;
    font-size: 0.78rem;
    line-height: 1.1;
  }
  .mx-consent-settings-form .modal-header,
  .mx-consent-settings-form .modal-body,
  .mx-consent-settings-form .modal-footer { padding: 0.75rem; }
  .mx-consent-settings-form .form-check { margin-bottom: 0.65rem !important; }
}
