/*
 * Zapcart identity and contrast safeguards.
 * Narrow, high-specificity overrides intentionally protect critical content
 * from theme and snippet rules loaded earlier in the page.
 */

:root {
  --zap-ui-ink: #241f23;
  --zap-ui-muted: #655b62;
  --zap-ui-paper: #fffdf9;
  --zap-ui-paper-soft: #f5eef1;
  --zap-ui-line: #d9cbd1;
  --zap-ui-red: #c73b4f;
  --zap-ui-violet: #7657a8;
  --zap-ui-gold: #c79537;
  --zap-ui-cyan: #3ab7d4;
}

html body:not(.wp-admin) {
  background:
    radial-gradient(circle at 88% 6%, rgba(224, 99, 128, 0.09), transparent 30rem),
    radial-gradient(circle at 8% 58%, rgba(68, 180, 205, 0.07), transparent 32rem),
    linear-gradient(145deg, #17161a 0%, #211b21 54%, #262126 100%);
}

html body:not(.wp-admin) .site-header .custom-logo-link,
html body:not(.wp-admin) .header-main .custom-logo-link,
html body:not(.wp-admin) header .zapcart-transparent-logo-shell,
html body:not(.wp-admin) footer .zapcart-transparent-logo-shell {
  padding: 0 !important;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}

html body:not(.wp-admin) header img.zapcart-wordmark-only,
html body:not(.wp-admin) footer img.zapcart-wordmark-only,
html body:not(.wp-admin) .site-header img.custom-logo,
html body:not(.wp-admin) .site-footer img.custom-logo {
  display: block !important;
  width: auto !important;
  max-width: min(100%, 300px) !important;
  height: auto !important;
  max-height: 72px !important;
  padding: 0 !important;
  margin: 0 !important;
  object-fit: contain !important;
  object-position: left center !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.32)) drop-shadow(0 0 12px rgba(255, 255, 255, 0.08)) !important;
}

/* WooCommerce account: headings remain visible on the dark page. */
html body.woocommerce-account .site-main > article > header.page-hero h1,
html body.woocommerce-account .page-hero .entry-title {
  color: #2c2329 !important;
  -webkit-text-fill-color: #2c2329 !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

html body.woocommerce-account .woocommerce > h2,
html body.woocommerce-account .woocommerce .u-column1 > h2,
html body.woocommerce-account .woocommerce .u-column2 > h2,
html body.woocommerce-account #customer_login > div > h2 {
  color: #fff9fb !important;
  -webkit-text-fill-color: #fff9fb !important;
  text-shadow: 0 2px 22px rgba(214, 92, 127, 0.16);
  opacity: 1 !important;
}

/* Login, registration and password forms are deliberately light reading surfaces. */
html body.woocommerce-account form.woocommerce-form-login,
html body.woocommerce-account form.woocommerce-form-register,
html body.woocommerce-account form.woocommerce-ResetPassword,
html body.woocommerce-account form.lost_reset_password {
  color: var(--zap-ui-ink) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(206, 75, 111, 0.08), transparent 16rem),
    linear-gradient(145deg, var(--zap-ui-paper), var(--zap-ui-paper-soft)) !important;
  border: 1px solid rgba(217, 203, 209, 0.95) !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(255, 255, 255, 0.45) inset !important;
}

html body.woocommerce-account form.woocommerce-form-login label,
html body.woocommerce-account form.woocommerce-form-register label,
html body.woocommerce-account form.woocommerce-ResetPassword label,
html body.woocommerce-account form.lost_reset_password label,
html body.woocommerce-account form.woocommerce-form-login p,
html body.woocommerce-account form.woocommerce-form-register p,
html body.woocommerce-account form.woocommerce-ResetPassword p,
html body.woocommerce-account form.lost_reset_password p,
html body.woocommerce-account form.woocommerce-form-login span,
html body.woocommerce-account form.woocommerce-form-register span,
html body.woocommerce-account form.woocommerce-form-login strong,
html body.woocommerce-account form.woocommerce-form-register strong,
html body.woocommerce-account form .woocommerce-privacy-policy-text,
html body.woocommerce-account form .woocommerce-privacy-policy-text p {
  color: var(--zap-ui-ink) !important;
  -webkit-text-fill-color: var(--zap-ui-ink) !important;
  opacity: 1 !important;
}

