/* Scoped additions only: preserve the existing MBM layout and typography. */
/* Keep new footer controls above the existing floating WhatsApp. */
footer:has(#mbm-consent-reopen) { padding-bottom: 100px; }
#mbm-consent {
  position: fixed; inset: auto 16px 100px auto; margin: 0;
  width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 116px);
  overflow-y: auto; z-index: 10000; padding: 20px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow);
  font-size: 14px; line-height: 1.5;
}
#mbm-consent::backdrop { background: rgb(18 16 15 / 35%); }
#mbm-consent h2 { font: 600 20px/1.3 Inter, system-ui, sans-serif; margin: 0 0 10px; }
#mbm-consent p { margin: 10px 0; }
#mbm-consent summary { cursor: pointer; text-decoration: underline; }
#mbm-consent .mbm-decisions { display: block; margin: 0; }
#mbm-consent .mbm-decisions button { display: block; }
#mbm-consent button:focus-visible, #mbm-consent summary:focus-visible, #mbm-consent-reopen:focus-visible {
  outline: 3px solid var(--wine); outline-offset: 3px;
}
#mbm-consent-reopen, #mbm-consent [data-close], #mbm-consent [data-choice="denied"] {
  background: transparent; color: inherit; border: 0; text-decoration: underline;
  cursor: pointer; padding: 10px 4px; min-height: 44px;
}
#mbm-consent-status { font-size: 13px; }
@media (max-width: 600px) {
  #mbm-consent { inset: auto 12px 100px 12px; width: auto; max-height: calc(100dvh - 116px); padding: 16px; }
}

/* Compact informational notice. Both actions share hierarchy and touch size. */
#mbm-notice[hidden] { display: none; }
#mbm-notice {
  position: fixed; right: 16px; bottom: 100px; z-index: 9999;
  width: min(740px, calc(100vw - 32px)); padding: 14px 16px;
  display: flex; align-items: center; gap: 20px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow);
  font: 400 13px/1.5 Inter, system-ui, sans-serif;
}
#mbm-notice p { margin: 0; flex: 1; }
#mbm-notice a { color: var(--wine); text-decoration: underline; text-underline-offset: 3px; }
.mbm-notice-actions { display: flex; gap: 8px; }
#mbm-notice button {
  min-height: 44px; padding: 10px 12px; border: 1px solid var(--wine);
  border-radius: 6px; background: transparent; color: var(--wine);
  font: 600 11px/1.3 Inter, system-ui, sans-serif; text-transform: uppercase;
  letter-spacing: .04em; cursor: pointer;
}
#mbm-notice button:hover { background: var(--paper-2); }
#mbm-notice button:focus-visible, #mbm-notice a:focus-visible,
#mbm-consent a:focus-visible { outline: 3px solid var(--wine); outline-offset: 3px; }
#mbm-consent-status { padding: 10px 12px; background: var(--paper-2); border-radius: 6px; }
@media (max-width: 600px) {
  #mbm-notice { left: 12px; right: 12px; bottom: 100px; width: auto; display: block; padding: 12px; }
  .mbm-notice-actions { margin-top: 10px; }
  #mbm-notice button { flex: 1; }
}

/* On narrow screens the notice occupies its own row: never overlays page CTAs. */
@media (max-width: 600px) {
  #mbm-notice { position: relative; inset: auto; margin: 12px; width: auto; z-index: 1; }
}

/* Consent-choice preview: equal choice controls; existing compact layout retained. */
#mbm-consent .mbm-decisions { display: flex; gap: 8px; margin: 12px 0; }
#mbm-consent .mbm-decisions button {
  flex: 1; min-height: 44px; padding: 10px 12px; border: 1px solid var(--wine);
  border-radius: 6px; background: transparent; color: var(--wine);
  font: 600 12px/1.3 Inter, system-ui, sans-serif; cursor: pointer; text-decoration: none;
}
#mbm-consent .mbm-decisions button:hover { background: var(--paper-2); }
#mbm-notice button { flex: 1; }

/* Local mobile presentation only. Preserve consent markup, state and scripts. */
@media (max-width: 600px) {
  #mbm-notice {
    position: fixed; inset: auto 0 0; margin: 0; width: auto;
    z-index: 9999; padding: 4px 10px 10px;
    border-radius: 12px 12px 0 0;
    font-size: 13px; line-height: 1.4;
  }
  #mbm-notice p a, #mbm-consent p a { display: inline-flex; align-items: center; min-height: 44px; }
  #mbm-notice .mbm-notice-actions { margin-top: 0; margin-right: 144px; gap: 8px; }
  #mbm-notice button {
    position: relative; isolation: isolate; flex: 0 1 80px;
    font-size: 12px; min-width: 0; padding: 0 8px; min-height: 44px;
    border: 0; border-radius: 0; background: transparent;
  }
  #mbm-notice button::before {
    content: ''; position: absolute; inset: 7px 0; z-index: -1;
    border: 1px solid rgb(64 17 31 / 14%); border-radius: 999px;
    background: var(--paper-2);
  }
  #mbm-notice button:hover { background: transparent; }
  #mbm-notice button:hover::before { background: #e9dfd5; }
  body:has(#mbm-notice:not([hidden])) .whatsapp-float {
    z-index: 10000; right: 10px; bottom: 10px;
    min-width: 132px; height: 44px; padding: 0 12px;
  }
}

@media (max-width: 600px) {
  body:has(#mbm-notice:not([hidden])) footer:has(#mbm-consent-reopen) { padding-bottom: 230px; }
}
