/**
 * Plugin bindings to the QEVORK tokens (qevork.css).
 *
 * WooCommerce and Fluid Checkout palettes are remapped through their own custom
 * properties — declared on body so they win over the plugins' :root defaults by
 * inheritance, independent of stylesheet order. Selector overrides below cover
 * only the values those plugins hardcode.
 */

body {
    --woocommerce: var(--q-accent);
    --wc-primary: var(--q-accent);
    --wc-primary-text: var(--q-accent-ink);
    --wc-secondary: var(--q-accent);
    --wc-secondary-text: var(--q-accent-ink);
    --wc-highlight: var(--q-accent);
    --wc-highligh-text: var(--q-accent-ink);
    --wc-content-bg: var(--q-surface);
    --wc-subtext: var(--q-muted);
    --wc-green: var(--q-ok);
    --wc-red: var(--q-bad);
    --wc-destructive: var(--q-bad);
    --wc-orange: var(--q-warn);
    --wc-blue: var(--q-info);
    --wc-separator-color: var(--q-rule);
    --wc-form-color-background: var(--q-input);
    --wc-form-color-text: var(--q-text);
    --wc-form-border-color: var(--q-rule-strong);
    --wc-form-border-width: 1px;
    --wc-form-border-radius: var(--q-radius-control);
    --wc-card-border-radius: var(--q-radius-surface);
}

/*
 * WooCommerce buttons — woocommerce.css compiles colours, radius and weight to
 * literals (#e9e6ed / #7f54b3 for .alt), so the --wc-* vars never reach them.
 * Each selector mirrors the specificity of its woocommerce.css counterpart and
 * wins by load order (qevork-plugins enqueues after woocommerce-general).
 */
.woocommerce :is(a.button, button.button, input.button),
.woocommerce :is(a.button, button.button, input.button).alt,
.woocommerce-page :is(a.button, button.button, input.button),
.woocommerce-page :is(a.button, button.button, input.button).alt {
    background-color: var(--q-accent);
    color: var(--q-accent-ink);
    border: 1px solid var(--q-accent);
    border-radius: var(--q-radius-control);
    font-weight: 600;
    line-height: 1.2;
    transition: background-color .15s ease, border-color .15s ease;
}

.woocommerce :is(a.button, button.button, input.button):hover,
.woocommerce :is(a.button, button.button, input.button).alt:hover,
.woocommerce-page :is(a.button, button.button, input.button):hover,
.woocommerce-page :is(a.button, button.button, input.button).alt:hover {
    background-color: var(--q-accent-hover);
    border-color: var(--q-accent-hover);
    color: var(--q-accent-ink);
}

.woocommerce :is(a.button, button.button, input.button):is(.disabled, :disabled),
.woocommerce :is(a.button, button.button, input.button):is(.disabled, :disabled):hover,
.woocommerce :is(a.button, button.button, input.button).alt:is(.disabled, :disabled):hover {
    background-color: var(--q-accent);
    border-color: var(--q-accent);
    color: var(--q-accent-ink);
    opacity: .5;
    cursor: not-allowed;
}

.woocommerce :is(a.button, button.button, input.button):focus-visible {
    outline: none;
    box-shadow: var(--q-focus-ring);
}

