/*
 * PLT-GOOGLE-ADS-CONVERSION-RECOVERY-01 — the consent bar for Google Ads measurement and the choice block on the
 * Cookies page. Loaded only by views/partials/v3/ads-consent.php, i.e. only while the measurement gate is open for the
 * portal; no current page requests this file.
 *
 * Mark (2026-10-11): small and calm, at the bottom, no overlay, nothing blocked; purple Allow, white Decline, the same
 * size and equally easy; fits a phone. The two buttons are the shop's own .btn-primary / .btn-ghost: this file only
 * sizes and places them. Own class families (.ads-consent*, .ads-choice*, .ads-info*) — it styles nothing that belongs
 * to another component.
 */
.ads-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80; /* above the page and the sticky header (70); below the phone checkout bar (90), drawers and dialogs */
  background: #fff;
  color: var(--ink, #171d18);
  border-top: 1px solid var(--line, #e4e7dd);
  box-shadow: 0 -6px 24px rgba(27, 33, 29, 0.10);
  padding: 14px 0 calc(14px + env(safe-area-inset-bottom, 0px));
}
.ads-consent[hidden] { display: none; }
.ads-consent:focus { outline: none; }
.ads-consent:focus-visible { outline: 3px solid var(--berry-bright, #b81c84); outline-offset: -3px; }

/* The inner element is the shop's own .container, so the bar's text and buttons line up with the page above it. */
.ads-consent__inner {
  display: flex;
  align-items: center;
  gap: 24px;
}
.ads-consent__copy { flex: 1 1 auto; min-width: 0; }
.ads-consent__title {
  margin: 0 0 2px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
}
.ads-consent__text,
.ads-consent__current {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted, #566159);
}
.ads-consent__current { margin-top: 4px; font-weight: 600; color: var(--ink, #171d18); }
.ads-consent__current[hidden] { display: none; }
.ads-consent__more {
  color: var(--berry, #8e1566);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.ads-consent__more:hover { color: var(--berry-dark, #6b0f4d); }
.ads-consent__more:focus-visible { outline: 3px solid var(--berry-bright, #b81c84); outline-offset: 2px; border-radius: 4px; }

.ads-consent__actions {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr; /* two equal columns: neither choice is bigger or easier than the other */
  gap: 10px;
}
.ads-consent__actions .ads-consent__btn {
  min-width: 132px;
  min-height: 44px;
  padding: 10px 22px;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
}

/* The page keeps its own end visible while the bar is open (the script publishes the bar's real height). */
html.has-ads-consent body { padding-bottom: var(--ads-consent-h, 0px); }

@media (max-width: 720px) {
  .ads-consent { padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)); }
  .ads-consent__inner { flex-direction: column; align-items: stretch; gap: 10px; }
  .ads-consent__title { font-size: 14px; }
  .ads-consent__text,
  .ads-consent__current { font-size: 13px; }
  .ads-consent__actions .ads-consent__btn { min-width: 0; width: 100%; }
}

/* ---- the Cookies page: the two sub-headings of the explanation, and the choice block ---- */
.ads-info__title {
  margin: 24px 0 8px;
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.3;
  scroll-margin-top: var(--v2-anchor-offset, calc(var(--chrome-top, 80px) + 16px)); /* "Learn more" and "Cookie settings" land below the sticky header */
}
.ads-choice {
  margin: 16px 0 8px;
  padding: 16px 18px;
  border: 1px solid var(--line, #e4e7dd);
  border-radius: var(--radius, 16px);
  background: #fff;
}
.ads-choice__status { margin: 0 0 12px; font-weight: 600; }
.ads-choice__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 180px));
  gap: 10px;
}
.ads-choice__actions .ads-consent__btn { min-height: 44px; width: 100%; white-space: nowrap; }
.ads-choice__note { margin: 12px 0 0; font-size: 14px; color: var(--muted, #566159); }
@media (max-width: 520px) {
  .ads-choice__actions { grid-template-columns: 1fr 1fr; }
}
