/* Also Green subscription portal. Everything is scoped under .agp so the store
   theme's CSS and ours don't collide. Colours match the live theme. */
.agp, .agp-overlay, .agp-toast {
  --ag-green: #499e5f;
  --ag-green-dark: #3a8250;
  --ag-green-tint: #e6f2e9;
  --ag-ink: #151719;
  --ag-text: rgba(21, 23, 25, .75);
  --ag-muted: rgba(21, 23, 25, .55);
  --ag-line: rgba(21, 23, 25, .12);
  --ag-bg: #eff2f4;
  --ag-card: #ffffff;
  --ag-danger: #b3261e;
  --ag-radius: 18px;
  --ag-pill: 41px;
}
.agp {
  box-sizing: border-box;
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 16px 64px;
  color: var(--ag-text);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
}
.agp-overlay { font-family: inherit; letter-spacing: 0; }
:is(.agp, .agp-overlay) *, :is(.agp, .agp-overlay) *::before, :is(.agp, .agp-overlay) *::after { box-sizing: border-box; letter-spacing: 0; }
:is(.agp, .agp-overlay) :is(h1, h2, h3) { color: var(--ag-ink); margin: 0; line-height: 1.2; font-weight: 800; }
.agp h1 { font-size: 28px; }
.agp h2 { font-size: 19px; }
.agp h3 { font-size: 16px; }
:is(.agp, .agp-overlay) p { margin: 0; }
:is(.agp, .agp-overlay) img { display: block; max-width: 100%; }
:is(.agp, .agp-overlay) button { font: inherit; cursor: pointer; }
:is(.agp, .agp-overlay) button:disabled { cursor: default; opacity: .5; }
:is(.agp, .agp-overlay) :focus-visible { outline: 2px solid var(--ag-green); outline-offset: 2px; }

.agp-header { margin-bottom: 20px; }
.agp-header p { margin-top: 6px; }

