/* ==========================================================================
   Aven — Chrome v2 (Header / Footer / Dashboard / Profile)
   Written from scratch — new class namespace (av2-*), not a patch layer on
   the old .site-header/.site-nav/.footer-* rules. Those old rules are dead
   now that header.php/footer.php/account-dashboard.php/account-profile.php
   were rewritten to use these classes instead.
   ========================================================================== */

/* ---------------------------------------------------------------- Header */
.av2-header-wrap {
  position: sticky; top: 0; z-index: 200;
  padding: max(14px, env(safe-area-inset-top)) clamp(12px, 3vw, 28px) 0;
}
.av2-header {
  max-width: 1180px; width: min(1180px, calc(100% - 16px)); margin: 0 auto;
  display: flex; align-items: center; gap: 8px;
  background: color-mix(in srgb, var(--bg-card) 88%, transparent);
  backdrop-filter: blur(20px) saturate(1.7);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 8px 8px 8px 18px;
  box-shadow: 0 8px 30px -14px rgba(60, 20, 90, 0.22);
}
.av2-logo { display: flex; align-items: center; gap: 9px; text-decoration: none; flex: 0 0 auto; }
.av2-logo-mark {
  width: 32px; height: 32px; border-radius: 11px; flex: 0 0 32px;
  background: linear-gradient(135deg, var(--pink), var(--amber));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1rem;
}
.av2-logo-word { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; color: var(--text); }
.av2-logo-tag { display: none; }

.av2-nav {
  display: none; align-items: center; gap: 2px; margin: 0 auto;
  flex: 1 1 auto; min-width: 0; justify-content: center;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -ms-overflow-style: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
}
.av2-nav::-webkit-scrollbar { display: none; }
.av2-nav a {
  color: var(--text-dim); text-decoration: none; font-size: 0.86rem; font-weight: 600;
  padding: 9px 14px; border-radius: var(--radius-pill); white-space: nowrap;
  flex: 0 0 auto;
  transition: background .15s ease, color .15s ease;
}
.av2-nav a:hover { background: var(--pink-dim); color: var(--pink); }
.av2-nav a .av2-nav-tag {
  display: inline-block; margin-left: 5px; font-size: 0.62rem; font-weight: 800;
  background: linear-gradient(135deg, var(--pink), var(--amber)); color: #fff;
  padding: 1px 6px; border-radius: 999px; vertical-align: middle;
}
@media (min-width: 980px) { .av2-nav { display: flex; } .av2-logo-tag { display: inline; color: var(--text-faint); font-size: 0.72rem; font-weight: 600; margin-left: 2px; } }

.av2-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; margin-left: auto; }
.av2-cta {
  display: none;
  background: linear-gradient(135deg, var(--pink) 0%, #A855F7 55%, var(--amber) 130%);
  color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 0.85rem;
  padding: 10px 18px; border-radius: var(--radius-pill); text-decoration: none;
  box-shadow: 0 8px 20px -8px rgba(139,92,246,0.55);
  white-space: nowrap;
}
@media (min-width: 620px) { .av2-cta { display: inline-block; } }

.av2-icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--text-dim); display: flex; align-items: center;
  justify-content: center; cursor: pointer; flex: 0 0 38px;
}
.av2-icon-btn:hover { border-color: var(--pink); color: var(--pink); }
.av2-icon-btn svg { width: 17px; height: 17px; }

.av2-account { position: relative; }
.av2-avatar-btn {
  width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--pink), #A855F7);
  color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
}
.av2-signup-btn {
  border: 1.5px solid var(--line); background: var(--bg-soft); color: var(--text);
  font-weight: 700; font-size: 0.82rem; padding: 9px 16px; border-radius: var(--radius-pill);
  cursor: pointer; white-space: nowrap;
}
.av2-signup-btn:hover { border-color: var(--pink); color: var(--pink); }
.av2-login-link {
  display: none; color: var(--text-dim); font-weight: 700; font-size: 0.82rem;
  padding: 9px 10px; text-decoration: none; white-space: nowrap;
}
.av2-login-link:hover { color: var(--pink); }
@media (min-width: 620px) { .av2-login-link { display: inline-block; } }
.av2-account-menu {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 210px;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: var(--shadow-card); padding: 8px; display: none; z-index: 50;
}
.av2-account-menu.is-open { display: block; }
.av2-account-menu a {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 12px;
  color: var(--text); text-decoration: none; font-size: 0.86rem; font-weight: 600;
}
.av2-account-menu a:hover { background: var(--pink-dim); color: var(--pink); }
.av2-account-menu .av2-menu-email { padding: 8px 12px 10px; font-size: 0.72rem; color: var(--text-faint); border-bottom: 1px solid var(--line); margin-bottom: 6px; word-break: break-all; }

