/**
 * @file Shared, mobile-first privacy notice.
 *
 * This file is loaded after page styles and therefore owns the complete visual
 * contract. Keep the notice compact, centred and clear of persistent navigation.
 */
.gdpr-alert {
  position: fixed;
  right: auto;
  bottom: calc(72px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 88;
  width: auto;
  max-width: calc(100vw - 20px);
  min-height: 52px;
  margin: 0;
  padding: 4px 5px 4px 11px;
  border: 1px solid #d9d2df;
  border-radius: 999px;
  display: grid;
  grid-template-columns: 20px auto 44px;
  align-items: center;
  gap: 8px;
  color: #251a3d;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 12px 34px rgb(37 26 61 / 18%);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
  font: 600 14px/1.3 Inter, system-ui, sans-serif;
}

.gdpr-alert[hidden] { display: none; }
/* Fixed notices need a matching document reserve: the last actionable band
   can therefore scroll completely above the notice instead of sitting under it. */
body:has(> .gdpr-alert:not([hidden])) main::after {
  width: 100%; height: calc(74px + env(safe-area-inset-bottom)); display: block; content: '';
}
.gdpr-alert > img { width: 20px; height: 20px; }
.gdpr-alert > span { display: none; }

.gdpr-alert > a {
  min-width: 0;
  color: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

.gdpr-alert > button {
  position: static;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #251a3d;
  background: #eee9f2;
  transform: none;
  cursor: pointer;
  touch-action: manipulation;
}

.gdpr-alert > button:hover,
.gdpr-alert > button:focus-visible {
  color: #fff;
  background: #4b3575;
  outline: 3px solid rgb(255 139 115 / 34%);
  outline-offset: 2px;
}

/* Tablet widths retain the compact centred form: the product price occupies
   the lower-right quadrant on landscape tablets and must stay unobscured. */
@media (min-width: 680px) {
  .gdpr-alert {
    bottom: calc(82px + env(safe-area-inset-bottom));
    width: auto;
    padding: 4px 5px 4px 11px;
    border-radius: 999px;
    grid-template-columns: 20px auto 44px;
    gap: 10px;
    left: 50%;
  }
  .finder-start form { padding:24px; }
}

/* Desktop has no persistent bottom navigation. */
@media (min-width: 1280px) {
  .gdpr-alert {
    bottom: 14px;
    left: 50%;
    width: min(620px, calc(100vw - 32px));
    padding: 7px 7px 7px 14px;
    border-radius: 16px;
    grid-template-columns: 20px minmax(0, 1fr) auto 44px;
  }
  .gdpr-alert > span { display:block;min-width:0;overflow:hidden;color:#4f465e;font-size:12px;font-weight:450;line-height:1.25;text-overflow:ellipsis;white-space:nowrap; }
  .gdpr-alert > span strong { color:#251a3d;font-weight:650; }
  body:has(> .gdpr-alert:not([hidden])) main::after { height: 72px; }
}

/* Authentication already explains privacy in the journey itself. Keep this
   notice available without masking the form or the brand story. */
.auth-page-ufoundme .gdpr-alert {
  right: auto;
  /* Share the same responsive baseline as readability and back-to-top.
     footer-share.js then applies one common stop shift to all three. */
  bottom: calc(82px + env(safe-area-inset-bottom));
  left: 50%;
  width: auto;
  max-width: calc(100vw - 20px);
  grid-template-columns: 20px auto 44px;
  transform: translateX(-50%);
}
.auth-page-ufoundme .gdpr-alert > span { display: none; }
.auth-page-ufoundme .gdpr-alert { min-height:48px;padding-left:9px;gap:6px; }
.auth-page-ufoundme .gdpr-alert > a { font-size:12px; }
.auth-page-ufoundme .gdpr-alert > button { width:44px;height:44px;min-width:44px; }
@media (min-width:480px) {
  .auth-page-ufoundme .gdpr-alert { min-height:52px;padding-left:11px;gap:8px; }
  .auth-page-ufoundme .gdpr-alert > a { font-size:14px; }
  .auth-page-ufoundme .gdpr-alert > button { width:44px;height:44px;min-width:44px; }
}
@media (max-width:679px) {
  .auth-page-ufoundme .gdpr-alert {
    bottom: calc(72px + env(safe-area-inset-bottom));
  }
}
@media (min-width:1280px) {
  .auth-page-ufoundme .gdpr-alert {
    bottom: calc(14px + env(safe-area-inset-bottom));
  }
}

/* Finder dialog styles share this small stylesheet but are independent from
   the notice above. */
.finder-start { width: min(460px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 24px; color: #251a3d; }
.finder-start::backdrop { background: rgb(23 19 39 / 53%); backdrop-filter: blur(7px); }
.finder-start form { padding: 19px; display: grid; gap: 13px; }
.finder-start form > button:first-child { width: 44px; height: 44px; justify-self: end; border: 0; border-radius: 50%; }
.finder-start small { letter-spacing: .1em; }
.finder-start h2, .finder-start p { margin: 0; }
.finder-start label { display: grid; gap: 7px; font-weight: 650; }
.finder-start textarea { min-height: 110px; padding: 12px; border: 1px solid #d9d2df; border-radius: 14px; resize: vertical; }
.finder-start [data-error] { color: #a32635; }
.auth-page-ufoundme:has(.registration-shell) .gdpr-alert { display: none !important; }

/* P1: keep purchase in its own row. This shared component is also loaded on
   non-home surfaces: do not depend on a deferred marketing/navigation bundle
   to separate the notice from an actionable purchase bar. */
body #layouts .sticky-action {
  bottom: calc(86px + env(safe-area-inset-bottom));
  max-width: calc(100vw - 24px);
}
body #layouts { padding-bottom: 180px; }
/* The footer's last links must be scrollable above persistent controls. */
body:has(> .gdpr-alert) .ufm-footer {
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}
body:has(#layouts.active):has(> .gdpr-alert) .ufm-footer {
  padding-bottom: calc(208px + env(safe-area-inset-bottom));
}
@media (max-width:1279px) {
  /* Answers grow with their translated content. A viewport-height editor
     placed its last actions underneath the fixed mobile navigation. */
  body #aide.help-view {
    height: auto;
    min-height: calc(100svh - 68px);
    padding-bottom: 236px;
    grid-template-rows: auto auto;
    align-content: start;
    overflow: visible;
  }
  body #aide .help-shell { align-items: start; }
  body #aide .help-questions { max-height: 340px; }
  body #aide .help-answer { max-height: none; overflow: visible; }
  body #aide .help-answer>div { margin-top: 24px; }
  body #layouts .sticky-action { bottom: calc(158px + env(safe-area-inset-bottom)); }
  body #layouts { padding-bottom: 250px; }
  body:has(> .gdpr-alert) .ufm-footer {
    padding-bottom: calc(168px + env(safe-area-inset-bottom));
  }
  body:has(#layouts.active):has(> .gdpr-alert) .ufm-footer {
    padding-bottom: calc(280px + env(safe-area-inset-bottom));
  }
}
@media (max-width:767px) {
  body #aide .help-shell { grid-template-rows: minmax(130px,220px) auto; }
}
@media (max-width:1023px) {
  /* Choosing a design must never remove the purchase action on a phone.
     Keep the chosen design and the two actions as separate readable rows. */
  body #layouts .sticky-action {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    gap: 8px;
    padding: 10px;
  }
  body #layouts .sticky-action>span,
  body #layouts .sticky-action>span>span { min-width: 0; }
  body #layouts .sticky-action strong { overflow-wrap: anywhere; }
  body #layouts .sticky-action>div {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 8px;
    width: 100%;
  }
  body #layouts .sticky-action>div :is(.primary,.secondary) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 48px;
    height: auto;
    padding: 8px;
    font-size: .8rem;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  body #layouts { padding-bottom: 320px; }
  body:has(#layouts.active):has(> .gdpr-alert) .ufm-footer {
    padding-bottom: calc(320px + env(safe-area-inset-bottom));
  }
}
/* A contained reader is progressive enhancement only. Both scroll regions
   remain siblings; the answer's actions keep their native document order. */
@media (max-width:1279px) and (min-height:700px) {
  html.ufm-floating-layout-ready body #aide.help-view {
    height: var(--ufm-help-available,calc(100svh - 286px));
    min-height: 0;
    padding-bottom: 14px;
    grid-template-rows: auto minmax(0,1fr);
    overflow: hidden;
  }
  html.ufm-floating-layout-ready body #aide .help-shell {
    min-height: 0;
    align-items: stretch;
  }
  html.ufm-floating-layout-ready body #aide .help-questions {
    min-height: 0;
    max-height: none;
    overflow: hidden;
  }
  html.ufm-floating-layout-ready body #aide .help-answer {
    min-height: 0;
    max-height: none;
    overflow: auto;
    scroll-padding-block: 12px;
  }
  html.ufm-floating-layout-ready body #aide :is(a,button):focus-visible {
    outline: 2px solid #4b3575;
    outline-offset: 2px;
  }
}
@media (max-width:1023px) and (min-height:700px) {
  html.ufm-floating-layout-ready body #aide .help-shell {
    grid-template-rows: minmax(110px,.4fr) minmax(0,.6fr);
  }
}
@media (max-width:599px) {
  html:not(.ufm-mobile-utility-active) body .gdpr-alert {
    bottom: calc(132px + env(safe-area-inset-bottom));
  }
  html:not(.ufm-mobile-utility-active):has(.gdpr-alert:not([hidden])) body #layouts .sticky-action {
    bottom: calc(208px + env(safe-area-inset-bottom));
  }
  html.ufm-mobile-utility-active body #layouts .sticky-action {
    bottom: calc(var(--ufm-mobile-utility-dock-h) + 12px);
  }
  html.ufm-mobile-utility-active:has(.gdpr-alert:not([hidden])) body #layouts .sticky-action {
    bottom: calc(var(--ufm-mobile-utility-dock-h) + 76px);
  }
  body:has(> .gdpr-alert) .ufm-footer {
    padding-bottom: calc(224px + env(safe-area-inset-bottom));
  }
  body:has(#layouts.active):has(> .gdpr-alert) .ufm-footer {
    padding-bottom: calc(376px + env(safe-area-inset-bottom));
  }
  body #layouts { padding-bottom: 376px; }
}
/* P1b: no-JS marketing tools stay in flow. */
html[data-ufm-css-bundle="marketing"]:not(.js) body #layouts .sticky-action {
  position: static;
  inset: auto;
  width: calc(100% - 32px);
  max-width: 1240px;
  margin: 20px auto;
  transform: none;
  translate: none;
}
html[data-ufm-css-bundle="marketing"]:not(.js) body .gdpr-alert {
  position: static;
  inset: auto;
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 16px auto;
  transform: none;
  translate: none;
}
html[data-ufm-css-bundle="marketing"]:not(.js) body .ufm-back-to-top {
  position: static;
  inset: auto;
  width: max-content;
  max-width: calc(100% - 32px);
  margin: 16px auto;
  transform: none;
  translate: none;
}
/* End P1b no-JS marketing flow. */
/* End P1 floating clearance. */

/* P1 eShop utilities: in-flow. */
body.eshop-page > .gdpr-alert {
  position: static;
  inset: auto;
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 16px auto;
  transform: none;
  translate: none;
}
body.eshop-page > .gdpr-alert > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
body.eshop-page > .ufm-back-to-top {
  position: static;
  inset: auto;
  width: max-content;
  max-width: calc(100% - 32px);
  margin: 16px auto;
  transform: none;
  translate: none;
}
body.eshop-page > nav.mobile-app-nav.ufm-public-bottom-nav {
  position: static;
  inset: auto;
  margin-block: 16px;
  transform: none;
  translate: none;
}
/* End P1 eShop utilities. */
