/*
 * AgeVerifyUK — Design System
 * Shared across all pages: CSS custom properties, header, footer, buttons.
 * Loaded globally via meta_and_title.php after Bootstrap.
 */

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --ink:           #0A1F3D;
  --brand:         #0054A6;
  --brand-bright:  #1B6FD8;
  --verified:      #0E9F6E;
  --verified-soft: #E6F6EF;
  --amber:         #B45309;
  --paper:         #F7F9FC;
  --white:         #FFFFFF;
  --line:          #DCE4EF;
  --muted:         #51617A;
  --radius:        14px;
  --font-display:  'Bricolage Grotesque', system-ui, sans-serif;
  --font-body:     'Inter', system-ui, sans-serif;
  --font-mono:     'IBM Plex Mono', ui-monospace, monospace;
}

/* ============================================================
   BASE RESETS
   ============================================================ */
html,
body {
  scroll-behavior: smooth;
  overflow-x: clip; /* clip (not hidden) — prevents horizontal scroll without creating a scroll
                       container, so position:sticky on the header keeps working correctly */
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: 0 !important; /* Remove legacy fixed-nav body padding */
  /* Sticky footer: page always fills the viewport height */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Grows to fill space between header and footer */
.page-content { flex: 1 0 auto; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

a {
  color: var(--brand);
}
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--brand-bright);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Notification bar shown via main.js showNotification() */
.top_notification {
  background: var(--brand);
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-size: .9rem;
  font-weight: 500;
  display: none;
}

/* ============================================================
   AVUK BUTTON SYSTEM
   Prefixed .avuk-btn to avoid colliding with Bootstrap .btn on
   account pages that haven't been reskinned yet.
   ============================================================ */
.avuk-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  padding: 11px 20px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  transition: transform .12s ease, box-shadow .12s ease,
              background .12s ease, color .12s ease, border-color .12s ease;
}
.avuk-btn:hover           { transform: translateY(-1px); text-decoration: none; }

.avuk-btn-primary         { background: var(--brand); color: #fff !important;
                            box-shadow: 0 4px 14px rgba(0,84,166,.28); }
.avuk-btn-primary:hover   { background: var(--brand-bright); color: #fff !important; }

.avuk-btn-ghost           { border-color: var(--line); color: var(--ink) !important;
                            background: var(--white); }
.avuk-btn-ghost:hover     { border-color: var(--brand); color: var(--brand) !important; }

.avuk-btn-ghost-dark      { border-color: rgba(255,255,255,.4); color: #fff !important;
                            background: transparent; }
.avuk-btn-ghost-dark:hover{ border-color: #fff; }

.avuk-btn-white           { background: #fff; color: var(--brand) !important;
                            box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.avuk-btn-white:hover     { background: #f0f4f8; }

.avuk-btn-lg              { padding: 14px 26px; font-size: 1.02rem; }
.avuk-btn-sm              { padding: 7px 16px; font-size: .85rem; }

.avuk-btn-danger          { background: #DC2626; color: #fff !important;
                            box-shadow: 0 4px 14px rgba(220,38,38,.25); }
.avuk-btn-danger:hover    { background: #B91C1C; color: #fff !important; }

/* ============================================================
   SITE HEADER
   ============================================================ */
header.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 1040;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo:hover             { color: var(--ink); text-decoration: none; }
.logo-tick {
  width: 28px;
  height: 28px;
  background: var(--brand);
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: none;
}
.logo-tick svg  { width: 16px; height: 16px; }
.site-logo b    { color: var(--brand); }

/* Desktop navigation links */
.site-nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-weight: 500;
  font-size: .95rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  justify-content: center;
}
.site-nav-links a            { color: var(--ink); text-decoration: none; transition: color .15s; }
.site-nav-links a:hover,
.site-nav-links a.navactive  { color: var(--brand); }

/* CTA cluster */
.site-nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Mobile hamburger — hidden by default on desktop */
.site-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--ink);
  line-height: 1;
}
.site-menu-btn:hover { border-color: var(--brand); color: var(--brand); }

/* ============================================================
   MOBILE NAV DRAWER
   Animation handled by jQuery UI .toggle('slide') in main.js;
   we style the container and links, not the animation.
   ============================================================ */
.mobile-nav-bg {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,31,61,.45);
  z-index: 1038;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: var(--white);
  z-index: 1039;
  padding: 20px 16px;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 24px rgba(10,31,61,.12);
}

.mobile-nav .nav-item { width: 100%; }

.mobile-nav .nav-link {
  display: block;
  padding: 13px 4px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: .98rem;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: color .15s;
}
.mobile-nav .nav-link:hover,
.mobile-nav .nav-link.navactive { color: var(--brand); }

.mobile-nav .nav-item.nav-bottom {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
footer.site-footer {
  background: var(--ink);
  color: #A9BCD8;
  padding: 56px 0 40px;
  font-size: .9rem;
  line-height: 1.7;
}

.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

footer.site-footer h4 {
  color: #fff;
  font-family: var(--font-display);
  font-size: .95rem;
  margin-bottom: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

footer.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
footer.site-footer ul li { margin-bottom: 9px; }

footer.site-footer a          { color: #A9BCD8; text-decoration: none; transition: color .15s; }
footer.site-footer a:hover    { color: #fff; }

.foot-social {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.foot-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.18);
  color: #A9BCD8 !important;
  font-size: .85rem;
  transition: border-color .15s, color .15s;
}
.foot-social a:hover { border-color: rgba(255,255,255,.5); color: #fff !important; }

.foot-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .82rem;
  color: #6E82A0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .site-nav-links                    { display: none; }
  .site-menu-btn                     { display: block; }
  .site-nav-cta .avuk-btn-ghost      { display: none; }
  /* Also hide the primary CTA on very small viewports so it doesn't crowd the hamburger */
  .site-nav-cta .avuk-btn-primary    { display: none; }
  .foot-grid                         { grid-template-columns: 1fr 1fr; }
  /* Zero out Bootstrap row gutters on mobile — prevents the -12px negative margins
     from creating a scroll-width wider than the viewport */
  .row { --bs-gutter-x: 0; }
}

@media (max-width: 560px) {
  .foot-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ── Notice / error pages (session_expired, error.php) ────── */

.notice-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
}

.notice-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 48px 52px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(10,31,61,.07);
}

.notice-icon {
  width: 64px; height: 64px;
  background: #EEF4FB;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: var(--brand);
}

.notice-icon-error {
  background: #FEE2E2;
  color: #DC2626;
}

.notice-card h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}

.notice-card p {
  font-size: .93rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 10px;
}

.notice-card a { color: var(--brand); }