/* Mobile burger + slide panel */
.av2-burger { display: flex; }
@media (min-width: 980px) { .av2-burger { display: none; } }
.av2-burger span { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px; position: relative; }
.av2-burger span::before, .av2-burger span::after { content: ''; position: absolute; left: 0; width: 16px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s ease; }
.av2-burger span::before { top: -5px; } .av2-burger span::after { top: 5px; }
.av2-burger.is-open span { background: transparent; }
.av2-burger.is-open span::before { top: 0; transform: rotate(45deg); }
.av2-burger.is-open span::after { top: 0; transform: rotate(-45deg); }

.av2-mobile-panel {
  position: fixed; inset: 0; z-index: 199; background: rgba(10,6,20,0.5);
  opacity: 0; visibility: hidden; transition: opacity .2s ease;
}
.av2-mobile-panel.is-open { opacity: 1; visibility: visible; }
body.av2-noscroll { overflow: hidden; }
.av2-mobile-sheet {
  position: absolute; top: calc(78px + env(safe-area-inset-top)); left: clamp(12px, 3vw, 28px); right: clamp(12px, 3vw, 28px);
  background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--line);
  box-shadow: var(--shadow-card); padding: 14px; transform: translateY(-12px); transition: transform .2s ease;
  max-height: 78vh; overflow-y: auto;
}
.av2-mobile-panel.is-open .av2-mobile-sheet { transform: translateY(0); }
.av2-mobile-sheet a {
  display: block; padding: 13px 14px; border-radius: 14px; color: var(--text);
  text-decoration: none; font-weight: 700; font-size: 0.95rem;
}
.av2-mobile-sheet a:hover { background: var(--pink-dim); color: var(--pink); }
.av2-mobile-sheet hr { border: none; border-top: 1px solid var(--line); margin: 8px 4px; }

