/* Member Appreciation Month — My Account extensions.
   Ported to match the APPROVED build at mam-club-demo.vercel.app (design POC sign-off),
   not just the local source read — verified against the live deploy directly:
   - gold is fill-only on the "60" shield artwork + sparkle field
   - gold NEVER appears on CTAs, badges, or eyebrows (those are white-on-green or plain green) */

.mam-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 32px;
  border-radius: var(--r-card);
  padding: 34px 38px;
  margin-bottom: 20px;
  color: var(--grey-white);
  background: linear-gradient(135deg, var(--brand-primary-deep) 0%, var(--brand-primary) 100%);
}
.mam-banner__sparkles { position: absolute; inset: 0; z-index: 0; pointer-events: none; width: 100%; height: 100%; }
.mam-banner__body { position: relative; z-index: 1; flex: 1.35; min-width: 0; }
.mam-banner__eyebrow {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--grey-white); margin-bottom: 8px;
}
.mam-banner h2 { margin: 0 0 8px; font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.mam-banner p { margin: 0; font-size: 15px; line-height: 1.55; color: rgba(255,255,255,.84); max-width: 34em; }

.mam-banner__foot { margin-top: 22px; position: relative; z-index: 1; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.mam-banner__foot .mam-btn {
  display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 700;
  background: var(--grey-white); color: var(--brand-primary); border-radius: var(--r-btn); padding: 12px 22px;
  text-decoration: none; white-space: nowrap;
}
.mam-banner__foot .mam-btn:hover { background: #eef0ec; }
.mam-banner__foot .mam-link { font-size: 14px; font-weight: 700; color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.mam-banner__foot .mam-link:hover { color: rgba(255,255,255,.82); }
.mam-banner__art { position: relative; z-index: 1; flex: 0 0 auto; width: 168px; max-width: 32%; aspect-ratio: 1/1; }
.mam-banner__art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 18px rgba(0,0,0,.35)); }

@media (max-width: 700px) {
  .mam-banner { flex-wrap: wrap; padding: 26px; }
  .mam-banner__art { display: none; }
}

/* small badge next to a page H1 signalling MAM relevance ("highlight member appreciation month here") —
   solid brand-green fill + white text, same green as the CTA buttons (--brand-primary, #23410A). */
.mam-page-badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; color: var(--grey-white); background: var(--brand-primary);
  border-radius: var(--r-pill); padding: 4px 11px; margin-left: 12px; vertical-align: middle;
}

/* overlay variant — straddles the top edge of its (relatively-positioned) card instead of
   sitting inline in the heading text, so it reads as a badge on the card itself. The card's own
   overflow:hidden (used to keep its rounded corners clean) would otherwise clip it. */
.mam-page-badge--overlay {
  position: absolute; top: 0; left: 26px; transform: translateY(-50%);
  margin-left: 0; z-index: 2;
}
/* extra top margin so the overlay badge's overhang has clear space above the card instead of
   crowding whatever sits before it on the page (the "how it works" callout). */
/* scroll-margin-top keeps the overlay badge's overhang visible when this card is the target of
   an anchor link (e.g. from the "How it works" modal) — otherwise anchor-scroll snaps the card's
   own top edge flush to the viewport top and clips the badge sitting above it. */
#mam-membership-card { overflow: visible; margin-top: 34px; scroll-margin-top: 40px; }

/* MAM tag — solid brand green fill (same green as the CTA buttons), matches the "Paid members" /
   "Elite exclusive" pill pattern (never gold) */
.mam-tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700;
  letter-spacing: normal; color: var(--grey-white); white-space: nowrap;
  background: var(--brand-primary); margin-bottom: 10px;
  padding: 6px 12px; border-radius: var(--r-pill);
}
.mam-tag svg { width: 12px; height: 12px; flex-shrink: 0; }
.mam-tag--done { background: var(--brand-primary); color: var(--grey-white); }

/* informational note under an embedded MAM tag — states what the action earns + when points post.
   No completion/pending/credited claim (there is no real-time tracking; see mam.js header). */
