/* Same-origin privacy UI. It is nonmodal; focus moves only after explicit privacy actions. */
#mgx-privacy, #mgx-choices, .mgx-placeholder {font:14px/1.5 'Inter',system-ui,sans-serif;color:#1e1f22;background:#f0efec;box-sizing:border-box;}
/* The layout observer measures wrapped status text; fallbacks cover no-JS pages. */
:root {--mgx-privacy-height:60px;scroll-padding-bottom:calc(var(--mgx-privacy-height) + 16px);}
#mgx-privacy {position:fixed;bottom:0;left:0;right:0;z-index:10001;padding:4px 16px;padding-bottom:calc(4px + env(safe-area-inset-bottom,0px));border-top:1px solid #1e1f2224;display:flex;gap:8px;align-items:center;flex-wrap:nowrap;background:rgba(240,239,236,.97);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);}
#mgx-privacy-status {flex:1;min-width:0;font-size:12px;line-height:1.4;color:#42464b;}
body {padding-bottom:calc(var(--mgx-privacy-height) + 16px)!important;}
#mgx-choices {position:fixed;bottom:calc(var(--mgx-privacy-height) + 8px);right:16px;width:min(360px,calc(100% - 32px));max-height:55vh;max-height:min(55dvh,calc(100dvh - var(--mgx-privacy-height) - 24px));overflow:auto;z-index:10002;padding:12px;border:1px solid #1e1f2240;border-radius:6px;box-shadow:0 4px 16px #0002;}
#mgx-choices[hidden], .mgx-placeholder[hidden] {display:none!important;}
#mgx-choices h2 {font:600 18px/1.2 'Inter',system-ui,sans-serif;margin:0 0 6px;color:#1e1f22;}
#mgx-choices p {margin:6px 0;color:#1e1f22;font-size:14px;}
#mgx-choices a {color:#76232e;text-decoration:underline;}
#mgx-choices summary {cursor:pointer;font-weight:600;padding:8px 0;}
#mgx-choices .mgx-purpose {display:flex;gap:10px;align-items:flex-start;margin:12px 0;line-height:1.5;text-align:left;text-transform:none;letter-spacing:normal;}
#mgx-choices input {width:18px;height:18px;flex:none;margin:3px 0;accent-color:#922f39;}
#mgx-privacy button,#mgx-choices button,.mgx-placeholder button {font:600 13px/1.4 'Inter',system-ui,sans-serif;color:#fff;background:#76232e;border:2px solid #76232e;padding:9px 12px;min-height:40px;border-radius:4px;cursor:pointer;text-transform:none;letter-spacing:normal;}
#mgx-privacy button:focus-visible,#mgx-choices button:focus-visible,.mgx-placeholder button:focus-visible {outline:3px solid #375c68;outline-offset:3px;}
#mgx-choices button:disabled {opacity:.5;cursor:not-allowed;}
.mgx-actions {display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;}
.mgx-actions [data-accept],.mgx-actions [data-reject] {flex:1;min-width:180px;}
.mgx-placeholder {padding:16px;border:1px solid #938b78;border-radius:4px;}
/* Neutral, equally weighted controls retain 44px touch targets. */
#mgx-privacy button {flex:none;min-height:44px;min-width:44px;padding:5px 10px;border:1px solid #666b735c;background:transparent;color:#34383e;font-size:12px;font-weight:500;line-height:1.35;white-space:nowrap;}
#mgx-privacy button:hover {background:#ffffffb3;border-color:#666b73;}
#mgx-privacy button:focus-visible {outline:2px solid #375c68;outline-offset:2px;}
@media(max-width:640px) {
  :root {--mgx-privacy-height:88px;}
  #mgx-privacy {flex-wrap:wrap;column-gap:8px;row-gap:2px;padding:4px 8px;padding-bottom:calc(4px + env(safe-area-inset-bottom,0px));}
  #mgx-privacy-status {flex-basis:100%;font-size:12px;line-height:1.4;}
  #mgx-privacy button {flex:1;min-width:0;padding-inline:6px;white-space:normal;}
  #mgx-choices {right:8px;width:min(360px,calc(100% - 16px));max-height:50vh;max-height:min(50dvh,calc(100dvh - var(--mgx-privacy-height) - 24px));}
}

/* Keep the essential accessibility control clear of the nonmodal privacy panel. */
html body .asw-menu-btn {top:80px!important;bottom:auto!important;left:auto!important;right:12px!important;transform:none!important;z-index:10000!important;}
/* Content-width, equal Accept/Reject controls reduce visual bulk without shrinking targets. */
#mgx-choices .mgx-actions {display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;}
#mgx-choices .mgx-actions button {flex:none;width:auto;min-width:44px;min-height:44px;padding:6px 8px;border:1px solid #666b735c;background:transparent;color:#34383e;font-weight:500;}
#mgx-choices .mgx-actions button:hover {background:#fff;border-color:#666b73;}
#mgx-choices .mgx-actions [data-accept],#mgx-choices .mgx-actions [data-reject] {min-width:134px;width:auto;}

/* One persistent disclosure button; status and choices are inside its panel. */
#mgx-privacy {left:auto;right:8px;bottom:0;width:auto;max-width:calc(100% - 16px);padding:4px 0;padding-bottom:calc(4px + env(safe-area-inset-bottom,0px));border:0;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;}
#mgx-privacy button {display:flex;align-items:center;gap:8px;flex:none;font-size:13px;background:#f0efec;border-color:#666b73;padding:6px 10px;white-space:normal;}
#mgx-privacy button svg {flex:none;}
#mgx-privacy button:disabled {cursor:default;}
#mgx-privacy-status {font-size:13px;line-height:1.5;}
#mgx-choices .mgx-heading {display:flex;align-items:center;justify-content:space-between;gap:8px;}
#mgx-choices .mgx-heading h2 {margin:0;}
#mgx-choices [data-close], #mgx-choices #mgx-withdraw, #mgx-choices [data-save] {min-height:44px;padding:6px 8px;border:1px solid #666b735c;background:transparent;color:#34383e;font-weight:500;}
#mgx-choices [data-close] {flex:none;}