/* WooCommerce form controls. */
.woocommerce form .form-row :is(.input-text, select, textarea) {
    padding: 10px 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.woocommerce form .form-row :is(.input-text, select, textarea):focus {
    border-color: var(--q-link);
    box-shadow: var(--q-focus-ring);
    outline: none;
}

.woocommerce form .form-row label {
    color: var(--q-text);
}

.woocommerce form .form-row .required {
    color: var(--q-bad);
}

/* Password visibility toggle: WooCommerce paints a fixed #111 SVG that vanishes on dark inputs;
   the same glyphs are re-applied as a mask so the icon follows the colour tokens. */
.woocommerce form .show-password-input,
.woocommerce-page form .show-password-input {
    color: var(--q-muted);
}

.woocommerce form .show-password-input:is(:hover, :focus-visible),
.woocommerce-page form .show-password-input:is(:hover, :focus-visible) {
    color: var(--q-text);
}

.woocommerce form .show-password-input::before,
.woocommerce-page form .show-password-input::before {
    background-image: none;
    background-color: currentColor;
    -webkit-mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M17.3 3.3C16.9 2.9 16.2 2.9 15.7 3.3L13.3 5.7C12.2437 5.3079 11.1267 5.1048 10 5.1C6.2 5.2 2.8 7.2 1 10.5C1.2 10.9 1.5 11.3 1.8 11.7C2.6 12.8 3.6 13.7 4.7 14.4L3 16.1C2.6 16.5 2.5 17.2 3 17.7C3.4 18.1 4.1 18.2 4.6 17.7L17.3 4.9C17.7 4.4 17.7 3.7 17.3 3.3ZM6.7 12.3L5.4 13.6C4.2 12.9 3.1 11.9 2.3 10.7C3.5 9 5.1 7.8 7 7.2C5.7 8.6 5.6 10.8 6.7 12.3ZM10.1 9C9.6 8.5 9.7 7.7 10.2 7.2C10.7 6.8 11.4 6.8 11.9 7.2L10.1 9ZM18.3 9.5C17.8 8.8 17.2 8.1 16.5 7.6L15.5 8.6C16.3 9.2 17 9.9 17.6 10.8C15.9 13.4 13 15 9.9 15H9.1L8.1 16C8.8 15.9 9.4 16 10 16C13.3 16 16.4 14.4 18.3 11.7C18.6 11.3 18.8 10.9 19.1 10.5C18.8 10.2 18.6 9.8 18.3 9.5ZM14 10L10 14C12.2 14 14 12.2 14 10Z"/></svg>') center / contain no-repeat;
    mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M17.3 3.3C16.9 2.9 16.2 2.9 15.7 3.3L13.3 5.7C12.2437 5.3079 11.1267 5.1048 10 5.1C6.2 5.2 2.8 7.2 1 10.5C1.2 10.9 1.5 11.3 1.8 11.7C2.6 12.8 3.6 13.7 4.7 14.4L3 16.1C2.6 16.5 2.5 17.2 3 17.7C3.4 18.1 4.1 18.2 4.6 17.7L17.3 4.9C17.7 4.4 17.7 3.7 17.3 3.3ZM6.7 12.3L5.4 13.6C4.2 12.9 3.1 11.9 2.3 10.7C3.5 9 5.1 7.8 7 7.2C5.7 8.6 5.6 10.8 6.7 12.3ZM10.1 9C9.6 8.5 9.7 7.7 10.2 7.2C10.7 6.8 11.4 6.8 11.9 7.2L10.1 9ZM18.3 9.5C17.8 8.8 17.2 8.1 16.5 7.6L15.5 8.6C16.3 9.2 17 9.9 17.6 10.8C15.9 13.4 13 15 9.9 15H9.1L8.1 16C8.8 15.9 9.4 16 10 16C13.3 16 16.4 14.4 18.3 11.7C18.6 11.3 18.8 10.9 19.1 10.5C18.8 10.2 18.6 9.8 18.3 9.5ZM14 10L10 14C12.2 14 14 12.2 14 10Z"/></svg>') center / contain no-repeat;
}

.woocommerce form .show-password-input.display-password::before,
.woocommerce-page form .show-password-input.display-password::before {
    background-image: none;
    -webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M18.3 9.49999C15 4.89999 8.50002 3.79999 3.90002 7.19999C2.70002 8.09999 1.70002 9.29999 0.900024 10.6C1.10002 11 1.40002 11.4 1.70002 11.8C5.00002 16.4 11.3 17.4 15.9 14.2C16.8 13.5 17.6 12.8 18.3 11.8C18.6 11.4 18.8 11 19.1 10.6C18.8 10.2 18.6 9.79999 18.3 9.49999ZM10.1 7.19999C10.6 6.69999 11.4 6.69999 11.9 7.19999C12.4 7.69999 12.4 8.49999 11.9 8.99999C11.4 9.49999 10.6 9.49999 10.1 8.99999C9.60003 8.49999 9.60003 7.69999 10.1 7.19999ZM10 14.9C6.90002 14.9 4.00002 13.3 2.30002 10.7C3.50002 8.99999 5.10002 7.79999 7.00002 7.19999C6.30002 7.99999 6.00002 8.89999 6.00002 9.89999C6.00002 12.1 7.70002 14 10 14C12.2 14 14.1 12.3 14.1 9.99999V9.89999C14.1 8.89999 13.7 7.89999 13 7.19999C14.9 7.79999 16.5 8.99999 17.7 10.7C16 13.3 13.1 14.9 10 14.9Z"/></svg>');
    mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M18.3 9.49999C15 4.89999 8.50002 3.79999 3.90002 7.19999C2.70002 8.09999 1.70002 9.29999 0.900024 10.6C1.10002 11 1.40002 11.4 1.70002 11.8C5.00002 16.4 11.3 17.4 15.9 14.2C16.8 13.5 17.6 12.8 18.3 11.8C18.6 11.4 18.8 11 19.1 10.6C18.8 10.2 18.6 9.79999 18.3 9.49999ZM10.1 7.19999C10.6 6.69999 11.4 6.69999 11.9 7.19999C12.4 7.69999 12.4 8.49999 11.9 8.99999C11.4 9.49999 10.6 9.49999 10.1 8.99999C9.60003 8.49999 9.60003 7.69999 10.1 7.19999ZM10 14.9C6.90002 14.9 4.00002 13.3 2.30002 10.7C3.50002 8.99999 5.10002 7.79999 7.00002 7.19999C6.30002 7.99999 6.00002 8.89999 6.00002 9.89999C6.00002 12.1 7.70002 14 10 14C12.2 14 14.1 12.3 14.1 9.99999V9.89999C14.1 8.89999 13.7 7.89999 13 7.19999C14.9 7.79999 16.5 8.99999 17.7 10.7C16 13.3 13.1 14.9 10 14.9Z"/></svg>');
}

.woocommerce :is(form.login, form.register, form.checkout_coupon, form.lost_reset_password) {
    background: var(--q-surface);
    border-color: var(--q-rule);
    border-radius: var(--q-radius-surface);
}

/* Notices. */
.woocommerce :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) {
    background: var(--q-surface);
    color: var(--q-text);
    border-radius: var(--q-radius-surface);
}

/* TranslatePress renders item names in its own system-font stack. */
.trp-language-switcher .trp-language-item-name {
    font-family: inherit;
}
