/* timcanfixit — WooCommerce colour fixes only (Shop, product, cart, checkout,
   my account). Loaded only on those views (inc/enqueue.php).

   Deliberately does NOT touch layout, spacing, or shape — an earlier version
   of this file rebuilt the product grid/cards/buttons from scratch and it
   fought WooCommerce's own default CSS (WooCommerce sets an explicit percent
   `width` on `li.product` for its `columns-3` layout; overriding the parent
   to `display:grid` on top of that computed a width against an already-
   narrowed grid cell, producing badly squeezed cards) — reverted all of
   that. WooCommerce's own default markup/CSS already lays these pages out
   fine; this file only corrects colours that read wrong against this
   theme's dark-mode tokens. */

/* sale badge — brand orange, not WooCommerce's default green (which,
   combined with this theme's dark-mode text-colour rules elsewhere, was
   rendering as a green badge with grey text). !important: a cross-origin
   WooCommerce Blocks stylesheet (wc-blocks.css, wp.com CDN — its exact
   rules can't even be read from JS to confirm) restates `.onsale` and wins
   regardless of load order otherwise. */
.onsale{background:var(--badge-bg,#B23E14)!important;color:#fff!important} /* white on --solder orange was 2.6-3.6:1 */

/* buttons — brand orange instead of WooCommerce Blocks' own purple default,
   same !important reasoning as above. Colour only, no shape/size changes. */
.woocommerce .button,.woocommerce a.button,.woocommerce button.button,.woocommerce input.button,
.woocommerce #respond input#submit{background:var(--badge-bg,#B23E14)!important;color:#fff!important}
.woocommerce .button.alt{background:var(--navy-2)!important}
.woocommerce a.added_to_cart{color:var(--solder-text)!important}

/* price — !important for the same cross-origin wc-blocks.css reason as
   .onsale/.button above (confirmed: without it this still computed to
   WooCommerce's own default olive/mustard, not the theme's token). */
.woocommerce .price{color:var(--solder-text)!important}
.woocommerce .price del{color:var(--ink-soft)!important;opacity:.7}

/* form fields — cart quantity, checkout, YITH product add-ons ("Requested
   Games" / "Visual Upgrades" / "Storage Upgrades"), my account. These were
   rendering with whatever near-black-on-near-black colours the active
   Foundation/Bootstrap framework hardcodes on non-themed pages — same class
   of fix already applied to other plugin pages in v1.5.0. */
.woocommerce-page input[type=text],.woocommerce-page input[type=email],.woocommerce-page input[type=tel],.woocommerce-page input[type=password],.woocommerce-page input[type=number],
.woocommerce-page textarea,.woocommerce-page select,
.yith-wapo-addon input[type=text],.yith-wapo-addon textarea,.yith-wapo-addon select{
	background:var(--paper-raised);color:var(--ink);border-color:var(--line);accent-color:var(--solder)
}
.woocommerce-page input[type=checkbox],.woocommerce-page input[type=radio],.yith-wapo-addon input[type=checkbox],.yith-wapo-addon input[type=radio]{accent-color:var(--solder)}
.woocommerce-page label{color:var(--ink)}
.select2-container .select2-selection--single{background:var(--paper-raised)!important;border-color:var(--line)!important}
.select2-container .select2-selection__rendered{color:var(--ink)!important}
.select2-dropdown{background:var(--paper-raised);border-color:var(--line);color:var(--ink)}
.select2-results__option--highlighted{background:var(--solder)!important;color:#fff!important}

/* star rating */
.star-rating::before{color:var(--line)}
.star-rating span::before{color:var(--solder)}

/* Site Reviews plugin's star widget (replaces WooCommerce's native
   .star-rating everywhere on this site, including the Shop/category loop)
   renders ONLY the star icons -- the numeric average is present as a
   data-rating attribute and read out via aria-label for screen readers, but
   there's nothing sighted visitors can actually see next to the stars.
   Printed via a ::before pseudo-element reading that same attribute so it
   stays correct automatically for every product without templating -- the
   widget is already `display:flex`, so this becomes the first item in the
   row, inline with the stars. The literal "Rating: " label is per explicit
   request (a bare number alone wasn't enough). Hidden when there are zero
   reviews yet (`data-reviews="0"`), where "Rating: 0" next to five empty
   stars would read as a bad rating rather than "not yet rated". */
.glsr-star-rating[data-reviews]:not([data-reviews="0"])::before{
	content:"Rating: " attr(data-rating);
	font-family:var(--font-mono);
	font-weight:700;
	font-size:.85em;
	color:var(--ink);
	margin-right:.4em;
}

/* YITH Product Add-Ons — each .yith-wapo-addon block carries its own inline
   `style="background-color:#ffffff"` (a per-addon colour set in YITH's own
   admin UI, not something this theme controls), which otherwise leaves the
   theme's light-on-dark text sitting on a white box — !important to beat
   the inline style. */
.yith-wapo-block{background:var(--paper-tint)}
.yith-wapo-addon{background:var(--paper-tint)!important}
.yith-wapo-block-title,.wapo-addon-title{color:var(--ink)}
.wapo-addon-description{color:var(--ink-soft)}

/* YITH Product Add-Ons — the "Product price / Total options / Order total"
   breakdown table YITH injects below the add-on fields renders on a plain
   white box by default (its own front.css, not inline this time), reading
   as a stray white card against the rest of the dark page. */
#wapo-total-price-table{background:var(--paper-tint)!important}
#wapo-total-price-table th,#wapo-total-price-table td{color:var(--ink)}

/* Checkout block's floating field labels ("Email address", "First name",
   "Address", "City", "ZIP Code", etc.) are absolutely positioned ON TOP OF
   their own white input box (a floating-label pattern: the label sits
   inside the field until typing begins, then animates up out of it) — so
   even though the label itself has a transparent background, it visually
   overlaps a white box the whole time it's showing as a placeholder-style
   hint, and this theme's light ink text was invisible against that white,
   same pattern as everywhere else in this file. Affects every text field
   on checkout, not just email. */
.wc-block-components-text-input label{color:var(--navy)!important}
/* Country/Region and State use a DIFFERENT component (.wc-blocks-components-select
   -- plural "blocks", not the .wc-block-components-text-input above) with its
   own floating label, same overlapping-white-box issue. */
.wc-blocks-components-select__label{color:var(--navy)!important}

/* Checkout block's Ship/Pickup delivery toggle — the "selected" option gets
   a plain white background from WooCommerce Blocks' own CSS regardless of
   site colour mode, but doesn't set its own text colour, so it inherited
   this theme's light ink (meant for a dark background) straight from
   <body> — near-invisible icon+label on the selected (white) option.
   !important: same cross-origin-CDN reason as .onsale/.button/.price above
   — WooCommerce Blocks' own checkout.css (c0.wp.com, unreadable from here)
   restates this and otherwise wins regardless of specificity/load order. */
.wc-block-checkout__shipping-method-option--selected{color:var(--navy)!important}

/* notices */
.woocommerce-message,.woocommerce-error,.woocommerce-info{background:var(--paper-raised);color:var(--ink);border-color:var(--line)}

/* Cart's "Proceed to Checkout" and Checkout's "Place order"/"Pay with X"
   buttons are WooCommerce Blocks' generic `.wc-block-components-button`,
   which inherits its background from the block-editor global-styles rule
   `:root :where(.wp-element-button, .wp-block-button__link)` — a flat grey
   (rgb(50,55,60)) meant to look neutral on a light theme, but on this dark
   theme it reads as a disabled/greyed-out button. !important: that
   global-styles rule is inline in <head> with a `:where()` (zero-specificity)
   wrapper around high-priority selectors, so a plain override loses to load
   order without it. Adds a hover state too — the button had none, so nothing
   signalled it was clickable. */
.wc-block-components-button.contained{background:var(--solder)!important;color:#fff!important}
.wc-block-components-button.contained:hover,.wc-block-components-button.contained:focus{background:var(--solder-2)!important}

/* PayPal "Pay in 4" / Pay Later messaging renders inside a cross-origin
   iframe served directly by PayPal (#wc-ppcp-paylater-msg-product) — no
   CSS from this site can reach text inside it. Its colour scheme (currently
   defaulting to dark text, illegible on this theme's dark background) is a
   WooCommerce PayPal Payments plugin setting: WooCommerce → Settings →
   Payments → PayPal → Pay Later Messaging → set the message colour/style to
   "White" or "Monochrome" there, not fixable from theme code. */

/* Checkout's card-entry fields ("Card number" / "Expiration date" /
   "Security code") are Stripe Elements — genuine cross-origin iframes
   (js.stripe.com) rendered directly by Stripe for PCI compliance, same
   fundamental limitation as the PayPal message above; no theme CSS reaches
   inside them at all. Their light placeholder text is a Stripe-side
   default. If the WooCommerce Stripe Gateway plugin's own settings expose
   an appearance/style option, that's the only place this can be changed. */
