/* Appearance tokens are also available to the lightweight launch screen. */
:root {
  --osevaro-page: #ffffff;
  --osevaro-surface: #ffffff;
  --osevaro-surface-raised: #f4f7f1;
  --osevaro-text: #203c38;
  --osevaro-muted: #617267;
  --osevaro-border: #e1e8de;
  --osevaro-link: #42674f;
  --osevaro-focus: #527b70;
  --osevaro-pastel-ink: #203c38;
  --osevaro-button: #e6efe1;
  --osevaro-button-hover: #d6e5d0;
  --osevaro-button-ink: #294d41;
  --osevaro-radius: 12px;
}
html[data-osevaro-theme="dark"] {
  --osevaro-page: #14211d;
  --osevaro-surface: #1b2b24;
  --osevaro-surface-raised: #253b30;
  --osevaro-text: #eef2e8;
  --osevaro-muted: #b4c3b4;
  --osevaro-border: #3a4e40;
  --osevaro-link: #c0dfb8;
  --osevaro-focus: #b2d6a5;
}
.osevaro-theme-toggle[hidden] { display: none !important; }
.osevaro-theme-toggle .osevaro-theme-sun { display: none; }
html[data-osevaro-theme="dark"] .osevaro-theme-toggle .osevaro-theme-moon { display: none; }
html[data-osevaro-theme="dark"] .osevaro-theme-toggle .osevaro-theme-sun { display: block; }

/* Use artwork on a few soft cards only; geometry and controls stay untouched. */
.osevaro-app-hero { position: relative; isolation: isolate; }
.osevaro-app-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url('/brand/osevaro-watercolour-v3.png');
  background-size: cover;
  background-position: 70% 45%;
  opacity: .24;
}
:is(.category-food,.category-beds,.category-toys) .osevaro-category-art {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--osevaro-pastel-ink);
}
:is(.category-food,.category-beds,.category-toys) .osevaro-category-art::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url('/brand/osevaro-watercolour-v3.png');
  background-repeat: no-repeat;
  background-size: 190% 230%;
  background-position: 0% 20%;
  opacity: .32;
}
.category-beds .osevaro-category-art::before { background-position: 70% 70%; background-size: 220% 175%; opacity: .27; }
.category-toys .osevaro-category-art::before { background-position: 100% 5%; background-size: 150% 200%; opacity: .3; }

/* Native store/form buttons only. Wallet-provider controls and icon buttons are excluded. */
:is(
  .woocommerce-form button[type="submit"],
  .woocommerce-EditAccountForm button[type="submit"],
  .woocommerce-address-fields button[type="submit"],
  .lost_reset_password button[type="submit"],
  .woocommerce-MyAccount-content a.button,
  .woocommerce-MyAccount-content button.button,
  .woocommerce .return-to-shop a,
  .woocommerce .checkout-button,
  .woocommerce button[name="apply_coupon"],
  .woocommerce button[name="update_cart"],
  .woocommerce button[name="add-to-cart"],
  .woocommerce button[name="woocommerce_checkout_place_order"],
  .woocommerce a.add_to_cart_button,
  .woocommerce a.product_type_variable,
  .woocommerce a.product_type_external,
  .wc-block-components-checkout-place-order-button,
  .wc-block-cart__submit-button,
  .osevaro-wishlist .button,
  .osevaro-wishlist-toggle,
  .osevaro-empty .button,
  .osevaro-install-app,
  .osevaro-withdrawal button,
  [data-osevaro-install],
  #osevaro-install-help button,
  div.wpforms-container .wpforms-form button.wpforms-submit
) {
  border-radius: var(--osevaro-radius) !important;
  background: var(--osevaro-button) !important;
  color: var(--osevaro-button-ink) !important;
  border-color: #cfddc7 !important;
  min-height: 44px;
  box-shadow: none;
  line-height: 1.4;
}
:is(.woocommerce-form button[type="submit"],.woocommerce-MyAccount-content .button,.woocommerce .return-to-shop a,.woocommerce .checkout-button,.osevaro-wishlist .button,.osevaro-empty .button,.osevaro-install-app,div.wpforms-container .wpforms-form button.wpforms-submit):hover {
  background: var(--osevaro-button-hover) !important;
}
:is(.osevaro-icon-button,.osevaro-app-search button) { border-radius: 12px !important; }
#footer.ct-footer .osevaro-install-app { border-radius: 12px !important; }
:is(button,a,input,textarea,select):focus-visible { outline-color: var(--osevaro-focus); }

