/* Good Sam My Account — base chrome, replicating myaccount.goodsam.com
   Tokens reconciled across mam-club-demo / Ascendon checkout ("Denali") / good-sam-credit-cards-V2 —
   all three agree on brand primary #23410A. */

@font-face { font-family: 'Aeonik'; src: url('../assets/fonts/Aeonik-Regular.woff2') format('woff2'), url('../assets/fonts/Aeonik-Regular.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Aeonik'; src: url('../assets/fonts/Aeonik-Medium.woff2') format('woff2'), url('../assets/fonts/Aeonik-Medium.woff') format('woff'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Aeonik'; src: url('../assets/fonts/Aeonik-Bold.woff2') format('woff2'), url('../assets/fonts/Aeonik-Bold.woff') format('woff'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --brand-primary: #23410A;
  --brand-primary-hover: #1a3008;
  --brand-primary-deep: #14260a;
  --brand-primary-600: #335018;
  --brand-primary-50: #F6FDE8;

  --grey-white: #FFFFFF;
  --grey-page: #FBFBFA;
  --grey-panel: #F8F8F6;
  --grey-light: #EFEFEF;
  --grey-dove: #DBE0D6;
  --grey-charcoal: #6b7565;
  --grey-ink: #232323;
  --grey-warm: #474342;
  --grey-border: #E6E6E2;
  --grey-black-dark: #181818;

  --gold: #C8A24B;
  --gold-strong: #B58E38;
  --on-gold: #3A2E10;

  --success-bg: #F6FDE8;
  --success-border: #cfe4ad;
  --warn-bg: #FDF3E7;
  --warn-border: #E3A24B;
  --error-bg: #FDECEA;
  --error-border: #F3C0B8;
  --error: #B42318;

  --r-btn: 4px;
  --r-card: 8px;
  --r-chip: 8px;
  --r-pill: 9999px;
  --shadow-card: 0 1px 3px rgba(20, 40, 16, .06);

  --font-sans: 'Aeonik', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--grey-ink);
  background: var(--grey-white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  border-bottom: 1px solid var(--grey-light);
  background: var(--grey-white);
  /* stacked above the mobile nav overlay (z-index 1000) so the logo stays put while its own
     right-side icons hide/show as the menu opens/closes — the logo itself never changes. */
  position: relative;
  z-index: 1001;
}
.site-header__left { display: flex; align-items: center; gap: 40px; }
.site-header__logo { height: 26px; width: auto; }
.site-header__nav { display: flex; align-items: center; gap: 32px; list-style: none; margin: 0; padding: 0; }
.site-header__nav a {
  font-size: 15px; font-weight: 500; color: var(--grey-ink); text-decoration: none;
}
.site-header__nav a:hover { color: var(--brand-primary); }
.site-header__right { display: flex; align-items: center; gap: 28px; }
.site-header__phone { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--grey-ink); text-decoration: none; }
.site-header__icon-btn {
  display: flex; align-items: center; justify-content: center; color: var(--grey-ink);
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
}
.site-header__icon-btn svg { width: 24px; height: 24px; }
/* The hamburger is the (unbuilt) marketing-nav menu, not the My Account menu — decorative only. */
.site-header__hamburger { display: none; cursor: default; }
@media (max-width: 991px) {
  .site-header__nav { display: none; }
  .site-header { padding: 14px 20px; }
}
/* Below the layout's collapse point the sidebar becomes an account-icon-triggered full-screen
   menu (Figma UIUX-1005, node 11134-12725) instead of an inline block pushing page content down. */
@media (max-width: 900px) {
  .account-sidebar { display: none; }
  .site-header__hamburger { display: flex; }
  /* Figma's mobile header shows the phone icon alone, no number — the icon stays tappable. */
  .site-header__phone-number { display: none; }
}

/* ---------- Layout ---------- */
.account-layout {
  max-width: 1208px;
  margin: 0 auto;
  padding: 40px 40px 80px;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 900px) {
  .account-layout { grid-template-columns: 1fr; padding: 24px 16px 56px; }
}

/* ---------- Sidebar ---------- */
.account-sidebar { background: var(--grey-panel); border-radius: var(--r-card); overflow: hidden; }
.account-sidebar__header { padding: 20px 24px; background: var(--grey-panel); }
.account-sidebar__header h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--grey-ink); }
.account-nav { list-style: none; margin: 0; padding: 0; }
.account-nav li + li { border-top: 1px solid var(--grey-light); }
.account-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 24px; font-size: 15px; font-weight: 500; text-decoration: none; color: var(--grey-ink);
}
.account-nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.site-header__phone svg { width: 18px; height: 18px; flex-shrink: 0; }
.account-nav a.is-active { background: var(--brand-primary); color: var(--grey-white); font-weight: 700; }
.account-sidebar__help { padding: 20px 24px 24px; font-size: 14px; color: var(--grey-ink); }
.account-sidebar__help h3 { font-size: 15px; font-weight: 700; margin: 16px 0 6px; }
.account-sidebar__help p { margin: 0 0 4px; color: #444; }
.account-sidebar__help a { color: var(--brand-primary-600); font-weight: 600; text-decoration: underline; }

/* ---------- Main column ---------- */
.account-main h1.page-title { font-size: 30px; font-weight: 700; margin: 28px 0 20px; color: var(--grey-ink); }

/* system alert (existing product pattern, unchanged) */
.sys-alert {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: var(--r-card);
  padding: 18px 20px; margin-bottom: 20px; position: relative;
}
.sys-alert svg.icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; color: var(--grey-ink); }
.sys-alert h3 { margin: 0 0 6px; font-size: 15.5px; font-weight: 700; }
.sys-alert p { margin: 0; font-size: 14.5px; color: #3d3d3d; line-height: 1.5; }
.sys-alert__close { position: absolute; top: 16px; right: 18px; background: none; border: none; cursor: pointer; color: var(--grey-ink); padding: 2px; }

/* success variant — used for the "Payment updated" confirmation toast */
.sys-alert--success { background: var(--success-bg); border-color: var(--success-border); }
.sys-alert--success svg { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; color: var(--brand-primary-600); }

/* card / panel shell (matches Good Sam Membership card etc. — grey fill, no border) */
.acct-card { background: var(--grey-panel); border-radius: var(--r-card); margin-bottom: 24px; overflow: hidden; }
/* Rewards Center uses a DIFFERENT card treatment on prod: white fill + hairline border, no grey wash */
.acct-card--bordered { background: var(--grey-white); border: 1px solid var(--grey-border); }
.acct-card__head { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px; gap: 16px; flex-wrap: wrap; }
.acct-card__title { display: flex; align-items: center; gap: 14px; }
.acct-card__title svg { width: 26px; height: 26px; color: var(--grey-ink); flex-shrink: 0; }
.acct-card__title h2 { margin: 0; font-size: 20px; font-weight: 700; }
/* plain section title used on Rewards Center cards (no icon lockup) — 28px/400, matches prod */
.section-title { font-size: 28px; font-weight: 400; color: var(--grey-ink); margin: 0; }
.acct-card__link { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 700; color: var(--brand-primary-600); text-decoration: none; }
.acct-card__link svg { width: 14px; height: 14px; flex-shrink: 0; }
.acct-card__body { padding: 0 26px 26px; }
.acct-card__divider { height: 1px; background: var(--grey-light); margin: 0 26px; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px 24px; padding-top: 22px; }
.field-grid dt { font-size: 13px; color: var(--grey-charcoal); margin-bottom: 4px; }
.field-grid dd { font-size: 16px; font-weight: 400; margin: 0; }
@media (max-width: 700px) { .field-grid { grid-template-columns: 1fr 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-size: 16px; font-weight: 700; border-radius: var(--r-btn);
  padding: 18px 24px; text-decoration: none; cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  line-height: 1.2;
}
.btn--primary { background: var(--brand-primary); color: var(--grey-white); border-color: var(--brand-primary); }
.btn--primary:hover { background: var(--brand-primary-hover); }
.btn--outline { background: transparent; color: var(--grey-warm); border-color: var(--grey-warm); }
.btn--outline:hover { background: var(--grey-light); }
button.btn { appearance: none; -webkit-appearance: none; font: inherit; }
/* Membership card CTAs (Renew/Upgrade) — equal width, stacked, so the block reads as one
   aligned unit instead of two differently-sized buttons. Top padding matches .field-grid's so the
   buttons top-align with the field text instead of sitting flush against the divider above. */
.membership-ctas { padding-top: 22px; }
.membership-ctas .btn { width: 100%; min-width: 132px; padding: 14px 20px; font-size: 15px; }
.btn--sm { padding: 9px 16px; font-size: 14px; }
/* fixed-width, center-aligned, text wraps to two lines — matches the real "Link your credit
   card" / "Learn more and apply" buttons on myrewards */
.btn--narrow { width: 140px; white-space: normal; text-align: center; }

.protection-card__body { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 26px; flex-wrap: wrap; }
.protection-card__body p { margin: 0; font-size: 15px; color: #3d3d3d; max-width: 640px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--grey-black-dark); color: var(--grey-white); padding: 48px 40px 40px; margin-top: 40px; }
.site-footer__inner { max-width: 1208px; margin: 0 auto; display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.site-footer__logo { height: 22px; width: auto; margin-bottom: 24px; }
.site-footer small { color: #9a9a9a; }

@media (max-width: 991px) {
  .field-grid { grid-template-columns: 1fr 1fr; }
  .acct-card__head { flex-direction: column; align-items: flex-start; }
}

/* ---------- Breadcrumb (Manage Membership) ---------- */
.breadcrumb { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; color: var(--grey-ink); text-decoration: none; margin: 28px 0 8px; }
.breadcrumb svg { width: 16px; height: 16px; }

/* ---------- Page tabs (Rewards) ---------- */
.page-tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--grey-light); margin: 28px 0 20px; overflow-x: auto; }
.page-tabs a { flex: none; padding: 8px; font-size: 14px; font-weight: 400; color: var(--grey-ink); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.page-tabs a.is-active { color: var(--grey-warm); font-weight: 700; font-size: 16px; border-bottom-color: var(--grey-warm); }

/* ---------- Rewards summary ---------- */
.rewards-hero { display: flex; justify-content: space-between; gap: 24px; padding: 24px 26px 26px; }
.rewards-hero__left { flex: 1 1 340px; min-width: 0; }
.rewards-hero__left h3 { margin: 0; font-size: 28px; font-weight: 400; color: var(--grey-ink); }
.rewards-hero__congrats { font-size: 20px; font-weight: 400; color: var(--grey-ink); margin: 10px 0 0; }
.rewards-hero__value { font-size: 50px; font-weight: 700; color: var(--brand-primary); line-height: 56px; margin: 4px 0; }
.rewards-hero__caption { font-size: 13px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--grey-ink); }
.rewards-hero__sub { font-size: 14px; color: var(--grey-ink); margin-top: 2px; }
.rewards-hero__right { flex: 1 1 300px; min-width: 0; max-width: 320px; text-align: right; }
.rewards-hero__points { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; justify-content: flex-end; color: var(--grey-ink); }
.rewards-hero__points svg { width: 15px; height: 15px; color: var(--grey-ink); }
.rewards-hero__note { font-size: 12px; color: var(--grey-ink); margin: 4px 0 10px; }
@media (max-width: 640px) {
  .rewards-hero { flex-wrap: wrap; }
  .rewards-hero__right { text-align: left; max-width: none; }
  .rewards-hero__points, .rewards-hero__right > a[style] { justify-content: flex-start !important; }
}

/* ---------- Credit card key art (real asset: assets/cc-all.svg) ---------- */
.cc-art { flex: 0 0 auto; width: 280px; max-width: 100%; }
.cc-art img { width: 100%; height: auto; display: block; }

/* benefit / offer tiles remain placeholder gradient blocks (no stock imagery available) */

.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 0 26px 26px; }
.tile { position: relative; border-radius: var(--r-card); overflow: hidden; min-height: 170px; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; padding: 20px; color: #fff; }
.tile h4 { margin: 0 0 6px; font-size: 20px; font-weight: 700; }
.tile a { color: #fff; font-weight: 700; font-size: 14px; text-decoration: underline; }
.tile--travel { background: linear-gradient(160deg, #2d4a63, #17232e); }
.tile--lifestyle { background: linear-gradient(160deg, #4a5a3d, #1c2417); }
.tile--health { background: linear-gradient(160deg, #6b5a45, #2b2318); }
.tile--points { background: linear-gradient(160deg, var(--brand-primary-600), var(--brand-primary-deep)); }
@media (max-width: 700px) { .tile-grid { grid-template-columns: 1fr; } }

.offer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 0 26px 26px; }
.offer-card { border: 1px solid var(--grey-light); border-radius: var(--r-card); overflow: hidden; }
.offer-card__art { height: 110px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 15px; }
.offer-card__body { padding: 16px; }
.offer-card__body a.cta { display: block; font-weight: 700; color: var(--brand-primary-600); text-decoration: underline; margin-bottom: 4px; }
.offer-card__cat { font-size: 13px; color: var(--grey-charcoal); margin-bottom: 12px; }
.offer-card__elig { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--grey-ink); background: var(--grey-panel); border-radius: var(--r-pill); padding: 5px 10px; }
@media (max-width: 860px) { .offer-grid { grid-template-columns: 1fr; } }

.empty-state { padding: 22px 26px 28px; font-size: 14.5px; color: var(--grey-charcoal); }

/* ---------- Manage-product page: payment / plan / vehicle / wallet cards ---------- */
.mgmt-card { background: var(--grey-panel); border-radius: var(--r-card); padding: 22px 26px; margin-bottom: 20px; }
.mgmt-card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mgmt-card__head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.mgmt-card__head a, .mgmt-card__head button { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--brand-primary-600); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
.mgmt-card__head a svg, .mgmt-card__head button svg { width: 14px; height: 14px; }
.mgmt-card dl { display: flex; gap: 48px; margin: 0; }
.mgmt-card dt { font-size: 13px; color: var(--grey-charcoal); margin-bottom: 3px; }
.mgmt-card dd { font-size: 15px; font-weight: 600; margin: 0; }
.mgmt-card p { font-size: 14.5px; color: #3d3d3d; line-height: 1.55; margin: 0; }

.vehicle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.vehicle-card { display: flex; align-items: center; gap: 12px; background: var(--grey-white); border: 1px solid var(--grey-light); border-radius: var(--r-card); padding: 14px; }
.vehicle-card svg { width: 30px; height: 30px; flex-shrink: 0; color: var(--brand-primary-600); }
.vehicle-card strong { display: block; font-size: 14.5px; }
.vehicle-card span { font-size: 13px; color: var(--grey-charcoal); }
@media (max-width: 700px) { .vehicle-grid { grid-template-columns: 1fr; } }

.wallet-row { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.wallet-btn { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: var(--r-btn); font-size: 14px; font-weight: 700; cursor: pointer; }
.wallet-btn--apple { background: #000; color: #fff; }
.wallet-btn--google { background: #fff; color: var(--grey-ink); border: 1px solid var(--grey-dove); }

/* ---------- Mobile menu (full-screen nav takeover, replaces the sidebar below 900px) ----------
   Plain text list (no icons), active page bolded — a deliberately different treatment from the
   desktop sidebar's icon + green-fill-active style, matching the Figma mobile spec directly. */
.mam-mobile-nav {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: var(--grey-white); flex-direction: column; overflow-y: auto;
}
.mam-mobile-nav.is-open { display: flex; }
/* First item in the menu, not a modal header — the close control lives in the persistent site
   header (hamburger swaps to a close icon), so this is just a plain green label bar. */
.mam-mobile-nav__label {
  flex: none; background: var(--brand-primary); color: var(--grey-white);
  padding: 20px 20px; font-size: 16px; font-weight: 700;
}
.mam-mobile-nav__list { list-style: none; margin: 0; padding: 0; }
.mam-mobile-nav__list li + li { border-top: 1px solid var(--grey-light); }
.mam-mobile-nav__list a { display: block; padding: 17px 20px; font-size: 15px; font-weight: 500; color: var(--grey-ink); text-decoration: none; }
.mam-mobile-nav__list a.is-active { font-weight: 700; }