/* used as both <a> and <button> (add/remove card) — button-reset keeps the link look either way */
.mam-action__go {
  display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700;
  color: var(--brand-primary-600); text-decoration: underline; text-underline-offset: 2px;
  background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit;
}
.mam-action__go svg { width: 13px; height: 13px; }

.mam-action__note { margin: 0; font-size: 13.5px; line-height: 1.5; color: #3d3d3d; }
.mam-action__note.state-locked { display: flex; align-items: flex-start; gap: 6px; color: var(--grey-charcoal); }
.mam-action__note.state-locked svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; }

/* ---------- "How it works" modal (canonical campaign explainer + qualifying-action list) ----------
   Native <dialog> — gives us backdrop, Escape-to-close, and top-layer stacking for free. */
.mam-modal {
  position: fixed; inset: 0; margin: auto; padding: 0; border: none; border-radius: var(--r-card);
  width: min(640px, calc(100vw - 40px)); max-height: calc(100vh - 64px);
  box-shadow: 0 24px 64px rgba(0,0,0,.3);
}
.mam-modal::backdrop { background: rgba(20,30,10,.55); }
.mam-modal__inner { position: relative; padding: 30px; overflow-y: auto; max-height: calc(100vh - 64px); }
.mam-modal__close {
  position: absolute; top: 16px; right: 16px; background: var(--grey-panel); border: none; border-radius: 50%;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; color: var(--grey-ink); cursor: pointer;
}
.mam-modal__close:hover { background: var(--grey-light); }
.mam-modal__close svg { width: 15px; height: 15px; }

/* ---------- "Add payment details" form (Manage Membership) ---------- */
.mam-form-group { margin-bottom: 26px; }
.mam-form-group__title { margin: 0 0 3px; font-size: 15px; font-weight: 700; color: var(--grey-ink); }
.mam-form-group__sub { margin: 0 0 16px; font-size: 13px; color: var(--grey-charcoal); }
.mam-form-row { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 14px; }
.mam-form-row--2 { grid-template-columns: 1fr 1fr; }
.mam-form-row input, .mam-form-row select {
  width: 100%; font: inherit; font-size: 14.5px; color: var(--grey-ink);
  padding: 13px 14px; border: 1px solid var(--grey-border); border-radius: 10px;
  background: var(--grey-white); outline: none; appearance: none; -webkit-appearance: none;
}
.mam-form-row select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7565' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 14px; padding-right: 36px;
}
.mam-form-row input:focus, .mam-form-row select:focus { border-color: var(--brand-primary); }
.mam-field--icon { position: relative; }
.mam-field--icon input { padding-right: 42px; }
.mam-field--icon svg { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--grey-charcoal); pointer-events: none; }
.mam-modal__actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 6px; }
@media (max-width: 480px) {
  .mam-form-row--2 { grid-template-columns: 1fr; }
  .mam-modal__actions { flex-direction: column-reverse; }
  .mam-modal__actions .btn { width: 100%; }
}

.mam-challenge__eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--grey-charcoal); margin-bottom: 6px; }
#mam-hiw-modal-content .section-title { margin: 0 0 6px; padding-right: 30px; }
.mam-hiw-card__sub { margin: 0 0 20px; font-size: 14.5px; color: #3d3d3d; max-width: 60ch; }

.mam-hiw { display: grid; grid-template-columns: 1fr; gap: 16px; }
.mam-hiw__step { display: flex; gap: 12px; }
.mam-hiw__num {
  flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-primary);
  color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.mam-hiw__step h4 { margin: 0 0 3px; font-size: 14.5px; font-weight: 700; color: var(--grey-ink); }
.mam-hiw__step p { margin: 0; font-size: 13px; color: var(--grey-charcoal); line-height: 1.45; }

.mam-hiw__actions-wrap { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--grey-light); }
.mam-hiw__actions-title { margin: 0 0 14px; font-size: 15px; font-weight: 700; color: var(--grey-ink); }
.mam-hiw__actions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mam-hiw__action {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 16px; background: var(--grey-panel); border-radius: var(--r-card); flex-wrap: wrap;
}
.mam-hiw__action.is-locked { opacity: .72; }
.mam-hiw__action-main { display: flex; flex-direction: column; gap: 2px; min-width: 200px; flex: 1; }
.mam-hiw__value { font-size: 12px; font-weight: 800; color: var(--brand-primary-600); letter-spacing: .01em; }
.mam-hiw__title { font-size: 15px; font-weight: 700; color: var(--grey-ink); }
.mam-hiw__desc { font-size: 13px; color: var(--grey-charcoal); }
.mam-hiw__go { flex: none; font-size: 13.5px; font-weight: 700; color: var(--brand-primary-600); text-decoration: underline; text-underline-offset: 2px; }
.mam-hiw__locked { flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--grey-charcoal); }
.mam-hiw__locked svg { width: 13px; height: 13px; }
.mam-hiw__note { margin: 16px 0 0; font-size: 12px; line-height: 1.5; color: var(--grey-charcoal); }

