/* VetPets email/SMS scratch popup — styles.
 *
 * Port of the live shopvetpets.com `vetpets_popup` theme section (evergreen
 * mode; the World Animal Week skin is intentionally dropped). Rules are the
 * live ones verbatim, re-scoped from the section id to #vetpets-popup.
 * Markup is built by /theme/vetpets-popup.js; pages include both files via
 * scripts/popup_inject.py. Source of truth: public-src/vetpets-popup.css
 * (public/theme/vetpets-popup.css is a byte-identical copy).
 */

/* Plus Jakarta Sans (SIL OFL 1.1), self-hosted latin subset, variable 400-800. */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(vpp-plus-jakarta-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


#vetpets-popup.vpp-root {
  --vpp-brand: #47b5e9;
  --vpp-brand-hover: #41a6d6;
  --vpp-accent: #13b6b5;
  --vpp-ink: #000000;
  --vpp-body: #333333;
  --vpp-muted: #7a8791;
  --vpp-error: #e5484d;
  --vpp-field-bg: #f7fafc;
  --vpp-field-border: #dde7ef;
  --vpp-surface: #ffffff;
  --vpp-panel: #c9eef9;
  --vpp-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- overlay: fixed, full-viewport, optically centred ---------- */
#vetpets-popup.vpp-root {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  overflow-x: hidden;
  overflow-y: auto;
  background: linear-gradient(180deg, #d5f7ff 0%, #eafbff 46%, #ffffff 100%);
  font-family: var(--vpp-font);
  -webkit-font-smoothing: antialiased;
}
#vetpets-popup.vpp-root.vpp-open {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: vpp-fade .28s ease both;
}


/* ---------- inherited metrics, pinned ----------
   On live the section inherits these from the theme's body/h1 rules. They are
   pinned to the same values here so the popup renders identically on any page
   the injector puts it on. */
#vetpets-popup.vpp-root {
  font-size: 15px; font-style: normal; font-weight: 400;
  line-height: 1.8; letter-spacing: .04em;
  color: rgba(18,18,18,.9); text-align: left;
}
#vetpets-popup, #vetpets-popup *, #vetpets-popup *::before, #vetpets-popup *::after { box-sizing: border-box; }
@media (min-width: 750px) { #vetpets-popup.vpp-root { font-size: 16px; } }
#vetpets-popup .vpp-title { font-family: var(--font-heading-family, Geist, sans-serif); font-style: normal; word-break: break-word; }
#vetpets-popup .vpp-sub { font-family: inherit; }

@keyframes vpp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes vpp-fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- tiled VetPets mark: above the gradient, below all content ---------- */
#vetpets-popup .vpp-tile {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}
#vetpets-popup .vpp-tile-desktop { display: none; }

#vetpets-popup .vpp-close {
  position: absolute; top: 18px; right: 18px; z-index: 6;
  width: 44px; height: 44px; border-radius: 999px; border: none; padding: 0;
  background: rgba(0,0,0,.06); color: var(--vpp-body);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
#vetpets-popup .vpp-close:hover { background: rgba(0,0,0,.11); }

/* ---------- centred content wrapper; photo cards anchor to THIS ---------- */
#vetpets-popup .vpp-wrap {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1400px;
  min-width: 0;
  margin: auto;
  padding: 24px 25px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

#vetpets-popup .vpp-photo { display: none; border-radius: 16px; object-fit: cover; object-position: center; }

#vetpets-popup .vpp-col {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; width: 100%; min-width: 0; max-width: 100%;
}

#vetpets-popup .vpp-logo { height: 28px; width: auto; display: block; margin-bottom: 18px; }
#vetpets-popup .vpp-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--vpp-brand); margin-bottom: 12px; }
#vetpets-popup .vpp-title { margin: 0; font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -.035em; color: var(--vpp-ink); }
#vetpets-popup .vpp-sub { margin: 14px 0 0; font-size: 16px; font-weight: 500; line-height: 1.45; color: var(--vpp-body); max-width: 310px; text-wrap: pretty; }

