/**
 * WavPOS Wallet Theme — chrome
 *
 * SCOPING RULE (critical): every rule here is scoped to a theme class (.wv-*),
 * a WooCommerce class, or a semantic landmark. There are NO bare element
 * selectors that would cascade into plugin markup — in particular NO global
 * `button {}`, `a {}`, `input {}` rules with text-transform / letter-spacing /
 * color. That global-button rule is exactly what made the wallet portal's
 * REFRESH button uppercase under Themify. We do not repeat it.
 *
 * The theme never sets styles on .epcwp-* (the wallet portal owns those).
 */

/* ---- Reset that stays inside its lane ------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.wavpos-wallet {
  margin: 0;
  background: var(--wv-bg);
  color: var(--wv-fg);
  font-family: var(--wv-font);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;           /* belt-and-braces: no horizontal scroll */
}

body.wavpos-wallet img { max-width: 100%; height: auto; }

/* Skip link */
.wv-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--wv-bg);
  color: var(--wv-fg);
  padding: var(--wv-space-3) var(--wv-space-4);
  border: 2px solid var(--wv-focus);
  border-radius: var(--wv-radius);
}
.wv-skip-link:focus {
  left: var(--wv-space-3);
  top: var(--wv-space-3);
}

/* ---- Layout shell -------------------------------------------------------- */
.wv-container {
  width: 100%;
  max-width: var(--wv-maxw);
  margin-inline: auto;
  padding-inline: var(--wv-space-4);
}

.wv-main {
  padding-block: var(--wv-space-5);
  min-height: 50vh;
}

.wv-content > * { margin-block: 0 var(--wv-space-4); }

/* ---- Header -------------------------------------------------------------- */
.wv-header {
  background: var(--wv-brand);
  color: var(--wv-brand-ink);
}
.wv-header.is-sticky {
  position: sticky;
  top: 0;
  z-index: 100;
}
.wv-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wv-space-3);
  min-height: 56px;
  padding-block: var(--wv-space-2);
}
.wv-header__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--wv-space-2);
  text-decoration: none;
  color: var(--wv-brand-ink);
  min-height: var(--wv-tap);
}
.wv-header__logo {
  display: block;
  height: 32px;
  width: auto;
}
.wv-header__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--wv-brand-ink);          /* dark ink on brand — NOT white */
}

/* Nav (optional; hidden unless enabled in Customizer) */
.wv-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--wv-tap);
  min-height: var(--wv-tap);
  padding: 0;
  background: transparent;
  border: 2px solid var(--wv-brand-ink);
  border-radius: var(--wv-radius);
  color: var(--wv-brand-ink);
  font: inherit;
  cursor: pointer;
}
.wv-nav {
  display: none;
}
.wv-nav.is-open {
  display: block;
  padding-block: var(--wv-space-2) var(--wv-space-3);
}
.wv-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--wv-space-1);
}
.wv-nav__list a {
  display: block;
  min-height: var(--wv-tap);
  line-height: var(--wv-tap);
  padding-inline: var(--wv-space-2);
  color: var(--wv-brand-ink);
  text-decoration: none;
  border-radius: var(--wv-radius);
}
.wv-nav__list a:hover,
.wv-nav__list a:focus-visible { text-decoration: underline; }

/* ---- Footer -------------------------------------------------------------- */
.wv-footer {
  border-top: 1px solid var(--wv-border);
  background: var(--wv-surface);
  color: var(--wv-muted);
  padding-block: var(--wv-space-5);
  margin-top: var(--wv-space-6);
}
.wv-footer__links {
  list-style: none;
  margin: 0 0 var(--wv-space-3);
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--wv-space-4);
}
.wv-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--wv-tap);
  color: var(--wv-fg);
}
.wv-footer__copy { font-size: 0.875rem; margin: 0; }

/* ---- Theme-owned interactive elements ------------------------------------ */
/* Scoped .wv-button only. Never a bare button {} selector. */
.wv-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--wv-tap);
  padding: var(--wv-space-2) var(--wv-space-5);
  background: var(--wv-brand);
  color: var(--wv-brand-ink);          /* dark ink on brand fill */
  border: 2px solid var(--wv-brand);
  border-radius: var(--wv-radius);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.wv-button:hover { filter: brightness(0.96); }

/* ---- Typography (scoped to content) -------------------------------------- */
.wv-content h1 { font-size: 1.6rem; line-height: 1.2; }
.wv-content h2 { font-size: 1.3rem; line-height: 1.25; }
.wv-content h3 { font-size: 1.1rem; line-height: 1.3; }
.wv-content a { color: var(--wv-focus); }
.wv-content p { margin: 0 0 var(--wv-space-4); }

.wv-muted { color: var(--wv-muted); }

/* Cards / insets used by theme templates (404, search) */
.wv-card {
  background: var(--wv-surface);
  border: 1px solid var(--wv-border);
  border-radius: var(--wv-radius);
  padding: var(--wv-space-5);
}

/* Search form (theme-owned) */
.wv-search {
  display: flex;
  gap: var(--wv-space-2);
  max-width: 100%;
}
.wv-search__field {
  flex: 1 1 auto;
  min-height: var(--wv-tap);
  padding: var(--wv-space-2) var(--wv-space-3);
  border: 1px solid var(--wv-border);
  border-radius: var(--wv-radius);
  font: inherit;
  color: var(--wv-fg);
  background: var(--wv-bg);
}

/* ---- Focus: solid outline fallback on every interactive element ---------- */
.wavpos-wallet a:focus-visible,
.wavpos-wallet .wv-button:focus-visible,
.wavpos-wallet .wv-nav-toggle:focus-visible,
.wavpos-wallet .wv-search__field:focus-visible {
  outline: 3px solid var(--wv-focus);
  outline-offset: 2px;
}

/* ---- Breakpoint: widen + allow multi-column presets ---------------------- */
@media (min-width: 720px) {
  :root { --wv-maxw: 720px; }
  .wv-nav { display: block; }        /* menu sits inline on wider screens */
  .wv-nav-toggle { display: none; }
  .wv-header__inner { align-items: center; }
  .wv-nav__list { flex-direction: row; gap: var(--wv-space-4); }
}

/* ---- Reduced motion: opt-in only ----------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* NOTE: deliberately NO `@media (prefers-color-scheme: dark)` block.
   The site is light-only by design. Dark is a Customizer choice if ever
   wanted, never an OS inference. */