/* Background, chrome and typography change; the pastel shopping cards remain light. */
html[data-osevaro-theme="dark"] body {
  background: var(--osevaro-page) !important;
  color: var(--osevaro-text);
  --theme-palette-color-1: #c0dfb8;
  --theme-palette-color-2: #deedcf;
  --theme-palette-color-3: #b4c3b4;
  --theme-palette-color-4: #eef2e8;
  --theme-palette-color-5: #3a4e40;
  --theme-palette-color-6: #253b30;
  --theme-palette-color-7: #1b2b24;
  --theme-palette-color-8: #14211d;
  --theme-text-color: #eef2e8;
  --theme-heading-color: #eef2e8;
  --theme-link-initial-color: #c0dfb8;
  --theme-link-hover-color: #deedcf;
  --theme-border-color: #3a4e40;
  --theme-form-text-initial-color: #eef2e8;
  --theme-form-text-focus-color: #eef2e8;
  --theme-form-field-background-initial-color: #1b2b24;
  --theme-form-field-background-focus-color: #253b30;
  --theme-form-field-border-initial-color: #3a4e40;
}
html[data-osevaro-theme="dark"] :is(.osevaro-app-header,.osevaro-mobile-nav,.osevaro-app-dialog,#osevaro-install-help) {
  background: var(--osevaro-surface) !important;
  border-color: var(--osevaro-border) !important;
  color: var(--osevaro-text);
}
html[data-osevaro-theme="dark"] :is(.osevaro-app-brand,.osevaro-icon-button,.osevaro-app-section-title h2,.page-title,.osevaro-dialog-heading h2,#osevaro-install-help h2,.osevaro-copy,.osevaro-lead,.osevaro-account-overview>h2) {
  color: var(--osevaro-text) !important;
}
html[data-osevaro-theme="dark"] :is(.osevaro-desktop-primary a,.osevaro-desktop-action,.osevaro-mobile-nav a,.osevaro-category-tile) { color: var(--osevaro-muted) !important; }
html[data-osevaro-theme="dark"] :is(.osevaro-desktop-primary a:hover,.osevaro-desktop-primary a[aria-current="page"],.osevaro-app-header .osevaro-icon-button:hover) {
  color: var(--osevaro-text) !important;
  background: var(--osevaro-surface-raised) !important;
}
html[data-osevaro-theme="dark"] .osevaro-mobile-nav a[aria-current="page"] { color: var(--osevaro-text) !important; }
html[data-osevaro-theme="dark"] .osevaro-mobile-nav a[aria-current="page"] .osevaro-nav-icon { background: #dfead6; color: #294d41; }
html[data-osevaro-theme="dark"] :is(.osevaro-app-section-title>a,.osevaro-app-text-link,.osevaro-account-back,.osevaro-app-signout,.osevaro-app-help-links a,.osevaro-app-help-language a,.osevaro-app-legal a) { color: var(--osevaro-link) !important; border-color: var(--osevaro-border); }
html[data-osevaro-theme="dark"] :is(.osevaro-wishlist-intro,.osevaro-wishlist-status,#osevaro-install-help p,.osevaro-install-note,.woocommerce-result-count) { color: var(--osevaro-muted) !important; }

/* Preserve the warmth and readable dark ink of existing soft cards. */
html[data-osevaro-theme="dark"] :is(.osevaro-app-hero,.osevaro-category-art,.osevaro-app-empty,.osevaro-empty,.osevaro-wishlist-empty,.osevaro-account-card,.osevaro-wishlist-card) {
  color-scheme: light;
  color: var(--osevaro-pastel-ink) !important;
}
html[data-osevaro-theme="dark"] :is(.osevaro-app-hero,.osevaro-app-empty,.osevaro-empty,.osevaro-wishlist-empty,.osevaro-account-card,.osevaro-wishlist-card) :is(h1,h2,h3,p,strong,small,a) { color: var(--osevaro-pastel-ink) !important; }
html[data-osevaro-theme="dark"] .osevaro-app-hero .osevaro-app-eyebrow { color: #46634f !important; }
html[data-osevaro-theme="dark"] .osevaro-category-art svg { color: #203c38; }
html[data-osevaro-theme="dark"] .osevaro-account-card { background: #f1f3ed; border-color: #dde5d6; }
html[data-osevaro-theme="dark"] .osevaro-empty { background: #f6f7f3; }
html[data-osevaro-theme="dark"] .osevaro-wishlist-card { background: #f8f8f1; }

/* Customer forms keep native fields, validation, ownership checks and nonces. */
html[data-osevaro-theme="dark"] :is(.woocommerce-form,.woocommerce-EditAccountForm,.woocommerce-address-fields,.lost_reset_password,.woocommerce-Address,.woocommerce-account fieldset,.osevaro-wishlist-unavailable) {
  background: var(--osevaro-surface) !important;
  color: var(--osevaro-text);
  border-color: var(--osevaro-border) !important;
}
html[data-osevaro-theme="dark"] :is(.woocommerce-account,.woocommerce-checkout,.woocommerce-cart) :is(label,legend,address,.woocommerce-privacy-policy-text,.description) { color: var(--osevaro-text) !important; }
html[data-osevaro-theme="dark"] :is(.woocommerce-account,.woocommerce-checkout,.woocommerce-cart,.page-id-712) :is(input[type="text"],input[type="email"],input[type="password"],input[type="tel"],input[type="number"],textarea,select),
html[data-osevaro-theme="dark"] :is(.osevaro-app-search,.osevaro-shop-search input,.select2-dropdown,.select2-selection--single) {
  background: var(--osevaro-surface) !important;
  border-color: var(--osevaro-border) !important;
  color: var(--osevaro-text) !important;
}
html[data-osevaro-theme="dark"] .select2-search__field,
html[data-osevaro-theme="dark"] .woocommerce-checkout #payment {
  background: var(--osevaro-surface) !important;
  border-color: var(--osevaro-border) !important;
  color: var(--osevaro-text) !important;
}
html[data-osevaro-theme="dark"] .woocommerce-checkout #payment .payment_box { background: var(--osevaro-surface-raised) !important; color: var(--osevaro-text) !important; }
html[data-osevaro-theme="dark"] div.wpforms-confirmation-container-full { background: #e6efe1 !important; color: #294d41 !important; border-color: #cfddc7 !important; }
html[data-osevaro-theme="dark"] :is(.osevaro-app-search input,.osevaro-app-search button,.osevaro-app-search>svg,.wpforms-field-label,.wpforms-field-description,.select2-selection__rendered,.woocommerce-form .show-password-input) { color: var(--osevaro-text) !important; }
html[data-osevaro-theme="dark"] input::placeholder,
html[data-osevaro-theme="dark"] textarea::placeholder { color: var(--osevaro-muted) !important; opacity: 1; }
html[data-osevaro-theme="dark"] :is(.woocommerce-info,.woocommerce-message,.woocommerce-error,.wc-block-components-notice-banner) { background: var(--osevaro-surface-raised) !important; color: var(--osevaro-text) !important; border-color: var(--osevaro-border) !important; }
html[data-osevaro-theme="dark"] .wpforms-error { color: #ffd0c4 !important; }
html[data-osevaro-theme="dark"] :is(.select2-results__option--highlighted,.select2-results__option[aria-selected="true"]) { background: var(--osevaro-surface-raised) !important; color: var(--osevaro-text) !important; }

@media (min-width: 1000px) {
  html[data-osevaro-theme="dark"] #footer.ct-footer,
  html[data-osevaro-theme="dark"] #footer.ct-footer [data-row] { background: var(--osevaro-surface) !important; background-image: none !important; border-color: var(--osevaro-border) !important; }
  html[data-osevaro-theme="dark"] #footer.ct-footer :is(h3,p,.ct-footer-copyright),
  html[data-osevaro-theme="dark"] #footer.ct-footer a:not(.button):not(.wp-element-button),
  html[data-osevaro-theme="dark"] #footer.ct-footer a:visited { color: var(--osevaro-text) !important; }
  html[data-osevaro-theme="dark"] #footer.ct-footer [data-row="bottom"]>div { border-color: var(--osevaro-border) !important; }
  html[data-osevaro-theme="dark"] #footer .osevaro-footer-logo { background: #f7f3e9; border-radius: 12px; padding: 7px; }
  html[data-osevaro-theme="dark"] #footer.ct-footer .osevaro-install-app { color: #294d41 !important; background: #e6efe1 !important; }
}
@media (max-width: 999px) {
  .woocommerce-account #customer_login { max-width: 480px; margin-inline: auto; }
  .woocommerce-account #customer_login > div { margin-bottom: 22px; }
  .woocommerce-account #customer_login h2 { font-size: 20px; line-height: 1.25; margin-bottom: 12px; }
  .woocommerce-account #customer_login form { padding: 16px; border-radius: 16px; }
  .woocommerce-account #customer_login .form-row { margin-bottom: 12px; }
  .woocommerce-account #customer_login .woocommerce-form-login__submit,
  .woocommerce-account #customer_login .woocommerce-form-register__submit { float: none; display: block; width: 100%; margin: 10px 0 0; }
  .woocommerce-account #customer_login .woocommerce-form-login__rememberme { display: inline-flex; align-items: center; min-height: 44px; }
  .woocommerce-account #customer_login .woocommerce-privacy-policy-text { font-size: 12px; line-height: 1.5; }
}

html[data-osevaro-theme="dark"] #main>.hero-section[data-type="type-2"]{background:var(--osevaro-page)!important;background-image:none!important}
html[data-osevaro-theme="dark"] #main>.hero-section[data-type="type-2"] :is(.page-title,.ct-breadcrumbs,.ct-breadcrumbs a){color:var(--osevaro-text)!important}

#osevaro-install-strip [data-osevaro-install]{border-radius:var(--osevaro-radius)!important}
#osevaro-install-help button:focus-visible,#osevaro-install-strip button:focus-visible{outline-color:var(--osevaro-focus)!important}

.woocommerce-account .lost_password a{color:var(--osevaro-link)!important}

html[data-osevaro-theme="dark"] .osevaro-app-search button{background:transparent!important}

.osevaro-withdrawal-entry a{color:var(--osevaro-link)!important}
html[data-osevaro-theme="dark"] .osevaro-withdrawal :is(input,textarea){background:var(--osevaro-surface)!important;color:var(--osevaro-text)!important;border-color:var(--osevaro-border)!important}
html[data-osevaro-theme="dark"] .osevaro-withdrawal small{color:var(--osevaro-muted)}
.osevaro-withdrawal-notice{color:var(--osevaro-pastel-ink)!important}