#vetpets-popup .vpp-stack { margin-top: 26px; display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; min-width: 0; }

/* ---------- scratch card: blue panel outside, photo + canvas inside -------- */
#vetpets-popup .vpp-panel {
  width: 100%; max-width: 100%; box-sizing: border-box;
  background: var(--vpp-panel);
  border-radius: 24px; padding: 12px;
  box-shadow: 0 22px 44px -16px rgba(0,40,70,.28);
}
/* The inner card is 128:85 - the scratch photo's exact ratio - so nothing is
   cropped at any width. The canvas fills it, so scratch coordinates map to
   the photo and to nothing around it. */
#vetpets-popup .vpp-card {
  position: relative; display: flex;
  width: 100%; max-width: 100%; aspect-ratio: 128 / 85;
  border-radius: 16px; overflow: hidden;
  background: var(--vpp-surface);
}
#vetpets-popup .vpp-canvas {
  position: absolute; inset: 0; z-index: 2; display: block;
  width: 100%; height: 100%; touch-action: none; cursor: grab;
}
#vetpets-popup .vpp-pill {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 3;
  pointer-events: none; display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 18px; border-radius: 100px;
  background: rgba(0,0,0,.28); color: #FFFFFF; font-size: 15px; font-weight: 700;
  white-space: nowrap; transition: opacity .2s ease;
}

/* Pre-reveal the steps are taken out of flow so the card keeps the photo's
   aspect ratio exactly; after the reveal the card grows to fit the form. */
#vetpets-popup .vpp-step {
  position: absolute; inset: 0;
  flex: 1; min-width: 0; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 18px; overflow-y: auto;
  animation: vpp-fade-up .3s ease both;
}
#vetpets-popup .vpp-card.vpp-revealed { aspect-ratio: auto; }
#vetpets-popup .vpp-card.vpp-revealed .vpp-step {
  position: relative; inset: auto; overflow-y: visible;
}
#vetpets-popup .vpp-step[data-vpp-step="sms"] { padding: 20px; justify-content: center; }
#vetpets-popup .vpp-step[data-vpp-step="done"] { padding: 20px; justify-content: center; }

#vetpets-popup .vpp-check { width: 36px; height: 36px; border-radius: 999px; background: var(--vpp-accent); display: flex; align-items: center; justify-content: center; flex: none; }
#vetpets-popup .vpp-step[data-vpp-step="done"] .vpp-check { width: 40px; height: 40px; }
#vetpets-popup .vpp-kicker { margin-top: 8px; font-size: 13px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--vpp-brand); }
#vetpets-popup .vpp-offer { margin-top: 2px; font-size: 32px; font-weight: 800; line-height: 1.05; letter-spacing: -.03em; color: var(--vpp-ink); }
#vetpets-popup .vpp-ask { margin-top: 4px; font-size: 15px; font-weight: 500; color: var(--vpp-body); }

#vetpets-popup .vpp-input {
  margin-top: 8px; width: 100%; height: 48px; box-sizing: border-box; border-radius: 12px;
  background: var(--vpp-field-bg); border: 1.5px solid var(--vpp-field-border);
  padding: 0 14px; font-size: 15px; font-weight: 500; color: var(--vpp-body);
  outline: none; font-family: var(--vpp-font);
}
#vetpets-popup .vpp-input::placeholder { color: #9aa9b7; }
#vetpets-popup .vpp-input:focus { box-shadow: 0 0 0 3px rgba(71,181,233,.14); }
#vetpets-popup .vpp-input.vpp-invalid { border-color: var(--vpp-error); }

#vetpets-popup .vpp-error { align-self: flex-start; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--vpp-error); text-align: left; }

#vetpets-popup .vpp-submit {
  margin-top: 6px; width: 100%; height: 48px; border-radius: 12px; border: none;
  background: var(--vpp-brand); color: #FFFFFF; font-size: 15px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; cursor: pointer; font-family: var(--vpp-font);
}
#vetpets-popup .vpp-submit:hover { background: var(--vpp-brand-hover); }
#vetpets-popup .vpp-submit[disabled] { opacity: .65; cursor: default; }