/* Buttons */
.agp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: var(--ag-pill);
  border: 2px solid var(--ag-green); background: var(--ag-green); color: #fff;
  font-weight: 700; font-size: 14px; text-transform: uppercase; text-decoration: none; text-align: center;
  transition: background .15s, border-color .15s;
}
.agp-btn:hover:not(:disabled) { background: var(--ag-green-dark); border-color: var(--ag-green-dark); }
.agp-btn--ghost { background: transparent; color: var(--ag-green-dark); }
.agp-btn--ghost:hover:not(:disabled) { background: var(--ag-green-tint); }
.agp-btn--quiet { background: #fff; color: var(--ag-ink); border-color: var(--ag-line); }
.agp-btn--quiet:hover:not(:disabled) { background: var(--ag-bg); border-color: var(--ag-line); }
.agp-btn--danger { background: var(--ag-danger); border-color: var(--ag-danger); }
.agp-btn--danger:hover:not(:disabled) { background: #8f1e18; border-color: #8f1e18; }
.agp-btn--block { width: 100%; }
.agp-btn--sm { min-height: 38px; padding: 0 16px; font-size: 13px; }
.agp-link {
  background: none; border: 0; padding: 4px 0; color: var(--ag-muted);
  text-decoration: underline; text-underline-offset: 3px; font-size: 14px;
}
.agp-link:hover { color: var(--ag-ink); }

/* Cards */
.agp-card { background: var(--ag-card); border-radius: var(--ag-radius); padding: 20px; margin-bottom: 14px; }
.agp-card > h2 { margin-bottom: 14px; }
.agp-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.agp-btn { white-space: nowrap; }
.agp-note { font-size: 14px; color: var(--ag-muted); }

.agp-status {
  display: inline-block; padding: 3px 12px; border-radius: var(--ag-pill);
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  background: var(--ag-green-tint); color: var(--ag-green-dark);
}
.agp-status--paused { background: #fff4d6; color: #7a5a00; }
.agp-status--cancelled { background: #f1f1f1; color: var(--ag-muted); }

/* Next order */
.agp-next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.agp-next-label { font-size: 13px; font-weight: 700; text-transform: uppercase; color: var(--ag-muted); }
.agp-next-date { font-size: 26px; font-weight: 800; color: var(--ag-ink); line-height: 1.15; }
.agp-next-sub { font-size: 14px; color: var(--ag-muted); }
.agp-next-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.agp-date-row { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.agp-input, .agp-select, .agp-textarea {
  font: inherit; color: var(--ag-ink); background: #fff;
  border: 1.5px solid var(--ag-line); border-radius: 12px; padding: 10px 12px; min-height: 46px; width: 100%;
}
.agp-date-row .agp-input { flex: 1 1 180px; width: auto; }
.agp-input:focus, .agp-select:focus, .agp-textarea:focus { border-color: var(--ag-green); outline: none; }

/* Product groups + scent picker */
.agp-group + .agp-group { border-top: 1px solid var(--ag-line); margin-top: 18px; padding-top: 18px; }
.agp-group-head { display: flex; gap: 14px; align-items: center; }
.agp-thumb { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; background: var(--ag-bg); flex: none; }
.agp-group-title { font-weight: 700; color: var(--ag-ink); }
.agp-group-meta { font-size: 14px; color: var(--ag-muted); }
.agp-scent-hint { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0 10px; font-size: 14px; }
.agp-count { font-weight: 700; color: var(--ag-ink); white-space: nowrap; }
.agp-count--off { color: var(--ag-danger); }
.agp-scents { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.agp-scent {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px 10px; border-radius: 16px; border: 2px solid var(--ag-line); background: #fff; text-align: center;
  transition: border-color .15s, background .15s;
}
.agp-scent--on { border-color: var(--ag-green); background: var(--ag-green-tint); }
.agp-scent--out { opacity: .55; }
.agp-scent img { width: 72px; height: 72px; object-fit: contain; }
.agp-scent-name { font-weight: 700; font-size: 14px; color: var(--ag-ink); line-height: 1.25; min-height: 2.5em; display: flex; align-items: center; }
.agp-scent-out { font-size: 12px; color: var(--ag-muted); }
.agp-stepper { display: flex; align-items: center; gap: 4px; }
.agp-stepper button {
  width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--ag-line); background: #fff;
  color: var(--ag-ink); font-size: 18px; line-height: 1; display: grid; place-items: center; padding: 0;
}
.agp-stepper button:hover:not(:disabled) { border-color: var(--ag-green); }
.agp-stepper output { min-width: 28px; text-align: center; font-weight: 800; color: var(--ag-ink); }
.agp-save-bar { display: flex; gap: 8px; margin-top: 12px; }
.agp-save-bar .agp-btn { flex: 1; }
.agp-onetime { display: flex; gap: 12px; align-items: center; margin-top: 14px; padding: 10px; border-radius: 14px; background: var(--ag-bg); }
.agp-onetime .agp-thumb { width: 48px; height: 48px; }
.agp-onetime-body { flex: 1; min-width: 0; }
.agp-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--ag-green-dark); }

/* Pills (frequency, offer options) */
.agp-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.agp-pill {
  min-height: 42px; padding: 0 18px; border-radius: var(--ag-pill); border: 2px solid var(--ag-line);
  background: #fff; color: var(--ag-ink); font-weight: 700; font-size: 14px; text-align: center;
}
.agp-pill:hover:not(:disabled) { border-color: var(--ag-green); }
.agp-pill[aria-pressed="true"] { background: var(--ag-green); border-color: var(--ag-green); color: #fff; }

/* Upsells */
.agp-upsells { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin: 0 -4px; padding-left: 4px; padding-right: 4px; }
.agp-upsell { flex: 0 0 200px; scroll-snap-align: start; border: 1.5px solid var(--ag-line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.agp-upsell img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--ag-bg); }
.agp-upsell-title { font-weight: 700; color: var(--ag-ink); font-size: 14px; line-height: 1.3; }
.agp-price { font-weight: 800; color: var(--ag-ink); }
.agp-price s { font-weight: 500; color: var(--ag-muted); margin-left: 6px; }
.agp-upsell .agp-select { min-height: 40px; padding: 6px 10px; font-size: 14px; }
.agp-upsell .agp-btn { margin-top: auto; }

/* Address form */
.agp-details summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.agp-details summary::-webkit-details-marker { display: none; }
.agp-details summary::after { content: '+'; font-size: 22px; color: var(--ag-muted); }
.agp-details[open] summary::after { content: '−'; }
.agp-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.agp-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ag-muted); }
.agp-form .agp-full { grid-column: 1 / -1; }

/* Tabs: Subscriptions / Orders / Account */
.agp-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin-bottom: 18px; border-radius: var(--ag-pill); background: #fff; }
.agp-tab {
  border: 0; background: transparent; border-radius: var(--ag-pill); min-height: 40px; padding: 0 8px;
  font-weight: 700; font-size: 14px; color: var(--ag-muted); display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.agp-tab[aria-selected="true"] { background: var(--ag-blue); color: #fff; }
.agp-tab-count { font-size: 11px; min-width: 18px; padding: 1px 6px; border-radius: 9px; background: rgba(21, 23, 25, .1); }
.agp-tab[aria-selected="true"] .agp-tab-count { background: rgba(255, 255, 255, .25); }
.agp .agp-header { margin-bottom: 12px; }

/* Compact subscription card: sections separated by thin rules */
.agp-subcard { padding: 16px 18px; }
.agp-nextblock .agp-next-date { font-size: 22px; margin-top: 2px; }
.agp-nextblock .agp-next-actions { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 8px; }
.agp-nextblock .agp-next-actions .agp-btn { padding: 0 8px; }
.agp-row { border-top: 1px solid var(--ag-line); margin-top: 14px; padding-top: 12px; }
.agp-row-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.agp-row-label { font-size: 12px; font-weight: 800; text-transform: uppercase; color: var(--ag-muted); flex: 1; }
.agp-row-value { font-weight: 700; color: var(--ag-ink); }
.agp-row .agp-link { font-weight: 700; color: var(--ag-green-dark); }
.agp-summary { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.agp-summary .agp-group-title { font-size: 14px; }
.agp-summary .agp-group-meta { font-size: 13px; }
.agp-thumb--sm { width: 40px; height: 40px; border-radius: 10px; }
.agp-summary--onetime { padding: 8px; border-radius: 12px; background: var(--ag-bg); }
.agp-row .agp-group { margin-top: 10px; }
.agp-row .agp-group + .agp-group { margin-top: 16px; padding-top: 14px; }
.agp-upcoming-toggle {
  display: block; width: 100%; margin-top: 10px; padding: 6px 0; border: 0; background: none; text-align: left;
  font-size: 13px; color: var(--ag-muted); font-weight: 600;
}
.agp-subcard .agp-upcoming { margin-top: 4px; padding-top: 6px; }
.agp-subcard .agp-footer-actions { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--ag-line); }

/* Mini add-on cards */
.agp-upsells--mini { margin-top: 10px; }
.agp-upsells--mini .agp-upsell { flex: 0 0 150px; padding: 10px; gap: 6px; }
.agp-upsells--mini .agp-upsell img { aspect-ratio: 4 / 3; }
.agp-upsells--mini .agp-upsell-title { font-size: 13px; }
.agp-upsells--mini .agp-select { min-height: 34px; font-size: 13px; padding: 4px 8px; }
.agp-upsell-buy { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; }
.agp-upsell-buy .agp-btn { min-height: 32px; padding: 0 12px; }

/* No subscription / no orders */
.agp-nosub { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.agp-nosub strong { color: var(--ag-ink); font-size: 17px; }

/* Account tab */
.agp-account-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.agp-account-email { color: var(--ag-ink); word-break: break-all; }
.agp-account-links { display: flex; gap: 8px; flex-wrap: wrap; }
.agp-orders .agp-order { margin-bottom: 0; }

/* Pause / Cancel: real buttons, side by side, with room before the next section. */
.agp-footer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 40px; }
.agp-footer-actions .agp-btn { white-space: normal; padding: 6px 12px; line-height: 1.2; min-width: 0; }
.agp-sub + .agp-sub { margin-top: 8px; }

/* Brand-blue title tab sitting behind the top edge of its card. */
.agp, .agp-overlay { --ag-blue: #3782d3; }
.agp-boxed { margin-bottom: 18px; }
.agp-boxed-tab {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--ag-blue); color: #fff; text-transform: uppercase; font-weight: 800; font-size: 14px;
  border-radius: var(--ag-radius) var(--ag-radius) 0 0;
  padding: 12px 20px calc(12px + var(--ag-radius));
  margin-bottom: calc(-1 * var(--ag-radius));
}
.agp-boxed > .agp-card { position: relative; margin-bottom: 0; }
.agp-boxed-tab .agp-status { background: #fff; text-transform: uppercase; }
.agp-boxed-meta { font-size: 12px; font-weight: 700; text-transform: none; opacity: .95; white-space: nowrap; }
.agp-boxed .agp-banner, .agp-boxed .agp-start { border: 0; }
.agp-boxed .agp-banner { background: var(--ag-green-tint); }

/* Delay panel */
.agp-delay { margin-top: 14px; }
.agp-delay-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.agp-delay-option {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 14px;
  border: 2px solid var(--ag-line); background: #fff; color: var(--ag-ink); text-align: center;
}
.agp-delay-option:hover:not(:disabled) { border-color: var(--ag-green); background: var(--ag-green-tint); }
.agp-delay-option[aria-pressed="true"] { border-color: var(--ag-green); background: var(--ag-green-tint); }
.agp-delay-option strong { font-size: 14px; }
.agp-delay-option span { font-size: 12px; color: var(--ag-muted); }
@media (max-width: 480px) { .agp-delay-options { grid-template-columns: repeat(2, 1fr); } }

/* Upcoming deliveries */
.agp-upcoming { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--ag-line); }
.agp-upcoming-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.agp-upcoming-date { font-weight: 700; color: var(--ag-ink); min-width: 120px; }
.agp-upcoming-tag { flex: 1; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--ag-green-dark); }
.agp-upcoming-row--skipped .agp-upcoming-date { text-decoration: line-through; color: var(--ag-muted); }
.agp-upcoming-row--skipped .agp-upcoming-tag { color: var(--ag-muted); }

/* Rewards: the next reward front and centre, then the whole ladder */
.agp-rewards { overflow: hidden; }
.agp-rpic { position: relative; display: grid; place-items: center; width: 60px; height: 60px; flex: none; border-radius: 16px; overflow: hidden; background: var(--ag-bg); }
.agp-rpic img { width: 100%; height: 100%; object-fit: cover; }
.agp-rpic--badge { background: #3782D3; color: #fff; line-height: 1; grid-auto-flow: row; align-content: center; gap: 2px; }
.agp-rpic--badge strong { font-size: 18px; font-weight: 800; color: #fff; }
.agp-rpic--badge small { font-size: 10px; font-weight: 800; }
.agp-rpic--lg { width: 96px; height: 96px; border-radius: 20px; box-shadow: 0 6px 18px rgba(21, 23, 25, .12); }
.agp-rpic--lg.agp-rpic--badge strong { font-size: 28px; }
.agp-rpic--lg.agp-rpic--badge small { font-size: 12px; }

.agp-rhero { display: flex; gap: 16px; align-items: center; padding: 14px; margin: -2px -2px 0; border-radius: 16px; background: #eaf3fc; }
.agp-rhero-body { flex: 1; min-width: 0; }
.agp-rhero-eyebrow { font-size: 11px; font-weight: 800; text-transform: uppercase; color: #3782D3; letter-spacing: 0; }
.agp-rhero-title { display: block; font-size: 19px; line-height: 1.2; font-weight: 800; color: var(--ag-ink); margin: 3px 0 2px; }
.agp-rhero .agp-note { margin: 2px 0 0; }
.agp-rbar { height: 10px; border-radius: 6px; background: #fff; margin: 10px 0 6px; overflow: hidden; }
.agp-rbar span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #3782D3, var(--ag-green)); }
.agp-rhero-away { margin: 0; font-size: 13px; color: var(--ag-text); }
.agp-rhero-away strong { color: var(--ag-ink); }
.agp-rhero .agp-rhero-cta { margin-top: 8px; text-align: left; line-height: 1.3; padding: 0; font-size: 13px; font-weight: 700; color: #3782D3; }
.agp-rhero--unlocked { background: var(--ag-green-tint); }
.agp-rhero--unlocked .agp-rhero-eyebrow { color: var(--ag-green-dark); }
.agp-rhero--unlocked .agp-rpic--lg { box-shadow: 0 0 0 3px var(--ag-green), 0 6px 18px rgba(73, 158, 95, .35); animation: agp-pop .6s ease-out both; }
.agp-rhero--quiet { background: var(--ag-bg); }
@keyframes agp-pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }

/* The ladder: roomy tiles that scroll sideways and snap, edges fading to show there's more,
   and the next reward centred and lifted so progress reads at a glance. */
.agp-ladder {
  --step: 88px; --gap: 16px;
  list-style: none; margin: 16px -18px 0; padding: 10px 18px 8px; display: flex; gap: var(--gap);
  overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 18px; overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
}
.agp-ladder::-webkit-scrollbar { display: none; }
.agp-step { flex: 0 0 var(--step); scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px; position: relative; }
/* Line to the next stage: green once this one is unlocked. */
.agp-step:not(:last-child)::after { content: ''; position: absolute; top: 28px; left: calc(50% + 34px); width: calc(100% + var(--gap) - 68px); height: 3px; border-radius: 2px; background: var(--ag-line); }
.agp-step--done:not(:last-child)::after { background: var(--ag-green); }
.agp-step-pic { position: relative; }
.agp-step .agp-rpic { width: 56px; height: 56px; border-radius: 14px; transition: transform .2s; }
.agp-step .agp-rpic--badge strong { font-size: 16px; }
.agp-rnextup { margin: 10px 0 0; font-size: 13px; color: var(--ag-text); }
.agp-rnextup strong { color: var(--ag-ink); }
.agp-step-mark { position: absolute; right: -5px; bottom: -5px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ag-green); color: #fff; font-size: 12px; font-weight: 800; border: 2px solid #fff; }
.agp-step-mark--lock { background: #fff; font-size: 10px; border-color: var(--ag-line); }
.agp-step-at { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--ag-muted); }
.agp-step-title { font-size: 12px; line-height: 1.25; font-weight: 600; color: var(--ag-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.agp-step--locked .agp-rpic { filter: grayscale(1); opacity: .5; }
.agp-step--locked .agp-step-title { color: var(--ag-muted); }
.agp-step--next .agp-rpic { box-shadow: 0 0 0 3px #3782D3; animation: agp-glow 2s ease-in-out infinite; }
.agp-step--next .agp-rpic { transform: scale(1.1); }
.agp-step--next .agp-step-at { color: #fff; background: #3782D3; border-radius: var(--ag-pill); padding: 2px 7px; margin-top: 4px; font-size: 10px; white-space: nowrap; }
@keyframes agp-glow { 50% { box-shadow: 0 0 0 3px #3782D3, 0 0 0 8px rgba(55, 130, 211, .18); } }
@media (prefers-reduced-motion: reduce) { .agp-step--next .agp-rpic, .agp-rhero--unlocked .agp-rpic--lg { animation: none; } }

.agp-rsaving { margin: 12px 0 0; font-size: 13px; font-weight: 700; color: var(--ag-green-dark); }
.agp-stake { display: flex; gap: 12px; align-items: center; margin: 12px 0 4px; padding: 12px; border-radius: 14px; background: #eaf3fc; color: var(--ag-ink); }
.agp-stake .agp-rpic { width: 48px; height: 48px; border-radius: 12px; }
.agp-stake strong { font-size: 14px; }
/* Combine banner */
.agp-banner { border: 2px solid var(--ag-green); background: var(--ag-green-tint); }

/* Start a subscription */
.agp-start { border: 2px solid var(--ag-green); }
.agp-start-list { display: grid; gap: 14px; }
.agp-offer { border: 1.5px solid var(--ag-line); border-radius: 16px; padding: 14px; }
.agp-offer-head { display: flex; gap: 12px; align-items: center; }
.agp-offer-buy { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.agp-badge { display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: var(--ag-pill); background: var(--ag-green); color: #fff; font-size: 12px; font-weight: 700; }

/* Orders */
.agp-orders { display: grid; gap: 12px; margin-top: 12px; }
.agp-order { border: 1.5px solid var(--ag-line); border-radius: 14px; padding: 12px; }
.agp-order-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--ag-ink); }
.agp-order-items { display: grid; gap: 6px; margin-top: 10px; font-size: 14px; }
.agp-order-item { display: flex; align-items: center; gap: 10px; }
.agp-order-item img, .agp-order-item .agp-thumb { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex: none; }
.agp-order-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* Saved addresses */
.agp-address-options { display: grid; gap: 8px; }
.agp-address-option {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 12px;
  border: 2px solid var(--ag-line); background: #fff; color: var(--ag-ink); text-align: left; font-size: 14px;
}
.agp-address-option:hover:not(:disabled) { border-color: var(--ag-green); }
.agp-address-option span { color: var(--ag-muted); }
.agp-address-option em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--ag-green-dark); }
.agp-address-option--on { border-color: var(--ag-green); background: var(--ag-green-tint); opacity: 1 !important; }

/* Empty / sign-in */
.agp-empty { text-align: center; padding: 40px 20px; }
.agp-empty p { margin: 8px 0 18px; }

/* Toast */
.agp-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--ag-ink); color: #fff; padding: 12px 20px; border-radius: var(--ag-pill);
  font-size: 14px; font-weight: 600; z-index: 10001; transition: opacity .2s, transform .2s;
  max-width: calc(100vw - 32px); text-align: center; pointer-events: none;
}
.agp-toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }
.agp-toast--error { background: var(--ag-danger); }

/* Loading */
.agp-loading { display: grid; place-items: center; min-height: 240px; }
.agp-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--ag-line); border-top-color: var(--ag-green); animation: agp-spin .8s linear infinite; }
@keyframes agp-spin { to { transform: rotate(360deg); } }
.agp-spinner--sm { width: 18px; height: 18px; border-width: 2px; border-color: rgba(255, 255, 255, .35); border-top-color: #fff; flex: none; }
/* "Saving…" while a change is on its way; same spot as the "done" message that replaces it */
.agp-saving {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 10002;
  display: flex; align-items: center; gap: 10px; background: var(--ag-ink); color: #fff;
  padding: 11px 18px; border-radius: var(--ag-pill); font-size: 14px; font-weight: 600; letter-spacing: 0;
  box-shadow: 0 6px 20px rgba(21, 23, 25, .2); pointer-events: none; animation: agp-saving-in .15s ease-out;
}
@keyframes agp-saving-in { from { opacity: 0; transform: translateX(-50%) translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .agp-saving { animation: none; } }

/* Cancel flow overlay */
.agp-overlay {
  position: fixed; inset: 0; z-index: 10000; background: rgba(21, 23, 25, .55);
  display: flex; align-items: flex-end; justify-content: center;
}
.agp-sheet {
  background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  border-radius: 22px 22px 0 0; padding: 22px 20px 28px; position: relative;
  color: var(--ag-text); font-size: 16px; line-height: 1.5;
}
@media (min-width: 640px) {
  .agp-overlay { align-items: center; }
  .agp-sheet { border-radius: 22px; padding: 28px; }
}
.agp-sheet h2 { font-size: 22px; padding-right: 36px; margin-bottom: 8px; }
.agp-sheet p + .agp-sheet-body, .agp-sheet-body { margin-top: 16px; }
.agp-close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: var(--ag-bg); color: var(--ag-ink); font-size: 20px; line-height: 1; display: grid; place-items: center;
}
.agp-progress { display: flex; gap: 4px; margin-bottom: 16px; }
.agp-progress span { flex: 1; height: 4px; border-radius: 2px; background: var(--ag-line); }
.agp-progress span.on { background: var(--ag-green); }
.agp-reasons { display: grid; gap: 8px; }
.agp-reason {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px;
  border: 2px solid var(--ag-line); background: #fff; text-align: left; color: var(--ag-ink); font-weight: 600;
}
.agp-reason::before { content: ''; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ag-line); flex: none; }
.agp-reason[aria-pressed="true"] { border-color: var(--ag-green); background: var(--ag-green-tint); }
.agp-reason[aria-pressed="true"]::before { border: 6px solid var(--ag-green); }
.agp-sheet-actions { display: grid; gap: 10px; margin-top: 20px; }
.agp-sheet-actions .agp-link { justify-self: center; }
.agp-video-wrap { position: relative; border-radius: 16px; overflow: hidden; background: #000; margin-top: 12px; }
.agp-video-wrap video { display: block; width: 100%; max-height: 60vh; }
.agp-sound {
  position: absolute; left: 12px; bottom: 12px; border: 0; border-radius: var(--ag-pill);
  background: rgba(255, 255, 255, .92); color: var(--ag-ink); padding: 8px 14px; font-weight: 700; font-size: 13px;
}
.agp-done { text-align: center; padding: 12px 0 4px; }
.agp-done-icon { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: var(--ag-green-tint); color: var(--ag-green-dark); font-size: 28px; font-weight: 800; }

@media (max-width: 480px) {
  .agp h1 { font-size: 24px; }
  .agp-card { padding: 16px; }
  .agp-next-actions { width: 100%; }
  .agp-next-actions .agp-btn { flex: 1 1 auto; }
  .agp-form { grid-template-columns: 1fr; }
  .agp-scents { grid-template-columns: repeat(2, 1fr); }
}

/* Compact option pills (frequency choices) that fit three to a row on a phone */
.agp-pills--sm { flex-wrap: nowrap; gap: 6px; }
.agp-pills--sm .agp-pill { flex: 1; min-height: 36px; padding: 0 8px; font-size: 13px; white-space: nowrap; }
.agp-summary .agp-group-meta:first-child { color: var(--ag-ink); font-size: 14px; font-weight: 600; }

/* Scent picker inside a compact card: three across, smaller images */
.agp-row .agp-scents { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.agp-row .agp-scent { padding: 8px 6px; gap: 6px; border-radius: 14px; }
.agp-row .agp-scent img { width: 52px; height: 52px; }
.agp-row .agp-scent-name { font-size: 13px; min-height: 2.4em; }
.agp-row .agp-stepper button { width: 30px; height: 30px; font-size: 16px; }
.agp-row .agp-stepper output { min-width: 20px; }

/* Team live-edit banner: impossible to miss */
.agp-live-banner {
  position: sticky; top: 0; z-index: 50; margin: 0 0 14px; padding: 12px 14px; border-radius: 12px;
  background: var(--ag-danger); color: #fff; font-size: 14px; line-height: 1.4;
}
.agp-live-banner strong { margin-right: 6px; }

/* Smart nudge */
.agp-nudge { margin: -2px 0 14px; padding: 12px; border-radius: 14px; background: var(--ag-green-tint); color: var(--ag-ink); font-size: 14px; }
.agp-nudge-actions { display: flex; align-items: center; gap: 14px; margin-top: 10px; flex-wrap: wrap; }

/* Pack size choice */
.agp-size-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-bottom: 12px; }
.agp-save-tag { font-style: normal; font-size: 11px; font-weight: 800; color: #fff; background: var(--ag-green); border-radius: 8px; padding: 1px 6px; margin-top: 2px; }

/* Once / Every delivery on add-on cards */
.agp-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.agp-mode-option {
  display: flex; flex-direction: column; align-items: center; padding: 5px 4px; border-radius: 10px;
  border: 1.5px solid var(--ag-line); background: #fff; color: var(--ag-ink); font-size: 11px; line-height: 1.25;
}
.agp-mode-option strong { font-size: 13px; }
.agp-mode-option[aria-pressed="true"] { border-color: var(--ag-green); background: var(--ag-green-tint); }

/* Order details */
.agp-order-details { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--ag-line); font-size: 14px; }
.agp-order-lines { margin-bottom: 6px; }
.agp-total-row { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.agp-total-row--strong { font-weight: 800; color: var(--ag-ink); border-top: 1px solid var(--ag-line); margin-top: 4px; padding-top: 6px; }

/* Delivery instructions */

/* FAQ */
.agp-faq-item { background: #fff; border-radius: 12px; padding: 0 14px; margin-bottom: 6px; }
.agp-faq-item summary { cursor: pointer; padding: 12px 0; font-weight: 700; color: var(--ag-ink); list-style: none; }
.agp-faq-item summary::-webkit-details-marker { display: none; }
.agp-faq-item summary::after { content: '+'; float: right; color: var(--ag-muted); }
.agp-faq-item[open] summary::after { content: '−'; }
.agp-faq-item p { padding: 0 0 12px; font-size: 14px; }

/* Payment rows (one per card; usually one) */
.agp-pay-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--ag-line); }
.agp-pay-row:first-of-type { border-top: 0; }
.agp-pay-row strong { color: var(--ag-ink); }

/* Team notice above the tabs */
.agp-announcement { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; background: #eaf3fc; border: 1px solid #c9def5; color: var(--ag-ink); border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; font-size: 14px; line-height: 1.4; letter-spacing: 0; }
.agp-announcement a { color: #3782D3; font-weight: 700; white-space: nowrap; }
