/* Memory Clone cookie banner (owner decision 2026-10-09; assets/js/mc-consent.js).
   Fixed to the bottom of the viewport, above the header (2147483000) and below the
   auth / confirm / alpha dialogs (2147483500+), so it never covers their buttons. */
.mc-consent {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 2147483200;
  width: min(1080px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "main actions" "panel panel";
  align-items: center;
  gap: 12px 22px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 193, 91, .28);
  border-radius: 18px;
  background: rgba(13, 17, 28, .97);
  color: #fffaf0;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: .9rem;
  line-height: 1.45;
}
.mc-consent[hidden] { display: none !important; }
.mc-consent:focus { outline: none; }
.mc-consent:focus-visible { outline: 2px solid #ffd7a3; outline-offset: 3px; }

.mc-consent-main { grid-area: main; min-width: 0; }
.mc-consent .mc-consent-text { margin: 0; color: rgba(255, 250, 240, .9); }
.mc-consent .mc-consent-more {
  display: inline-block;
  margin-top: 4px;
  color: #8ef1dd;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.mc-consent .mc-consent-more:hover { color: #ffc15b; }

.mc-consent-actions {
  grid-area: actions;
  /* Equal columns sized by the longest label: no button is clipped or smaller. */
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 8px;
}
/* Equal weight: the three choices share one style and size. */
html body .mc-consent .mc-consent-btn {
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, .26) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .08) !important;
  color: #fffaf0 !important;
  font: inherit;
  font-size: .88rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none !important;
  transition: background-color .15s ease, border-color .15s ease;
}
html body .mc-consent .mc-consent-btn:hover { background: rgba(255, 255, 255, .16) !important; border-color: rgba(255, 193, 91, .6) !important; }
html body .mc-consent .mc-consent-btn:focus-visible { outline: 2px solid #ffd7a3; outline-offset: 2px; }
html body .mc-consent .mc-consent-btn[aria-expanded="true"] { border-color: rgba(142, 241, 221, .7) !important; }

.mc-consent-panel {
  grid-area: panel;
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.mc-consent-panel[hidden] { display: none !important; }
.mc-consent-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
}
.mc-consent-option-text { min-width: 0; }
.mc-consent .mc-consent-label { font-weight: 800; color: #fffaf0; cursor: pointer; }
.mc-consent .mc-consent-always {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(142, 241, 221, .14);
  color: #8ef1dd;
  font-size: .74rem;
  font-weight: 800;
}
.mc-consent-option p { margin: 3px 0 0; color: rgba(255, 250, 240, .72); font-size: .84rem; }

/* Switch (checkbox with role="switch"). */
.mc-consent .mc-consent-switch {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  position: relative;
  width: 46px;
  height: 26px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  cursor: pointer;
  transition: background-color .15s ease;
}
.mc-consent .mc-consent-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fffaf0;
  transition: transform .15s ease;
}
.mc-consent .mc-consent-switch:checked { background: linear-gradient(135deg, #2458ff, #23a8ff); border-color: rgba(91, 177, 255, .6); }
.mc-consent .mc-consent-switch:checked::after { transform: translateX(20px); }
.mc-consent .mc-consent-switch:disabled { cursor: not-allowed; opacity: .75; }
.mc-consent .mc-consent-switch:focus-visible { outline: 2px solid #ffd7a3; outline-offset: 2px; }
html body .mc-consent .mc-consent-save { justify-self: end; min-width: 160px; }

/* Polite status after a choice (screen readers; visually hidden). */
.mc-consent-status {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* While the banner shows, the page can scroll past it and the language
   suggestion moves above it. */
body.mc-consent-visible { padding-bottom: var(--mc-consent-h, 0px); }
body.mc-consent-visible .mc-lang-suggest { bottom: calc(16px + var(--mc-consent-h, 0px)); }

@media (max-width: 860px) {
  .mc-consent {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "main" "panel" "actions";
    gap: 10px;
  }
}

@media (max-width: 520px) {
  .mc-consent {
    bottom: 10px;
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    padding: 13px 13px 12px;
    border-radius: 16px;
    font-size: .84rem;
  }
  .mc-consent-actions { gap: 6px; }
  /* Three equal columns; long translations wrap inside the button. */
  html body .mc-consent .mc-consent-btn { padding: 6px 8px; font-size: .8rem; white-space: normal; overflow-wrap: anywhere; hyphens: auto; }
  html body .mc-consent .mc-consent-save { justify-self: stretch; width: 100%; }
  .mc-consent-option { padding: 9px 10px; }
  .mc-consent-option p { font-size: .8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .mc-consent .mc-consent-switch, .mc-consent .mc-consent-switch::after, html body .mc-consent .mc-consent-btn { transition: none; }
}