#vetpets-popup .vpp-fine { margin-top: 8px; font-size: 12px; font-weight: 500; line-height: 1.4; color: var(--vpp-muted); text-align: center; }
#vetpets-popup .vpp-consent { margin-top: 10px; font-size: 12px; font-weight: 400; line-height: 1.5; color: var(--vpp-muted); text-align: center; text-wrap: pretty; }

#vetpets-popup .vpp-sms-title { margin-top: 10px; font-size: 22px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; color: var(--vpp-ink); text-align: center; }
#vetpets-popup .vpp-sms-sub {
  margin-top: 8px; max-width: 300px; font-size: 15px; font-weight: 500;
  line-height: 1.4; color: var(--vpp-muted); text-align: center; text-wrap: pretty;
}
#vetpets-popup .vpp-tel {
  margin-top: 14px; width: 100%; display: flex; align-items: center; height: 48px;
  border-radius: 12px; background: var(--vpp-field-bg); border: 1.5px solid var(--vpp-field-border);
  box-sizing: border-box; overflow: hidden;
}
#vetpets-popup .vpp-tel.vpp-invalid { border-color: var(--vpp-error); }
#vetpets-popup .vpp-prefix {
  position: relative; display: flex; align-items: center; height: 100%; flex: none;
  font-size: 15px; font-weight: 700; color: var(--vpp-body);
  background: #edf3f8; border-right: 1.5px solid var(--vpp-field-border);
}
#vetpets-popup .vpp-prefix-select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  height: 100%; box-sizing: border-box; padding: 0 28px 0 14px; margin: 0;
  border: none; border-radius: 0; background: transparent;
  font-family: var(--vpp-font); font-size: 15px; font-weight: 700; line-height: normal;
  color: var(--vpp-body); cursor: pointer; outline: none;
}
#vetpets-popup .vpp-prefix-select:focus-visible { box-shadow: inset 0 0 0 2px var(--vpp-brand); }
#vetpets-popup .vpp-prefix-chev {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  pointer-events: none; color: var(--vpp-muted);
}
#vetpets-popup .vpp-tel input {
  flex: 1; min-width: 0; height: 100%; border: none; background: transparent; padding: 0 12px;
  font-size: 15px; font-weight: 500; color: var(--vpp-body); outline: none; font-family: var(--vpp-font);
}
#vetpets-popup .vpp-tel input::placeholder { color: #9aa9b7; }

#vetpets-popup .vpp-skip {
  margin-top: 10px; background: none; border: none; padding: 10px 12px;
  font-size: 16px; font-weight: 600; color: var(--vpp-brand); text-decoration: underline;
  cursor: pointer; font-family: var(--vpp-font);
}

#vetpets-popup .vpp-done-title { margin-top: 12px; font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--vpp-ink); text-align: center; }
#vetpets-popup .vpp-done-sub {
  margin-top: 8px; font-size: 15px; font-weight: 500; line-height: 1.4;
  color: var(--vpp-body); text-align: center; text-wrap: pretty;
}
#vetpets-popup .vpp-code {
  margin-top: 12px; width: 100%; height: 48px; border-radius: 12px;
  background: var(--vpp-field-bg); border: 1.5px dashed var(--vpp-brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; letter-spacing: .14em; color: var(--vpp-ink);
}
#vetpets-popup .vpp-code-note { margin-top: 10px; font-size: 14px; font-weight: 500; color: var(--vpp-body); text-align: center; }
#vetpets-popup .vpp-step[data-vpp-step="done"] .vpp-submit { margin-top: 14px; }

#vetpets-popup .vpp-decline {
  background: none; border: none; padding: 8px 12px; font-size: 15px; font-weight: 500;
  color: var(--vpp-muted); text-decoration: underline; cursor: pointer; white-space: nowrap;
  font-family: var(--vpp-font);
}
#vetpets-popup .vpp-decline:hover { color: var(--vpp-body); }

#vetpets-popup [hidden] { display: none !important; }