/* ---------------------------------------------------------------- Footer */
.av2-footer { margin-top: 90px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden; }
.av2-footer-cta {
  background: linear-gradient(135deg, #1c1235 0%, #3a1f5c 55%, #5b2a6b 130%);
  padding: 52px clamp(20px, 5vw, 70px);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  color: #fff;
}
.av2-footer-cta h3 { font-family: var(--font-display); font-size: clamp(1.3rem, 3vw, 1.8rem); margin: 0 0 6px; }
.av2-footer-cta p { margin: 0; color: rgba(255,255,255,0.75); font-size: 0.95rem; }
.av2-footer-cta .av2-cta { display: inline-block; background: #fff; color: #5b2a6b; box-shadow: none; }
.av2-footer-main { background: #14101f; padding: 44px clamp(20px, 5vw, 70px) 30px; color: rgba(255,255,255,0.8); }
.av2-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 780px) { .av2-footer-grid { grid-template-columns: 1fr 1fr; } }
.av2-footer-brand-word { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: #fff; }
.av2-footer-desc { font-size: 0.86rem; color: rgba(255,255,255,0.55); max-width: 280px; margin-top: 10px; }
.av2-footer-trust { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.av2-footer-trust span {
  display: inline-flex; align-items: center; gap: 4px; font-size: 0.7rem; font-weight: 600;
  color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px; padding: 6px 12px; white-space: nowrap;
}
.av2-footer-col h4 { font-family: var(--font-display); font-size: 0.82rem; font-weight: 800; color: #fff; margin: 0 0 14px; text-transform: uppercase; letter-spacing: .04em; }
.av2-footer-col a { display: block; color: rgba(255,255,255,0.62); text-decoration: none; font-size: 0.86rem; padding: 5px 0; }
.av2-footer-col a:hover { color: var(--pink-light, #C4B5FD); }
.av2-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.09); margin-top: 34px; padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 0.78rem; color: rgba(255,255,255,0.45);
}
.av2-footer-social { display: flex; gap: 10px; }
.av2-footer-social a {
  width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.7);
}
.av2-footer-social a:hover { background: var(--pink); color: #fff; }

/* ------------------------------------------------------- Dashboard v2 */
.av2-dash-hero {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--pink) 0%, #A855F7 60%, var(--amber) 130%);
  color: #fff; padding: 26px 22px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 16px;
}
.av2-dash-avatar {
  width: 54px; height: 54px; border-radius: 18px; flex: 0 0 54px;
  background: rgba(255,255,255,0.22); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1.3rem;
}
.av2-dash-hero-email { font-size: 0.78rem; opacity: .85; font-weight: 600; }
.av2-dash-hero-title { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; margin-top: 2px; word-break: break-all; }

.av2-stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }
.av2-stat {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 16px 8px; text-align: center;
}
.av2-stat-value { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; }
.av2-stat-label { font-size: 0.68rem; color: var(--text-faint); font-weight: 700; margin-top: 3px; text-transform: uppercase; letter-spacing: .03em; }

.av2-report-card {
  display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 14px; margin-bottom: 10px; transition: transform .12s ease, box-shadow .15s ease;
}
.av2-report-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-card); }
.av2-report-icon { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.av2-report-body { flex: 1; min-width: 0; }
.av2-report-title { font-weight: 700; font-size: 0.94rem; }
.av2-report-date { font-size: 0.72rem; color: var(--text-faint); margin-top: 2px; }
.av2-report-status { text-align: right; flex: 0 0 auto; }

.av2-purchase-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.av2-purchase-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.av2-purchase-row:last-child { border-bottom: none; }

/* --------------------------------------------------------- Profile v2 */
.av2-profile-hero {
  text-align: center; padding: 34px 20px; border-radius: var(--radius-lg);
  background: var(--bg-card); border: 1px solid var(--line); margin-bottom: 18px;
}
.av2-profile-avatar {
  width: 76px; height: 76px; border-radius: 26px; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--pink), var(--amber)); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1.7rem;
}
.av2-menu-item {
  display: flex; align-items: center; justify-content: space-between; text-decoration: none; color: var(--text);
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 15px 16px; margin-bottom: 10px; font-weight: 600; font-size: 0.92rem;
}
.av2-menu-item:hover { border-color: var(--pink); }
.av2-menu-item-arrow { color: var(--text-faint); }
.av2-danger-card {
  background: var(--amber-dim); border: 1px solid rgba(255,138,91,0.35); border-radius: var(--radius-md);
  padding: 18px; margin-bottom: 22px;
}
.av2-danger-card p { margin: 0 0 4px; }
.av2-danger-card .av2-danger-title { font-weight: 700; }
.av2-danger-card .av2-danger-sub { font-size: 0.84rem; color: var(--text-dim); margin-bottom: 14px; }

/* Used standalone on pricing.php's paywall trust row (not just the old
   footer trust-bar, which no longer exists) — fresh pill treatment. */
.trust-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-pill); padding: 7px 14px;
  font-weight: 600; font-size: 0.8rem;
  box-shadow: 0 2px 8px rgba(60,20,90,0.04);
}

/* ---- Admin-managed campaign popup (see includes/header.php + admin/popup.php) ---- */
.av-popup-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(20, 10, 30, 0.55);
  align-items: center; justify-content: center;
  padding: 20px;
}
.av-popup-box {
  position: relative; background: var(--bg-card, #fff);
  border-radius: 18px; max-width: 480px; width: 100%;
  max-height: 85vh; overflow-y: auto;
  padding: 28px 24px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.av-popup-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft, #F3F0FA); color: var(--text, #211B36);
  cursor: pointer; padding: 0;
}
.av-popup-close:hover { background: var(--bg-hover, rgba(0,0,0,0.12)); }
.av-popup-title { margin: 0 0 12px; padding-right: 28px; font-size: 1.25rem; font-weight: 800; }
.av-popup-title-spacer { height: 20px; }
.av-popup-body { font-size: 0.92rem; line-height: 1.6; color: var(--text, #222); }
.av-popup-body img { max-width: 100%; height: auto; border-radius: 10px; }
