/* CONSENT-NATIVE (2026-10-13, owner t790u): buttons, switches and title are the settings modal's (public/css/ui.controls.css). */
/* CONSENT-BANNER (2026-10-13): minxa's own cookie banner, built by public/js/consent.js. Its buttons,
   switches and panel title carry the settings modal's classes (.edit-profile-button*, .privacy-toggle*,
   .edit-profile-section-title), styled once in public/css/ui.controls.css for both; this file lays the
   banner out. Colours are the site's variables (public/css/ui.chrome.css :root and its dark block); a
   page that does not load ui.chrome.css (the legal pages) gets .mxConsent-light from consent.js, which
   sets the light-theme values on the banner itself. Dark mode follows prefers-color-scheme, which
   partials/theme-boot rewrites for a forced Light/Dark setting.
   Desktop: a compact card bottom-left, clear of the chat panel on the right. Phone: a short sheet that
   consent.js places above the fixed legal footer and the chat prompt bar. position:fixed, so nothing
   under it moves. Accept and Reject carry the same classes: same size, same colours, same row.
   Signed-in pages link ui.controls.css a second time (with the modals, after this file), so every rule
   here that changes a shared class is one class more specific than ui.controls.css. */
.mxConsent {
  position: fixed;
  left: 16px;
  bottom: calc(2.2rem + 12px);
  z-index: 1000;
  width: min(400px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 1.25rem;
  background: var(--bg-color);
  color: var(--text-color);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .2);
  font-size: .95rem;
  text-align: left;
}
/* A page with no site colours and no dark theme of its own (the legal pages): the light values, so
   the shared button and switch rules have colours there too, and the banner stays light. */
.mxConsent.mxConsent-light {
  --bg-color: #fff;
  --text-color: #000;
  --border: #e2e2e2;
  --accent: #000000;
  --quip-color: #999999;
}
.mxConsent.mxConsent-light .mxConsent-row .edit-profile-button-secondary:hover:not(:disabled) { background: rgba(0, 0, 0, .05); }
.mxConsent[hidden], .mxConsent [hidden] { display: none !important; }
.mxConsent *, .mxConsent *::before, .mxConsent *::after { box-sizing: border-box; }
.mxConsent-first:focus, .mxConsent-title:focus { outline: none; }
.mxConsent-text { margin: 0 0 1rem; }
/* The site's text links (the legal pages' style). */
.mxConsent a { color: inherit; text-decoration: underline; }
/* Reject | Accept | Settings: two equal columns and Settings at its own width. */
.mxConsent-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: .5rem; }
.mxConsent .mxConsent-row .edit-profile-button { font-family: inherit; line-height: inherit; white-space: nowrap; }
.mxConsent .mxConsent-row .edit-profile-button:focus-visible,
.mxConsent a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--quip-color);
}
.mxConsent a:focus-visible { border-radius: 4px; }
.mxConsent-head { margin: 0; }
/* Each choice: the settings modal's toggle row (partials/settings-modal .settings-toggle-with-note:
   label, a hint under it, the switch on the right, in a rounded bordered box). */
.mxConsent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 1rem;
  margin-bottom: .75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.mxConsent-itemText { display: flex; flex-direction: column; min-width: 0; }
.mxConsent-itemName { font-size: 1rem; color: var(--text-color); }
.mxConsent-itemAbout { margin-top: .15rem; font-size: .85rem; color: var(--text-color); opacity: .75; }
.mxConsent-item-off .mxConsent-itemName { opacity: .6; }
.mxConsent .mxConsent-item .privacy-toggle { flex: 0 0 auto; }
/* The checkbox covers its switch (still invisible), so a click or tap on the switch is a click on it. */
.mxConsent .mxConsent-item .privacy-toggle-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  z-index: 1;
  cursor: pointer;
}
.mxConsent .mxConsent-item .privacy-toggle-input:focus-visible + .privacy-toggle-slider {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.mxConsent .mxConsent-item .privacy-toggle-input:disabled { cursor: default; }
.mxConsent .mxConsent-item .privacy-toggle-input:disabled + .privacy-toggle-slider { opacity: .5; cursor: default; }
.mxConsent-note { margin: 0 0 .5rem; font-size: .85rem; color: var(--text-color); opacity: .75; word-break: break-word; }
.mxConsent-links { opacity: 1; }
.mxConsent-doneRow { display: flex; justify-content: flex-end; margin-top: 1rem; }
@media (prefers-reduced-motion: reduce) {
  .mxConsent .mxConsent-item .privacy-toggle-slider,
  .mxConsent .mxConsent-item .privacy-toggle-slider::before,
  .mxConsent .mxConsent-row .edit-profile-button { transition: none; }
}
@media (max-width: 1023px) {
  .mxConsent {
    left: 8px;
    right: 8px;
    width: auto;
    max-width: 520px;
    margin: 0 auto;
    bottom: calc(2.4rem + 64px);
    padding: 1rem;
  }
  .mxConsent-text { margin-bottom: .75rem; }
}
/* Too narrow for three buttons at the modal's size: Reject + Accept (equal) on one row, Settings below. */
@media (max-width: 379px) {
  .mxConsent-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .mxConsent .mxConsent-row .mxConsent-btn-secondary { grid-column: 1 / -1; }
}
