/* Cookie consent. Ink and sunstone, sitting above the dock. */

#mjb-consent {
  position: fixed;
  z-index: 9100;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(max(14px, env(safe-area-inset-bottom, 0px)) + 78px);
  width: min(320px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 12px 12px 14px;
  border-radius: 16px;
  background: #0a0a0a;
  color: #efe9dd;
  border: 1px solid rgba(245, 197, 24, 0.45);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  font: 500 13px/1.45 Inter, sans-serif;
  text-align: left;
  pointer-events: auto;
}
#mjb-consent[hidden] { display: none !important; }
html.booting #mjb-consent,
html.need-login #mjb-consent,
html:has(#ab) #mjb-consent { display: none !important; }
#mjb-consent p { margin: 0; color: #efe9dd; }
#mjb-consent a {
  color: #f5c518;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#mjb-consent a:hover { color: #efe9dd; }
.mjb-consent-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.mjb-consent-actions button {
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  font: 600 13px/1 Inter, sans-serif;
  cursor: pointer;
}
.mjb-consent-actions [data-consent="decline"] {
  background: transparent;
  color: #efe9dd;
  box-shadow: inset 0 0 0 1px rgba(239, 233, 221, 0.28);
}
.mjb-consent-actions [data-consent="decline"]:hover,
.mjb-consent-actions [data-consent="accept"]:hover { transform: translateY(-1px); }
.mjb-consent-actions [data-consent="accept"] {
  background: #f5c518;
  color: #0a0a0a;
}

.consent-settings {
  background: none;
  border: 0;
  padding: 0;
  color: var(--stone, #8c857a);
  font: 500 12px/1 Inter, sans-serif;
  cursor: pointer;
}
.consent-settings:hover { color: #f5c518; }
.legal-links .consent-settings { font: 500 12px/1 Inter, sans-serif; }
.consent-settings-solid {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  background: #f5c518;
  color: #0a0a0a;
  border-radius: 999px;
  padding: 8px 14px;
  font: 600 13px/1 Inter, sans-serif;
}
.consent-settings-solid:hover { color: #0a0a0a; }

body:not(:has(#desk)) #mjb-consent {
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
}

@media (max-width: 760px), (max-height: 500px) and (min-width: 761px) and (max-width: 1100px) and (pointer: coarse) {
  #mjb-consent {
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    width: auto;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 168px);
  }
}
