/* public/partials/site-account.css — the header's customer slot and the welcome card
   (customer accounts stage 4). Self-contained F2 values, like site-nav.css, so the storefront
   and the builder render it identically. */
.f2-acct, .f2-wc-card-wrap {
  --ac-navy: #032268; --ac-navy-deep: #04163F; --ac-navy-2: #041a4d; --ac-gold: #EEC011;
  --ac-off: #F4F4F3; --ac-white: #FFFFFF; --ac-ink: #1a2230; --ac-soft: #4a5568;
  --ac-fh: 'Oswald', 'Arial Narrow', system-ui, sans-serif;
  --ac-fb: 'Epilogue', system-ui, -apple-system, sans-serif;
}

/* ── Header slot ─────────────────────────────────────────────────────────────────────────── */
.f2-acct { position: relative; display: flex; align-items: center; flex: 0 0 auto; min-width: 44px; height: 44px; }
.f2-acct[data-state="loading"] { visibility: hidden; }
.f2-acct-signin {
  display: inline-flex; align-items: center; gap: .5rem; height: 40px; padding: 0 1.05rem 0 .85rem;
  border: 1px solid rgba(238,192,17,.55); border-radius: 300px;
  color: var(--ac-white); font-family: var(--ac-fb); font-size: .95rem; font-weight: 500; line-height: 1;
  text-decoration: none; white-space: nowrap; transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.f2-acct-signin svg { flex: 0 0 auto; color: var(--ac-gold); }
.f2-acct-signin:hover { background: var(--ac-gold); border-color: var(--ac-gold); color: var(--ac-navy); }
.f2-acct-signin:hover svg { color: var(--ac-navy); }
.f2-acct-signin:focus-visible, .f2-acct-btn:focus-visible { outline: 2px solid var(--ac-gold); outline-offset: 2px; }

.f2-acct-btn {
  display: inline-flex; align-items: center; gap: .55rem; height: 44px; padding: 0 .7rem 0 .3rem;
  background: transparent; border: 1px solid rgba(255,255,255,.22); border-radius: 300px;
  color: var(--ac-white); font-family: var(--ac-fb); font-size: .95rem; font-weight: 500; cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.f2-acct-btn:hover, .f2-acct-btn[aria-expanded="true"] { border-color: var(--ac-gold); background: rgba(255,255,255,.05); }
.f2-acct-btn svg { color: rgba(255,255,255,.7); transition: transform .16s ease; }
.f2-acct-btn[aria-expanded="true"] svg { transform: rotate(180deg); color: var(--ac-gold); }
.f2-acct-avatar {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--ac-gold); color: var(--ac-navy); font-family: var(--ac-fh); font-weight: 600;
  font-size: .95rem; letter-spacing: .02em; line-height: 1;
}
.f2-acct-name { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f2-acct-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.f2-acct-menu {
  position: absolute; top: calc(100% + 12px); right: 0; z-index: 60; min-width: 250px; max-width: min(88vw, 320px);
  display: flex; flex-direction: column; padding: .5rem; border-radius: 12px;
  background: var(--ac-navy-2); border: 1px solid rgba(238,192,17,.30); box-shadow: 0 18px 44px rgba(0,0,0,.45);
}
.f2-acct-menu[hidden] { display: none; }
.f2-acct-who { display: flex; flex-direction: column; gap: .2rem; padding: .7rem .85rem .8rem; margin-bottom: .3rem; border-bottom: 1px solid rgba(238,192,17,.22); }
.f2-acct-who-name { color: var(--ac-white); font-family: var(--ac-fh); font-size: 1.05rem; letter-spacing: .01em; }
.f2-acct-who-email { color: rgba(255,255,255,.62); font-family: var(--ac-fb); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f2-acct-menu a {
  display: block; color: var(--ac-white); font-family: var(--ac-fb); font-size: 1rem; line-height: 1.2;
  padding: .7rem .85rem; border-radius: 8px; text-decoration: none; transition: background .14s ease, color .14s ease;
}
.f2-acct-menu a:hover, .f2-acct-menu a:focus-visible { background: rgba(255,255,255,.08); color: var(--ac-gold); outline: none; }

/* Narrow headers: the pill becomes a round icon, the menu button drops the name. */
@media (max-width: 1180px) {
  .f2-acct-name { display: none; }
  .f2-acct-btn { padding: 0 .55rem 0 .3rem; gap: .35rem; }
}
@media (max-width: 1100px) {
  .f2-acct-signin { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .f2-acct-signin span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .f2-acct-signin svg { width: 20px; height: 20px; }
}

@media (max-width: 380px) {
  .f2-acct-btn { padding: 0 .3rem; gap: 0; }
  .f2-acct-btn > svg { display: none; }
}

/* ── Welcome card (live phase only; never a shield) ──────────────────────────────────────── */
.f2-wc-card-wrap {
  position: fixed; z-index: 140; right: clamp(1rem, 2.5vw, 2rem); bottom: clamp(1rem, 2.5vw, 2rem);
  width: min(400px, calc(100vw - 2rem)); pointer-events: none;
}
.f2-wc-card {
  pointer-events: auto; position: relative; box-sizing: border-box;
  background: var(--ac-white); color: var(--ac-ink); border-radius: 20px; overflow: hidden;
  border: 1px solid rgba(3,34,104,.12); box-shadow: 0 30px 70px rgba(4,22,63,.28), 0 6px 18px rgba(4,22,63,.12);
  padding: 2rem 1.9rem 1.5rem; text-align: center;
  transform: translateY(18px); opacity: 0; transition: transform .32s cubic-bezier(.2,.8,.2,1), opacity .25s ease;
}
.f2-wc-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 5px;
  background: linear-gradient(90deg, var(--ac-navy) 0 50%, var(--ac-gold) 50% 100%);
}
.f2-wc-card-wrap.is-in .f2-wc-card { transform: none; opacity: 1; }
.f2-wc-x {
  position: absolute; top: .85rem; right: .85rem; width: 34px; height: 34px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--ac-soft); cursor: pointer;
}
.f2-wc-x:hover { background: #eef1f8; color: var(--ac-navy); }
.f2-wc-x:focus-visible, .f2-wc-guest:focus-visible, .f2-wbtn:focus-visible { outline: 2px solid var(--ac-navy); outline-offset: 2px; }
.f2-wc-eyebrow {
  margin: 0 0 .6rem; font-family: var(--ac-fb); font-size: .7rem; font-weight: 700;
  letter-spacing: .26em; text-transform: uppercase; color: var(--ac-navy); opacity: .7;
}
.f2-wc-title {
  margin: 0; font-family: var(--ac-fh); font-weight: 400; font-size: 1.85rem; line-height: 1.1;
  letter-spacing: -.01em; color: var(--ac-navy); text-wrap: balance;
}
.f2-wc-text { margin: .8rem auto 0; max-width: 21rem; font-family: var(--ac-fb); font-size: .95rem; line-height: 1.58; color: var(--ac-soft); text-wrap: balance; }
.f2-wc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin-top: 1.4rem; }
.f2-wbtn {
  display: inline-flex; align-items: center; justify-content: center; height: 48px; border-radius: 300px;
  font-family: var(--ac-fb); font-size: 1rem; font-weight: 600; line-height: 1; text-decoration: none;
  border: 1.5px solid transparent; transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.f2-wbtn-gold { background: var(--ac-gold); border-color: var(--ac-gold); color: var(--ac-navy); }
.f2-wbtn-gold:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(238,193,17,.38); }
.f2-wbtn-line { background: var(--ac-white); border-color: var(--ac-navy); color: var(--ac-navy); }
.f2-wbtn-line:hover { background: var(--ac-navy); color: var(--ac-white); }
.f2-wc-guest {
  margin-top: .95rem; padding: .35rem .6rem; border: 0; background: transparent; cursor: pointer;
  font-family: var(--ac-fb); font-size: .95rem; font-weight: 600; color: var(--ac-navy);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(3,34,104,.35);
}
.f2-wc-guest:hover { text-decoration-color: var(--ac-gold); }
.f2-wc-legal { margin: 1.1rem 0 0; padding-top: 1rem; border-top: 1px solid rgba(3,34,104,.1); font-family: var(--ac-fb); font-size: .74rem; line-height: 1.55; color: var(--ac-soft); }
.f2-wc-legal a { color: var(--ac-navy); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }

@media (max-width: 520px) {
  .f2-wc-card-wrap { left: 0; right: 0; bottom: 0; width: auto; }
  .f2-wc-card { border-radius: 20px 20px 0 0; padding: 1.8rem 1.25rem calc(1.2rem + env(safe-area-inset-bottom)); border-bottom: 0; }
  .f2-wc-title { font-size: 1.65rem; }
}
@media (prefers-reduced-motion: reduce) { .f2-wc-card { transition: none; } }
