/* TryOnIA storefront — minimal CSS, scoped to .tryonia-* */

/* Pin our scoped surfaces to light scheme so browser-native controls
   (file picker, native <select>, scrollbar) don't get auto-inverted on
   shoppers whose OS is in dark mode. The widget is hand-styled in light —
   without this, a Mac/iOS shopper in dark mode could see a dark file
   dialog inside the bright modal, which looks broken. */
.tryonia-btn, .tryonia-modal, .tryonia-floating, [id="tryonia-mount"] {
  color-scheme: light;
}

/* ── Storefront trigger button ──
   This is the merchant's first impression and the shopper's entry point —
   it has to look premium or nobody clicks (and nobody installs). Full-width
   by default so it matches the Add-to-cart button it sits next to, with a
   subtle gradient, an animated sparkle, and a real hover lift. */
.tryonia-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 20px;
  background:
    linear-gradient(135deg,
      var(--tryonia-accent, #008060) 0%,
      color-mix(in srgb, var(--tryonia-accent, #008060) 80%, #000) 100%);
  color: var(--tryonia-on-accent, #fff);
  border: 0;
  border-radius: 10px;
  font: 600 15px/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
  margin: 10px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.10), 0 6px 18px color-mix(in srgb, var(--tryonia-accent, #008060) 28%, transparent);
  transition: transform 0.12s cubic-bezier(.2,.7,.3,1), box-shadow 0.18s, filter 0.18s;
  position: relative;
  overflow: hidden;
}
.tryonia-btn svg { flex-shrink: 0; }
/* Sparkle that gently pulses to signal "AI / something special". */
.tryonia-btn::after {
  content: '✨';
  font-size: 14px;
  margin-left: 2px;
  animation: tryonia-btn-sparkle 2.4s ease-in-out infinite;
}
@keyframes tryonia-btn-sparkle {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.18); }
}
.tryonia-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12), 0 10px 26px color-mix(in srgb, var(--tryonia-accent, #008060) 36%, transparent);
  filter: brightness(1.04);
}
.tryonia-btn:active { transform: translateY(0); }
.tryonia-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--tryonia-accent, #008060) 40%, #fff); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .tryonia-btn::after { animation: none; }
}
/* Fallback for browsers without color-mix (older Safari): solid accent. */
@supports not (background: color-mix(in srgb, red, blue)) {
  .tryonia-btn { background: var(--tryonia-accent, #008060); }
}
.tryonia-btn--test { outline: 2px dashed #ffb000; outline-offset: 2px; }
.tryonia-btn__test-badge {
  display: inline-block;
  background: #ffb000;
  color: #1a1a1a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  margin-left: 6px;
  border-radius: 3px;
  text-transform: uppercase;
}
.tryonia-btn--floating {
  position: fixed;
  right: 18px;
  bottom: 18px;
  margin: 0;
  width: auto;
  z-index: 9000;
  border-radius: 999px;
  padding: 14px 22px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.22);
}
.tryonia-btn--floating:hover { transform: translateY(-2px); }

.tryonia-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 22, 0.6);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.tryonia-modal.open { display: flex; }
.tryonia-modal-card {
  background: #fff;
  color: #202223;
  border-radius: 16px;
  max-width: 540px;
  width: 100%;
  max-height: 94vh;
  overflow-y: auto;
  padding: 24px;
  font: 400 14px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.tryonia-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.tryonia-brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 16px;
}
.tryonia-close {
  background: transparent; border: 0; font-size: 28px; line-height: 1;
  cursor: pointer; color: #6d7175; padding: 0 8px;
}

.tryonia-product {
  display: flex; gap: 12px; align-items: center;
  padding: 10px; border: 1px solid #e1e3e5; border-radius: 10px; margin-bottom: 14px;
}
.tryonia-prodimg {
  width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: #f6f6f7;
}
.tryonia-prodtxt {
  display: flex; flex-direction: column;
}
.tryonia-prodtxt strong { font-size: 14px; }
.tryonia-prodtxt span { font-size: 12px; color: #6d7175; }

/* Consent — present but secondary in the photo-first layout: a quiet
   footnote line under the dropzone/tips, not a prominent gray block. */
.tryonia-consent {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 11px 2px 0; margin-top: 12px;
  border-top: 1px solid #eceef0;
  font-size: 12px; line-height: 1.4; color: #8a9097;
  cursor: pointer;
  transition: color 0.15s;
}
.tryonia-consent:hover { color: #6d7175; }
/* Brief highlight when the shopper taps upload before consenting. */
.tryonia-consent.nudge {
  animation: tryonia-nudge 0.4s ease;
  color: var(--tryonia-accent, #008060);
}
@keyframes tryonia-nudge {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.tryonia-consent input {
  margin-top: 1px; flex: 0 0 auto;
  width: 17px; height: 17px;
  accent-color: var(--tryonia-accent, #008060);
  cursor: pointer;
}

/* Privacy-policy link sits OUTSIDE the consent <label> so clicking it
   doesn't toggle the checkbox. Wrapper just stacks the two. */
.tryonia-consent-wrap { display: block; }
.tryonia-consent-wrap > .tryonia-consent { margin-top: 12px; }
.tryonia-consent-privacy {
  display: inline-block;
  margin: 4px 0 0 26px;
  font-size: 11.5px; color: #6d7175;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tryonia-consent-privacy:hover { color: var(--tryonia-accent, #008060); }

.tryonia-file { display: none; }

/* Hero dropzone — the primary action. A large, inviting, tappable target
   (dashed accent border + soft accent fill) instead of a small button, so
   "add your photo" is unmistakably the next step. */
.tryonia-dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  width: 100%;
  padding: 24px 18px;
  border: 2px dashed color-mix(in srgb, var(--tryonia-accent, #008060) 45%, #cfd6d3);
  border-radius: 14px;
  background: color-mix(in srgb, var(--tryonia-accent, #008060) 5%, #fff);
  cursor: pointer; user-select: none; text-align: center;
  box-sizing: border-box;
  transition: border-color 0.15s, background 0.15s, transform 0.08s, box-shadow 0.15s;
}
.tryonia-dropzone:hover {
  background: color-mix(in srgb, var(--tryonia-accent, #008060) 9%, #fff);
  border-color: var(--tryonia-accent, #008060);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--tryonia-accent, #008060) 18%, transparent);
}
.tryonia-dropzone:active { transform: translateY(1px); }
.tryonia-dropzone:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--tryonia-accent, #008060) 40%, #fff);
  outline-offset: 2px;
}
.tryonia-dropzone__icon {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--tryonia-accent, #008060) 14%, #fff);
  color: var(--tryonia-accent, #008060);
  margin-bottom: 4px;
}
.tryonia-dropzone__icon svg { width: 22px; height: 22px; }
.tryonia-dropzone__title { font-weight: 700; font-size: 15px; color: #202223; }
.tryonia-dropzone__sub { font-size: 12.5px; color: #6d7175; }
/* Consent not yet given: the dropzone stays fully inviting (photo-first).
   Tapping it nudges the consent line via JS rather than looking disabled. */
/* color-mix fallback for older browsers. */
@supports not (background: color-mix(in srgb, red, blue)) {
  .tryonia-dropzone { border-color: #b9c6c0; background: #f4f8f6; }
  .tryonia-dropzone__icon { background: #e3f1ec; }
}

.tryonia-status {
  margin: 12px 0 4px; color: #303437; font-size: 14.5px; font-weight: 600;
  text-align: center;
  transition: opacity 0.18s ease;
}
.tryonia-status:empty { display: none; }

/* Claude-style shimmering loading caption — a light sweep across the text
   while the AI renders. Sits under the spinner inside the skeleton. */
.tryonia-skel-caption {
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.01em;
  transition: opacity 0.18s ease;
  background: linear-gradient(90deg,
    #aab0b6 0%, #aab0b6 35%, #1f2937 50%, #aab0b6 65%, #aab0b6 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: tryonia-shimmer 2s linear infinite;
}
@keyframes tryonia-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .tryonia-skel-caption {
    animation: none;
    -webkit-text-fill-color: #6d7175; color: #6d7175;
  }
}

/* Storefront-modal loader — shown while the AI render is in flight.
   Matches the eventual result aspect ratio so the modal height doesn't
   jump when the image arrives. Replaces the prior pulsing-skeleton
   approach with an honest spinner: clearer signal of "AI is working,
   not loading-from-cache". */
.tryonia-result-skel {
  display: none;
  aspect-ratio: 4 / 5;
  max-height: 380px;
  width: 100%;
  border-radius: 12px;
  background: linear-gradient(180deg, #fafbfb 0%, #f0f3f5 100%);
  margin: 12px 0;
  position: relative;
  overflow: hidden;
  display: none;
}
.tryonia-result-skel.visible {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
/* Dual-ring spinner — outer track + spinning arc in accent color. */
.tryonia-result-skel::before {
  content: '';
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 4px solid rgba(0, 128, 96, 0.15);
  border-top-color: var(--tryonia-accent, #008060);
  animation: tryonia-spinner 0.85s cubic-bezier(.55,.15,.45,.85) infinite;
}
@keyframes tryonia-spinner {
  to { transform: rotate(360deg); }
}
/* Respect users who opted out of motion. Show a subtle pulse instead of
   a continuously-spinning element. */
@media (prefers-reduced-motion: reduce) {
  .tryonia-result-skel::before {
    animation: tryonia-spinner-pulse 1.4s ease-in-out infinite;
    border-top-color: var(--tryonia-accent, #008060);
  }
  @keyframes tryonia-spinner-pulse {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 1; }
  }
}

/* Saved-photo banner (sessionStorage one-click reuse). Sits between the
   consent box and the photo guide, so a returning shopper can skip the
   upload step entirely. */
.tryonia-saved {
  display: none;
  align-items: center;
  gap: 12px;
  background: var(--tryonia-accent-soft, #e3f1ec);
  border: 1px solid rgba(0, 128, 96, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 16px;
}
.tryonia-saved__thumb {
  width: 48px; height: 48px;
  object-fit: cover; border-radius: 8px; flex-shrink: 0;
  background: #fff;
}
.tryonia-saved__copy {
  display: flex; flex-direction: column; flex: 1; min-width: 0;
}
.tryonia-saved__copy strong { font-size: 13px; color: #115d3d; }
.tryonia-saved__copy span { font-size: 11.5px; color: #6d7175; }
.tryonia-saved__actions { display: flex; gap: 6px; flex-shrink: 0; }
.tryonia-saved__btn {
  border: 1px solid #c4cdd5; background: #fff;
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  padding: 6px 10px; border-radius: 6px;
  cursor: pointer; color: #202223;
}
.tryonia-saved__btn.primary {
  background: var(--tryonia-accent, #008060);
  color: var(--tryonia-on-accent, #fff);
  border-color: var(--tryonia-accent, #008060);
}

/* Compact one-line photo tip under the dropzone — a calm hint, not three
   attention-grabbing cards. */
.tryonia-tips {
  display: flex; align-items: center; gap: 7px;
  margin: 10px 2px 0;
  font-size: 12.5px; color: #6d7175; line-height: 1.4;
}
.tryonia-tips__dot { flex: 0 0 auto; font-size: 13px; }

/* Try-on history — past results, revisitable across products. A horizontal
   thumbnail strip; hidden when empty. */
.tryonia-history { margin-top: 16px; }
.tryonia-history__title {
  font-size: 12px; font-weight: 600; color: #6d7175;
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px;
}
.tryonia-history__strip {
  display: flex; gap: 8px; overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.tryonia-history__item {
  flex: 0 0 auto;
  width: 60px; height: 78px;
  padding: 0; border: 1px solid #e1e3e5; border-radius: 10px;
  overflow: hidden; cursor: pointer; background: #f6f6f7;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.tryonia-history__item:hover {
  transform: translateY(-2px);
  border-color: var(--tryonia-accent, #008060);
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
}
.tryonia-history__item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Reveal animation on the AI result — fades + scales in over 400ms. */
.tryonia-compare__img.tryonia-compare__img--after {
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(.2,.7,.3,1);
}
.tryonia-compare__img.tryonia-compare__img--after:not(.reveal) {
  opacity: 0.001;
  transform: scale(0.96);
}
.tryonia-compare--has-result .tryonia-compare__img--after.reveal {
  opacity: 1;
  transform: scale(1);
  animation: tryonia-sparkle-once 0.7s ease;
}
@keyframes tryonia-sparkle-once {
  0%   { box-shadow: 0 0 0 0 rgba(0,128,96,0.0); }
  40%  { box-shadow: 0 0 0 8px rgba(0,128,96,0.2); }
  100% { box-shadow: 0 0 0 0 rgba(0,128,96,0); }
}
/* ── Before / both / after compare layout ───────────────────────── */
.tryonia-mode-container { display: none; margin: 12px 0; }
.tryonia-toggle {
  display: inline-flex;
  border: 1px solid #d2d6dc;
  border-radius: 999px;
  padding: 2px;
  margin: 0 0 10px;
  background: #f6f6f7;
}
.tryonia-toggle__btn {
  border: 0; background: transparent;
  font-family: inherit; font-size: 13px; font-weight: 600;
  color: #555; padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.tryonia-toggle__btn[aria-pressed="true"] {
  background: var(--tryonia-accent, #008060); color: var(--tryonia-on-accent, #fff);
}

/* Interstitial step blocks — email capture + sizing recommendation,
   shown after the AI render finishes but before the result is revealed. */
.tryonia-step {
  background: #fafbfb;
  border: 1px solid #e1e3e5;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 12px 0;
}
.tryonia-step-title { font-size: 14.5px; font-weight: 700; margin-bottom: 4px; }
.tryonia-step-sub { font-size: 12.5px; color: #6d7175; margin-bottom: 10px; }
.tryonia-step-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.tryonia-step-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* <details>-based collapsable step. Closed = title only with chevron, click
   to expand — keeps the size CTA out of the way for shoppers who don't want
   to fill in height/weight (the majority). */
.tryonia-step--collapsable { padding: 10px 14px; }
.tryonia-step--collapsable > summary {
  cursor: pointer;
  margin-bottom: 0;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.tryonia-step--collapsable > summary::-webkit-details-marker { display: none; }
.tryonia-step--collapsable > summary::after {
  content: '⌄'; font-size: 14px; color: #6d7175; transition: transform 0.18s ease;
}
.tryonia-step--collapsable[open] > summary::after { transform: rotate(180deg); }
.tryonia-step--collapsable[open] > summary { margin-bottom: 8px; }
.tryonia-input {
  width: 100%; padding: 10px 12px;
  border: 1px solid #c4cdd5; border-radius: 8px;
  font-size: 14px; font-family: inherit; box-sizing: border-box;
  margin-bottom: 6px;
}
.tryonia-input:focus {
  outline: 0;
  border-color: var(--tryonia-accent, #008060);
  box-shadow: 0 0 0 3px rgba(0, 128, 96, 0.18);
}

/* Pill showing the recommended size next to the result. */
.tryonia-size-rec {
  display: inline-flex;
  background: var(--tryonia-accent-soft, #e3f1ec);
  color: var(--tryonia-accent-strong, #006e52);
  font-size: 13px; font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  margin: 8px 0 4px;
  align-self: flex-start;
}

/* UGC opt-in row inside the result step. */
.tryonia-ugc-optin {
  display: none;
  align-items: flex-start; gap: 8px;
  background: #f6f6f7;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12.5px; color: #4b5257;
  margin-top: 8px;
}
.tryonia-ugc-optin input { margin-top: 3px; flex: 0 0 auto; }

/* Share-for-discount reveal banner. */
.tryonia-discount {
  background: linear-gradient(135deg, rgba(0,128,96,0.10) 0%, rgba(92,106,196,0.10) 100%);
  border: 1px solid rgba(0, 128, 96, 0.25);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 10px;
  font-size: 13.5px;
  color: #115d3d;
}
.tryonia-discount-code {
  display: inline-block;
  background: #fff;
  border: 1px dashed #008060;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  margin-left: 6px;
  letter-spacing: 0.06em;
}

/* Fixed-size stage in EVERY mode (before / slider / after) so switching
   modes never resizes the box or jumps the modal. One 4/5 frame; images
   are CONTAINED (not cropped) so a full-body model shot shows head-to-toe —
   `cover` was cutting off heads/feet ("la ve cortada"). The neutral
   background letterboxes any leftover space cleanly, and because both
   before/after are contained in the same frame they stay aligned for the
   slider. */
.tryonia-compare {
  position: relative;
  background: #f6f6f7;
  border-radius: 12px;
  aspect-ratio: 4 / 5;
  width: 100%;
  max-height: 480px;
  margin: 0 auto;
  overflow: hidden;
  user-select: none;
}
.tryonia-compare__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 12px;
  display: none;
}

/* "Before-only" and "after-only" modes show one image. */
.tryonia-compare--before .tryonia-compare__img--before { display: block; }
.tryonia-compare--after  .tryonia-compare__img--after  { display: block; }
.tryonia-compare--before .tryonia-compare__handle,
.tryonia-compare--after  .tryonia-compare__handle { display: none; }

/* Slider (drag-to-reveal): both images stack; the AFTER is clipped by
   --tryonia-slider so the before peeks through on the left. */
.tryonia-compare--slider { touch-action: none; }
.tryonia-compare--slider .tryonia-compare__img { display: block; }
.tryonia-compare--slider .tryonia-compare__img--after {
  clip-path: inset(0 0 0 var(--tryonia-slider, 50%));
}
.tryonia-compare__handle {
  display: none;
  position: absolute; top: 0; bottom: 0;
  left: var(--tryonia-slider, 50%);
  width: 4px;
  margin-left: -2px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15), 0 4px 10px rgba(0,0,0,0.2);
  cursor: ew-resize;
}
.tryonia-compare--slider .tryonia-compare__handle { display: block; }
.tryonia-compare__handle-pill {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--tryonia-accent, #008060);
  color: var(--tryonia-on-accent, #fff);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

/* Result actions, hierarchical:
   - Add to cart  = primary, full-width, accent fill (the conversion goal).
   - Download / Share = secondary outline, side-by-side.
   - Re-render / Try a different photo = subtle ghost, side-by-side.
   Every button shows an icon (svg, inherits color). */
.tryonia-actions {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px;
}
.tryonia-cta {
  display: none;            /* shown as flex by JS */
  box-sizing: border-box;
  align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px; background: var(--tryonia-accent, #008060); color: var(--tryonia-on-accent, #fff);
  border: 0; border-radius: 12px; cursor: pointer; font-weight: 700;
  font-size: 15px;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--tryonia-accent, #008060) 30%, transparent);
  transition: filter 0.15s, transform 0.1s, box-shadow 0.15s;
  font-family: inherit;
}
.tryonia-cta:hover { filter: brightness(1.04); box-shadow: 0 8px 22px color-mix(in srgb, var(--tryonia-accent, #008060) 38%, transparent); }
.tryonia-cta:active { transform: translateY(1px); }
.tryonia-cta:disabled { opacity: 0.6; cursor: default; box-shadow: none; }
.tryonia-secondary {
  display: none;            /* shown as flex by JS */
  box-sizing: border-box;
  align-items: center; justify-content: center; gap: 7px;
  padding: 10px 12px; background: #fff; border: 1px solid #d2d6dc;
  border-radius: 10px; cursor: pointer; color: #303437;
  text-decoration: none; font-size: 13.5px; font-weight: 600; font-family: inherit;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}
.tryonia-secondary:hover { background: #f6f6f7; border-color: #b3bac1; }
.tryonia-secondary svg { opacity: 0.75; }
/* Ghost = the lowest-priority retry actions: no border, muted. */
.tryonia-secondary.ghost {
  background: transparent; border-color: transparent; color: #6d7175;
}
.tryonia-secondary.ghost:hover { background: #f4f5f6; color: #303437; }

/* Result-actions row layout: primary Add-to-cart full-width FIRST (right under
   the image — it's the conversion goal), secondary/ghost actions 2-up below it.
   Scoped so the email/size step CTAs keep their own layout. */
.tryonia-actions .tryonia-cta { flex: 1 1 100%; order: -1; }
.tryonia-actions .tryonia-secondary { flex: 1 1 calc(50% - 4px); }

.tryonia-watermark {
  display: none;
  text-align: center; font-size: 10.5px; color: #b3bac1; margin-top: 16px;
  letter-spacing: 0.02em; opacity: 0.85;
}
.tryonia-watermark::before { content: '✨ '; opacity: 0.7; }

@media (max-width: 480px) {
  /* Align to the TOP and let the whole overlay scroll. Centering + a tall card
     pushed the header (title/close) above the viewport on phones, where the
     visible area is smaller than the card's max-height. */
  .tryonia-modal {
    align-items: flex-start;
    padding: 8px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .tryonia-modal-card {
    padding: 16px;
    max-height: none;   /* don't clip; the overlay scrolls instead */
  }
}

/* ── Limit-reached panel ─────────────────────────────────────────────
   Shown when a shopper hits the per-shopper try-on cap. On-brand sparkle
   badge + title + message instead of a bare line of status text. */
.tryonia-limit {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 28px 20px 24px;
}
.tryonia-limit__badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tryonia-accent, #008060);
  background: color-mix(in srgb, var(--tryonia-accent, #008060) 12%, #fff);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--tryonia-accent, #008060) 7%, transparent);
  margin-bottom: 2px;
}
.tryonia-limit__title {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.01em;
}
.tryonia-limit__msg {
  font-size: 13.5px;
  line-height: 1.5;
  color: #6d7175;
  max-width: 300px;
}
