/* magio: cookie banner, chat label, accessibility menu and its display modes. */

.skip-link { position: fixed; top: 8px; left: 8px; z-index: 2147483647; padding: 10px 16px; border-radius: 10px; background: #1d1d1f; color: #fff; font-size: 14px; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
main:focus { outline: none; }

/* Room at the end of the page, so the floating buttons never cover the footer. */
.footer-base { padding-bottom: 88px; }

.mg-a11y-btn { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 6px 18px rgba(0, 0, 0, 0.18); }

/* chat label */
.mg-chat-tip { position: fixed; display: flex; align-items: center; gap: 2px; padding-inline: 16px 6px !important; z-index: 2147483000; right: 20px; bottom: 28px; height: 40px; padding: 0 16px; border: 1px solid rgba(29, 29, 31, .08); border-radius: 20px; background: #fff; color: #1d1d1f; font: 500 14px/1 inherit; font-family: inherit; white-space: nowrap; cursor: pointer; box-shadow: 0 2px 6px rgba(29, 29, 31, .08), 0 10px 24px -8px rgba(29, 29, 31, .22); }
.mg-chat-tip.has-launcher { right: 84px; }
.mg-chat-tip[hidden] { display: none; }

/* cookie banner */
.mg-cookie { position: fixed; z-index: 2147483002; left: 20px; bottom: 84px; width: min(460px, calc(100vw - 40px)); max-height: calc(100vh - 104px); overflow: auto; box-sizing: border-box; padding: 20px; border: 1px solid rgba(29, 29, 31, .08); border-radius: 16px; background: #fff; color: #1d1d1f; box-shadow: 0 2px 6px rgba(29, 29, 31, .08), 0 24px 56px -16px rgba(29, 29, 31, .3); }
.mg-cookie-title { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.mg-cookie p { margin: 0; font-size: 14px; line-height: 1.5; color: #1d1d1f; }
.mg-cookie a { text-decoration: underline; }
.mg-cookie-actions { display: flex; gap: 10px; margin-top: 14px; }
/* Same look on purpose: rejecting must be as easy as accepting. */
.mg-cookie-btn { flex: 1; height: 44px; border: 1px solid #1d1d1f; border-radius: 22px; background: #fff; color: #1d1d1f; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.mg-cookie-btn:hover { background: #f2f2f0; }

.mg-cookie-choices { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.mg-cookie-choices[hidden] { display: none; }
.mg-cookie-choices label { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; cursor: pointer; }
.mg-cookie-choices input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; }
.mg-cookie-choices b { display: block; font-weight: 600; }
.mg-cookie-more { display: block; width: 100%; height: 36px; margin-top: 6px; border: 0; background: none; color: #1d1d1f; font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
.mg-cookie-more:focus-visible { outline: 2px solid #1d1d1f; outline-offset: 2px; }

/* accessibility menu */
.mg-a11y-btn { position: fixed; z-index: 2147483001; left: 20px; bottom: 24px; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: #1d1d1f; color: #fff; cursor: pointer; box-shadow: 0 2px 6px rgba(29, 29, 31, .12), 0 10px 24px -8px rgba(29, 29, 31, .28); }
.mg-a11y-menu { position: fixed; z-index: 2147483003; left: 20px; bottom: 84px; display: flex; flex-direction: column; gap: 6px; width: min(260px, calc(100vw - 40px)); max-height: calc(100vh - 104px); overflow: auto; box-sizing: border-box; padding: 16px; border: 1px solid rgba(29, 29, 31, .08); border-radius: 16px; background: #fff; color: #1d1d1f; box-shadow: 0 2px 6px rgba(29, 29, 31, .08), 0 24px 56px -16px rgba(29, 29, 31, .3); }
.mg-a11y-menu[hidden] { display: none; }
.mg-a11y-title { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.mg-a11y-opt { display: flex; justify-content: space-between; min-height: 40px; align-items: center; padding: 0 12px; border: 1px solid rgba(29, 29, 31, .16); border-radius: 10px; background: #fff; color: #1d1d1f; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.mg-a11y-opt:hover { background: #f2f2f0; }
.mg-a11y-opt[aria-pressed="true"] { background: #1d1d1f; color: #fff; }
.mg-a11y-link { margin-top: 6px; font-size: 13px; text-decoration: underline; color: #1d1d1f; }

.mg-chat-label:focus-visible, .mg-cookie-btn:focus-visible, .mg-a11y-btn:focus-visible, .mg-a11y-opt:focus-visible, .mg-a11y-link:focus-visible, .mg-cookie a:focus-visible, .skip-link:focus-visible { outline: 2px solid #1d1d1f; outline-offset: 2px; box-shadow: 0 0 0 2px #fff; }

/* display modes, set on <html> */
html.a11y-text-1 body { zoom: 1.15; }
html.a11y-text-2 body { zoom: 1.3; }
html.a11y-contrast { --muted: #2c2c2e; --line: rgba(0, 0, 0, .55); }
html.a11y-contrast body, html.a11y-contrast p, html.a11y-contrast li, html.a11y-contrast span { color: #000; }
html.a11y-contrast .btn-primary, html.a11y-contrast .btn-primary span { background: #000; color: #fff; }
html.a11y-contrast .card { border-color: #000; }
html.a11y-links main a, html.a11y-links footer a { text-decoration: underline; }
html.a11y-font body, html.a11y-font body * { font-family: Arial, Helvetica, sans-serif !important; letter-spacing: .01em; }
html.a11y-font p, html.a11y-font li { line-height: 1.75; }
html.a11y-still, html.a11y-still *, html.a11y-still *::before, html.a11y-still *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.a11y-still .reveal { opacity: 1; transform: none; filter: none; }

@media (max-width: 480px) {
  .mg-a11y-btn { width: 40px; height: 40px; left: 12px; bottom: 14px; }
  .mg-chat-tip, .mg-chat-tip.has-launcher { height: 36px; padding: 0 13px; font-size: 13px; right: 12px; bottom: 16px; }
  .mg-chat-tip { bottom: 28px; }
  html.mg-banner-open .mg-chat-tip { display: none; }
}

/* The bottom bar holds the Book a demo button: the floating buttons stay clear of it. */
body:has(.cta-bar) .mg-a11y-btn { bottom: 8px; }
body:has(.cta-bar) .mg-chat-tip { bottom: 78px; }
@media (max-width: 820px) {
  body:has(.cta-bar) .mg-a11y-btn { bottom: 84px; left: 12px; }
  body:has(.cta-bar) .mg-chat-tip { bottom: 86px; right: 12px; }
  body:has(.cta-bar) .mg-chat-tip.has-launcher { right: 76px; }
  body:has(.cta-bar) #cbwc-launcher { bottom: 78px !important; right: 12px !important; }
}
@media (max-width: 480px) {
  html.mg-banner-open .cta-bar { display: none; }
}

/* chat teaser: text + close */
.mg-chat-tip .mg-chat-label { all: unset; cursor: pointer; font: inherit; font-size: 14px; font-weight: 500; color: #1d1d1f; height: 100%; display: flex; align-items: center; white-space: nowrap; }
.mg-chat-close { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-inline-start: 6px; padding: 0; border: 0; border-radius: 50%; background: #f2f2f0; color: #6e6e73; cursor: pointer; flex: none; }
.mg-chat-close:hover { background: #e6e6e3; color: #1d1d1f; }
.mg-chat-close:focus-visible, .mg-chat-tip .mg-chat-label:focus-visible { outline: 2px solid #1d1d1f; outline-offset: 2px; }