/* ---------- desktop: 1240px wrapper, photos anchored to the wrapper ---------- */
@media (min-width: 1280px) {
  #vetpets-popup .vpp-tile-mobile { display: none; }
  #vetpets-popup .vpp-tile-desktop { display: block; }

  #vetpets-popup .vpp-close { top: 26px; right: 26px; }

  #vetpets-popup .vpp-wrap { display: block; padding: 24px 0; }
  #vetpets-popup .vpp-col { width: 42%; }

  #vetpets-popup .vpp-logo { height: 34px; margin-bottom: 22px; }
  #vetpets-popup .vpp-eyebrow { font-size: 12px; margin-bottom: 14px; }
  #vetpets-popup .vpp-title { font-size: 54px; }
  #vetpets-popup .vpp-sub { margin-top: 16px; font-size: 17px; line-height: 1.5; max-width: 400px; }

  #vetpets-popup .vpp-stack { margin-top: 34px; gap: 18px; }

  #vetpets-popup .vpp-panel { width: auto; padding: 14px; }
  #vetpets-popup .vpp-card { width: 560px; max-width: 100%; }
  #vetpets-popup .vpp-pill { bottom: 22px; }

  #vetpets-popup .vpp-step { padding: 14px 24px; }
  #vetpets-popup .vpp-step[data-vpp-step="sms"],
  #vetpets-popup .vpp-step[data-vpp-step="done"] { padding: 24px; }

  #vetpets-popup .vpp-check,
  #vetpets-popup .vpp-step[data-vpp-step="done"] .vpp-check { width: 44px; height: 44px; }
  #vetpets-popup .vpp-kicker { margin-top: 12px; }
  #vetpets-popup .vpp-offer { margin-top: 4px; font-size: 46px; line-height: 1; }
  #vetpets-popup .vpp-ask { margin-top: 8px; }
  #vetpets-popup .vpp-input { margin-top: 12px; height: 54px; padding: 0 16px; }
  #vetpets-popup .vpp-submit { margin-top: 10px; height: 54px; }
  #vetpets-popup .vpp-sms-title { font-size: 24px; }
  #vetpets-popup .vpp-tel { margin-top: 18px; height: 54px; }
  #vetpets-popup .vpp-tel input { padding: 0 14px; }
  #vetpets-popup .vpp-skip { margin-top: 14px; }
  #vetpets-popup .vpp-done-title { margin-top: 16px; font-size: 24px; }
  #vetpets-popup .vpp-code { margin-top: 16px; height: 54px; font-size: 20px; }
  #vetpets-popup .vpp-code-note { font-size: 15px; margin-top: 12px; }
  #vetpets-popup .vpp-step[data-vpp-step="done"] .vpp-submit { margin-top: 16px; }

  /* Photo cards keep the artboard's arrangement, offset from the wrapper's
     vertical centre rather than from a fixed 900px frame. */
  /* Percentages of the wrapper, so the composition fills it exactly and stays
     centred at any width from the 1280px breakpoint up to the 1400px cap. */
  #vetpets-popup .vpp-photo { display: block; position: absolute; height: auto; }
  #vetpets-popup .vpp-photo--a {
    left: 49.69%; width: 30.14%; aspect-ratio: 422 / 527;
    top: 50%; transform: translateY(-72%);
    box-shadow: 0 28px 54px -22px rgba(0,0,0,.30);
  }
  #vetpets-popup .vpp-photo--b {
    left: 69.87%; width: 30.14%; aspect-ratio: 422 / 447;
    top: 50%; transform: translateY(-18.5%);
    box-shadow: 0 32px 60px -22px rgba(0,0,0,.32);
  }
}

/* Short viewports: drop the floating cards rather than clip them. */
@media (min-width: 1280px) and (max-height: 779px) {
  #vetpets-popup .vpp-photo { display: none; }
  #vetpets-popup .vpp-col { margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  #vetpets-popup.vpp-root.vpp-open,
  #vetpets-popup .vpp-step { animation: none; }
  #vetpets-popup .vpp-pill { transition: none; }
}
