/* ============================================================
   COOKIE CONSENT  ·  mu-plugins/mflash-consent.php
   Figma "MFlash Landing 2026" — «Cookies banner» 2791:206998
   (2794:207093 at rest, 2794:207881 hover).

   Loaded only while consent is missing. Theme tokens are read
   where they exist, with the design's literals as fallbacks, so
   the banner still renders correctly under another theme.
   ============================================================ */

.mflash-consent {
  position: fixed;
  left: 50%;
  bottom: 24px;
  translate: -50% 0;
  z-index: 50;                     /* above .mflash-fab (40), below the modals (100) */
  box-sizing: border-box;
  width: min(700px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: #fff;
  border: 1px solid #E7EAEF;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(178, 171, 215, .2);
  font-family: var(--wp--preset--font-family--sans, 'Onest', system-ui, sans-serif);
  transition: opacity .25s ease, translate .25s ease;
}
.mflash-consent.is-leaving {
  opacity: 0;
  translate: -50% 12px;
}

.mflash-consent__text,
.mflash-consent-embed__text {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #202124;
}
.mflash-consent__text a,
.mflash-consent-embed__card a {
  color: var(--link-indigo, #23079D);
  text-decoration: underline;
  text-decoration-color: #DED7FF;
  text-decoration-thickness: 5%;
  text-underline-offset: 3px;
}

.mflash-consent__btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 8px 20px;
  background: #fff;
  border: 1px solid var(--link-indigo, #23079D);
  border-radius: 8px;
  color: var(--link-indigo, #23079D);
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease;
}
.mflash-consent__btn:hover { background: #EDEDFF; }
.mflash-consent__btn:focus-visible {
  outline: 2px solid var(--link-indigo, #23079D);
  outline-offset: 2px;
}

/* The floating demo pill / scroll-to-top sits in the same bottom band; where the two would
   meet, lift it clear of the banner. consent.js publishes the banner's height. */
@media (max-width: 1200px) {
  :root:has([data-mflash-consent-banner]) .mflash-fab {
    translate: 0 calc(-1 * (var(--mflash-consent-h, 90px) + 12px));
  }
}

@media (max-width: 640px) {
  .mflash-consent {
    bottom: 16px;
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
  }
  .mflash-consent__btn { width: 100%; padding-block: 10px; }
}

/* ------------------------------------------------------------
   Blocked embed. No Figma frame exists for it: it is the
   banner's card and button, centred over the embed's box.
   ------------------------------------------------------------ */
.mflash-consent-embed {
  position: relative;
  display: block;
}
.mflash-consent-embed > iframe { display: block; }
/* Core's responsive embeds position the iframe absolutely against the wrapper; the extra
   node in between must take over that box or the iframe collapses to nothing. */
.wp-has-aspect-ratio .mflash-consent-embed {
  position: absolute;
  inset: 0;
}

.mflash-consent-embed__notice {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--surface, #F7F8FA);
  font-family: var(--wp--preset--font-family--sans, 'Onest', system-ui, sans-serif);
}
.mflash-consent-embed__card {
  box-sizing: border-box;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: #fff;
  border: 1px solid #E7EAEF;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(178, 171, 215, .2);
  text-align: center;
}
.mflash-consent-embed__text {
  display: block;
  flex: none;
}

@media (prefers-reduced-motion: reduce) {
  .mflash-consent,
  .mflash-consent__btn { transition: none; }
}