/* expectation-setting alert — identical on all three pages. Exposed on the page (not just in the
   modal): points post after the campaign ends, actions aren't reflected in the account in real time. */
.mam-hiw--compact {
  display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; margin-bottom: 20px;
  background: var(--brand-primary-50); border: 1px solid var(--success-border); border-radius: var(--r-card);
}
.mam-hiw--compact svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; color: var(--brand-primary-600); }
.mam-hiw--compact h3 { margin: 0 0 4px; font-size: 15.5px; font-weight: 700; color: var(--grey-ink); }
.mam-hiw--compact p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--grey-ink); }

/* plain, unstyled-button links used inline within paragraph copy (e.g. "see how it works") —
   look identical to a text link, no arrow icons anywhere per direction */
.mam-inline-link {
  display: inline; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; font: inherit;
  font-weight: 700; color: var(--brand-primary-600); text-decoration: underline;
}

/* small inline info icon, sits at the end of an action note and opens the "how it works" modal —
   used instead of a text link so the note copy can lead with the specific action name */
.mam-inline-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: -3px;
  width: 17px; height: 17px; margin-left: 5px; padding: 0; border: 0; border-radius: 50%;
  background: none; color: var(--brand-primary-600); cursor: pointer;
}
.mam-inline-icon-btn svg { width: 17px; height: 17px; }
.mam-inline-icon-btn:hover { color: var(--brand-primary); }

/* ---------- Auto-renew toggle switch (Manage Membership) ---------- */
.mam-switch-row { display: flex; align-items: center; gap: 12px; }
.mam-switch {
  flex: none; width: 44px; height: 26px; border-radius: var(--r-pill); border: none; padding: 3px;
  background: #c9ccc4; cursor: pointer; display: flex; align-items: center;
}
.mam-switch.is-on { background: var(--brand-primary-600); justify-content: flex-end; }
.mam-switch.is-locked { background: #e4e6e0; cursor: not-allowed; }
.mam-switch__thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.mam-switch__label { font-size: 14px; font-weight: 700; color: var(--grey-ink); }

/* ---------- Floating demo-state pill (mirrors mam-club-demo UX) ---------- */
.mam-demo-toggle {
  position: fixed; right: 20px; bottom: 20px; z-index: 999;
  background: var(--grey-black-dark); color: #fff; border-radius: var(--r-pill);
  padding: 8px; display: flex; gap: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.28);
  font-family: var(--font-sans);
}
.mam-demo-toggle span.label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #aaa; padding: 6px 8px 6px 10px; align-self: center; }
.mam-demo-toggle button {
  font-size: 12.5px; font-weight: 700; padding: 7px 13px; border-radius: var(--r-pill); border: none;
  background: transparent; color: #ddd; cursor: pointer;
}
.mam-demo-toggle button.is-active { background: var(--brand-primary-600); color: #fff; }
@media (max-width: 700px) {
  .mam-demo-toggle { left: 12px; right: 12px; bottom: 12px; overflow-x: auto; justify-content: flex-start; }
}