html body.woocommerce-account form.woocommerce-form-login a,
html body.woocommerce-account form.woocommerce-form-register a,
html body.woocommerce-account form.woocommerce-ResetPassword a,
html body.woocommerce-account form.lost_reset_password a {
  color: #8f2e43 !important;
  -webkit-text-fill-color: #8f2e43 !important;
  text-decoration: underline !important;
  text-decoration-color: rgba(143, 46, 67, 0.55) !important;
  text-underline-offset: 0.18em;
}

html body.woocommerce-account form.woocommerce-form-login input.input-text,
html body.woocommerce-account form.woocommerce-form-register input.input-text,
html body.woocommerce-account form.woocommerce-ResetPassword input.input-text,
html body.woocommerce-account form.lost_reset_password input.input-text {
  color: #211c20 !important;
  -webkit-text-fill-color: #211c20 !important;
  caret-color: #9d3550 !important;
  background: #ffffff !important;
  border: 1px solid #bcaab2 !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset !important;
}

html body.woocommerce-account form.woocommerce-form-login input.input-text:focus,
html body.woocommerce-account form.woocommerce-form-register input.input-text:focus,
html body.woocommerce-account form.woocommerce-ResetPassword input.input-text:focus,
html body.woocommerce-account form.lost_reset_password input.input-text:focus {
  border-color: var(--zap-ui-violet) !important;
  outline: 3px solid rgba(118, 87, 168, 0.22) !important;
  outline-offset: 1px;
}

html body.woocommerce-account form .woocommerce-button,
html body.woocommerce-account form button.button {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: linear-gradient(112deg, var(--zap-ui-red), var(--zap-ui-violet) 66%, var(--zap-ui-gold)) !important;
  border: 0 !important;
  box-shadow: 0 10px 24px rgba(142, 48, 76, 0.24) !important;
}

/* Logged-in account cards use the same readable neutral surface. */
html body.woocommerce-account .woocommerce-MyAccount-navigation,
html body.woocommerce-account .woocommerce-MyAccount-content {
  color: var(--zap-ui-ink) !important;
  background: linear-gradient(145deg, var(--zap-ui-paper), #f0e8ec) !important;
  border: 1px solid rgba(217, 203, 209, 0.9) !important;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2) !important;
}

html body.woocommerce-account .woocommerce-MyAccount-navigation p,
html body.woocommerce-account .woocommerce-MyAccount-content p,
html body.woocommerce-account .woocommerce-MyAccount-content li,
html body.woocommerce-account .woocommerce-MyAccount-content label,
html body.woocommerce-account .woocommerce-MyAccount-content address,
html body.woocommerce-account .woocommerce-MyAccount-content h2,
html body.woocommerce-account .woocommerce-MyAccount-content h3 {
  color: var(--zap-ui-ink) !important;
  -webkit-text-fill-color: var(--zap-ui-ink) !important;
  opacity: 1 !important;
}

html body.woocommerce-account main.site-main .woocommerce .woocommerce-MyAccount-navigation a,
html body.woocommerce-account main.site-main .woocommerce .woocommerce-MyAccount-content a {
  color: #82304a !important;
  -webkit-text-fill-color: #82304a !important;
  text-decoration-color: rgba(130, 48, 74, 0.5) !important;
  opacity: 1 !important;
}

html body.woocommerce-account main.site-main .woocommerce .woocommerce-MyAccount-navigation-link.is-active a {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: linear-gradient(105deg, #ba3c52, #7556a8) !important;
}

/* Notices and validation feedback must remain legible on both page tones. */
html body.woocommerce-account .woocommerce-error,
html body.woocommerce-account .woocommerce-info,
html body.woocommerce-account .woocommerce-message {
  color: #282126 !important;
  -webkit-text-fill-color: #282126 !important;
  background: #fffaf3 !important;
}

@media (max-width: 782px) {
  html body:not(.wp-admin) header img.zapcart-wordmark-only,
  html body:not(.wp-admin) footer img.zapcart-wordmark-only,
  html body:not(.wp-admin) .site-header img.custom-logo,
  html body:not(.wp-admin) .site-footer img.custom-logo {
    max-width: 220px !important;
    max-height: 58px !important;
  }

  html body.woocommerce-account form.woocommerce-form-login,
  html body.woocommerce-account form.woocommerce-form-register,
  html body.woocommerce-account form.woocommerce-ResetPassword,
  html body.woocommerce-account form.lost_reset_password {
    padding: 20px !important;
    border-radius: 16px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body:not(.wp-admin) *,
  html body:not(.wp-admin) *::before,
  html body:not(.wp-admin) *::after {
    scroll-behavior: auto !important;
  }
}
