/* Bunny Consent First Paint 1.0.14
   Every rule is scoped with "html [data-bunny-consent-notice="1"]" and buttons with ".btn"
   so they outrank Journal's per-module styles (.module-notification-137 ... .btn, some
   with !important). Layout is flex + order, so the button order is the same whether the
   template renders the accept button before the content (older ), after
   it (Bunny) or the dialog is the JS fallback copy. */

html.bunny-consent-saved [data-bunny-consent-notice="1"],
html [data-bunny-consent-notice="1"][style*="display: none"] {
  display: none !important;
}

html [data-bunny-consent-notice="1"] {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  bottom: 18px !important;
  transform: translateX(-50%) !important;
  width: calc(100% - 32px) !important;
  max-width: 880px !important;
  max-height: calc(100vh - 36px) !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 18px 20px !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  animation: none !important;
  transition: none !important;
  color: #343434 !important;
  background: #fff !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border: 1px solid rgba(128, 0, 128, 0.16) !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 38px rgba(32, 13, 32, 0.22) !important;
  z-index: 2147483646 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  text-align: left !important;
}

html [data-bunny-consent-notice="1"] *,
html [data-bunny-consent-notice="1"] *::before,
html [data-bunny-consent-notice="1"] *::after {
  box-sizing: border-box !important;
}

/* Journal's admin "edit module" pencil (only for logged-in admins). */
html [data-bunny-consent-notice="1"] .admin-edit {
  position: absolute !important;
  top: 4px !important;
  right: 4px !important;
  margin: 0 !important;
}

html [data-bunny-consent-notice="1"] .notification-content {
  order: 0 !important;
  flex: 1 1 340px !important;
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Preferences open: the text and switches take the full row, buttons move below. */
html [data-bunny-consent-notice="1"].bunny-consent-expanded .notification-content {
  flex-basis: 100% !important;
}

html [data-bunny-consent-notice="1"] .notification-content img {
  display: none !important;
}

html [data-bunny-consent-notice="1"] .notification-title {
  margin: 0 0 4px !important;
  padding: 0 !important;
  color: #343434 !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
}

html [data-bunny-consent-notice="1"] .notification-text {
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #343434 !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}

html [data-bunny-consent-notice="1"] .notification-text a {
  color: #800080 !important;
  font-weight: 600 !important;
  text-decoration: underline !important;
}

html [data-bunny-consent-notice="1"] .bunny-consent-settings.btn,
html [data-bunny-consent-notice="1"] .bunny-consent-reject.btn,
html [data-bunny-consent-notice="1"] .notification-close.btn {
  position: static !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  float: none !important;
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 118px !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 10px 16px !important;
  border-radius: 9px !important;
  box-shadow: none !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  white-space: nowrap !important;
  visibility: visible !important;
  opacity: 1 !important;
  cursor: pointer !important;
}

html [data-bunny-consent-notice="1"] .notification-close.btn::before,
html [data-bunny-consent-notice="1"] .notification-close.btn::after {
  content: none !important;
  display: none !important;
}

html [data-bunny-consent-notice="1"] .bunny-consent-settings.btn { order: 2 !important; }
html [data-bunny-consent-notice="1"] .bunny-consent-reject.btn { order: 3 !important; }
html [data-bunny-consent-notice="1"] .notification-close.btn { order: 4 !important; }

html [data-bunny-consent-notice="1"] .bunny-consent-settings.btn,
html [data-bunny-consent-notice="1"] .bunny-consent-reject.btn {
  color: #800080 !important;
  background: #fff !important;
  border: 1px solid #800080 !important;
}

html [data-bunny-consent-notice="1"] .bunny-consent-settings.btn:hover,
html [data-bunny-consent-notice="1"] .bunny-consent-reject.btn:hover {
  background: #f7eef7 !important;
}

html [data-bunny-consent-notice="1"] .notification-close.btn {
  color: #fff !important;
  background: #800080 !important;
  border: 1px solid #800080 !important;
}

html [data-bunny-consent-notice="1"] .notification-close.btn:hover {
  background: #6a006a !important;
}

html [data-bunny-consent-notice="1"] .btn:focus-visible {
  outline: 2px solid #800080 !important;
  outline-offset: 2px !important;
}

html [data-bunny-consent-notice="1"] .bunny-consent-preferences {
  display: block !important;
  max-height: min(45vh, 360px) !important;
  overflow-y: auto !important;
  margin: 10px 0 0 !important;
  padding: 10px 0 0 !important;
  border-top: 1px solid #eaddea !important;
}

html [data-bunny-consent-notice="1"] .bunny-consent-preferences[hidden] {
  display: none !important;
}

html [data-bunny-consent-notice="1"] .bunny-consent-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  margin: 0 !important;
  padding: 9px 0 !important;
  color: #343434 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  cursor: default !important;
}

html [data-bunny-consent-notice="1"] .bunny-consent-row strong {
  display: block !important;
  font-weight: 700 !important;
}

html [data-bunny-consent-notice="1"] .bunny-consent-row small {
  display: block !important;
  color: #6a6a6a !important;
  font-size: 12px !important;
}

html [data-bunny-consent-notice="1"] .bunny-consent-row input {
  flex: 0 0 auto !important;
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
  accent-color: #800080 !important;
  cursor: pointer !important;
}

html [data-bunny-consent-notice="1"] .bunny-consent-save.btn {
  display: block !important;
  width: 100% !important;
  min-height: 40px !important;
  margin: 8px 0 0 !important;
  padding: 10px 16px !important;
  color: #fff !important;
  background: #800080 !important;
  border: 1px solid #800080 !important;
  border-radius: 9px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

/* Footer "Cookie settings" link. */
.bunny-cookie-settings-link,
#bunny-consent-reopen {
  padding: 0 !important;
  color: inherit !important;
  background: transparent !important;
  border: 0 !important;
  text-decoration: underline !important;
  cursor: pointer !important;
}

/* Phones: text on top, "Settings" and "Reject" side by side, "Accept all" full width.
   The extra bottom offset keeps the dialog above Journal's mobile bottom bar. */
@media (max-width: 720px) {
  html [data-bunny-consent-notice="1"] {
    bottom: 64px !important;
    width: calc(100% - 20px) !important;
    max-height: calc(100vh - 84px) !important;
    padding: 14px !important;
    gap: 10px !important;
  }

  html [data-bunny-consent-notice="1"] .notification-content {
    flex: 1 1 100% !important;
  }

  html [data-bunny-consent-notice="1"] .bunny-consent-settings.btn,
  html [data-bunny-consent-notice="1"] .bunny-consent-reject.btn {
    flex: 1 1 calc(50% - 5px) !important;
    min-width: 0 !important;
    padding: 10px 8px !important;
  }

  html [data-bunny-consent-notice="1"] .notification-close.btn {
    flex: 1 1 100% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 380px) {
  html [data-bunny-consent-notice="1"] .notification-text,
  html [data-bunny-consent-notice="1"] .btn {
    font-size: 12px !important;
  }
}
