/* PLT-GOOGLE-CONTINUE-WELCOME-POLISH-02 (Mark) — the one-time new-account welcome popup (partials/v3/account-welcome.php).
   Loaded only when the popup is rendered. Every rule is scoped to .aw-*; the shared tokens are only read. It is not the
   "New website" popup (.lh-*) and shares no rule with it. */

/* The same safe centring as the existing automatic popup: the dialog is centred while it fits and starts at the top of
   the scrolling wrapper when it is taller than a short phone; two empty grid rows keep room above and below. */
.aw-wrap {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  justify-items: center;
  align-items: start;
  grid-template-rows: calc(20px + env(safe-area-inset-top, 0px)) minmax(max-content, 1fr) calc(20px + env(safe-area-inset-bottom, 0px));
  padding: 0 20px;
  overflow: auto;
  overscroll-behavior: contain;
}
.aw-wrap::before,
.aw-wrap::after { content: ""; }
.aw-wrap[hidden] { display: none; }

.aw-scrim {
  position: fixed;
  inset: 0;
  background: rgba(12, 24, 14, 0.80); /* the same backdrop depth as the existing automatic popup */
}

.aw-dialog {
  position: relative;
  margin-block: auto;
  width: 100%;
  max-width: 440px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--card, #fff);
  color: var(--ink, #171d18);
  box-shadow: var(--d-modal-depth, 0 30px 80px rgba(0, 0, 0, 0.45));
  animation: aw-in .22s ease-out both;
}
.aw-dialog:focus { outline: none; }
@keyframes aw-in {
  from { transform: translateY(10px) scale(.98); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.aw-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink, #171d18);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(27, 33, 29, 0.08));
}
.aw-close .ico { width: 20px; height: 20px; }
.aw-close:hover { background: #fff; }
.aw-close:focus-visible,
.aw-cta:focus-visible { outline: 3px solid var(--green-bright, #5ab120); outline-offset: 2px; }

/* The top: a quiet green wash with a few soft dots — a small celebration, not a campaign banner. */
.aw-top {
  position: relative;
  padding: 34px 28px 20px;
  text-align: center;
  background:
    radial-gradient(circle at 14% 22%, rgba(142, 21, 102, 0.16) 0 5px, transparent 6px),
    radial-gradient(circle at 24% 62%, rgba(90, 177, 32, 0.28) 0 4px, transparent 5px),
    radial-gradient(circle at 8% 78%, rgba(169, 121, 31, 0.22) 0 3px, transparent 4px),
    radial-gradient(circle at 86% 26%, rgba(90, 177, 32, 0.30) 0 5px, transparent 6px),
    radial-gradient(circle at 78% 66%, rgba(142, 21, 102, 0.14) 0 4px, transparent 5px),
    radial-gradient(circle at 93% 80%, rgba(169, 121, 31, 0.24) 0 3px, transparent 4px),
    linear-gradient(180deg, var(--green-soft, #e4f4dc) 0%, var(--green-softer, #f1f9ec) 58%, var(--card, #fff) 100%);
}

.aw-badge {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--green, #2f8f27);
  color: #fff;
  box-shadow: 0 0 0 8px rgba(47, 143, 39, 0.14), 0 8px 18px rgba(31, 106, 26, 0.24);
  animation: aw-badge .34s cubic-bezier(.2, 1.3, .5, 1) .08s both;
}
.aw-badge .ico { width: 30px; height: 30px; stroke-width: 2.6; }
@keyframes aw-badge {
  from { transform: scale(.6); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.aw-eyebrow {
  display: inline-block;
  margin: 0;
  padding: 5px 12px;
  border-radius: var(--radius-pill, 999px);
  background: #fff;
  color: var(--green-dark, #1f6a1a);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  box-shadow: 0 0 0 1px rgba(31, 106, 26, 0.14);
}

.aw-title {
  margin: 12px 0 0;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink, #171d18);
  overflow-wrap: anywhere;
}
/* the complete first name moves to the next line as one unit when it does not fit */
.aw-name { display: inline-block; color: var(--green-dark, #1f6a1a); }

.aw-lead {
  margin: 8px auto 0;
  max-width: 30ch;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--muted, #566159);
}

.aw-list {
  list-style: none;
  margin: 0;
  padding: 4px 24px 0;
  display: grid;
  gap: 8px;
}
.aw-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--line, #e4e7dd);
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}
.aw-ico {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--green-softer, #f1f9ec);
  color: var(--green-dark, #1f6a1a);
}
.aw-ico .ico { width: 19px; height: 19px; }

.aw-foot { padding: 18px 24px 24px; }
.aw-cta { justify-content: center; gap: 8px; text-decoration: none; }
.aw-cta .ico { width: 18px; height: 18px; }

.aw-help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line, #e4e7dd);
  font-size: 14px;
  color: var(--muted, #566159);
}
.aw-help .aw-whatsapp { margin: 0; }

@media (max-width: 480px) {
  .aw-wrap { padding: 0 14px; }
  .aw-top { padding: 30px 20px 18px; }
  .aw-badge { width: 58px; height: 58px; }
  .aw-title { font-size: 26px; }
  .aw-lead { font-size: 15px; }
  .aw-list { padding: 4px 16px 0; }
  .aw-list li { font-size: 14.5px; }
  .aw-foot { padding: 16px 16px 20px; }
  .aw-help { flex-direction: column; }
}

/* short screens (small phones, landscape): a tighter rhythm so the action stays in view; a taller dialog still scrolls
   inside the wrapper */
@media (max-height: 720px) {
  .aw-top { padding-top: 22px; padding-bottom: 14px; }
  .aw-badge { width: 48px; height: 48px; margin-bottom: 10px; box-shadow: 0 0 0 6px rgba(47, 143, 39, 0.14); }
  .aw-badge .ico { width: 24px; height: 24px; }
  .aw-title { margin-top: 10px; font-size: 24px; }
  .aw-lead { margin-top: 6px; font-size: 14.5px; }
  .aw-list { gap: 6px; }
  .aw-list li { padding: 7px 12px 7px 8px; font-size: 14px; }
  .aw-ico { width: 32px; height: 32px; }
  .aw-foot { padding-top: 14px; padding-bottom: 16px; }
  .aw-help { margin-top: 12px; padding-top: 12px; flex-direction: row; }
}

@media (prefers-reduced-motion: reduce) {
  .aw-dialog,
  .aw-badge { animation: none; }
}
