/* sarelli-fixes-20261117: overrides for the captured templates (F-03/F-04 form colours to follow).
   Injected last in <head> by App\Http\Middleware\TemplateFixes. A changed file gets a new name (Cloudflare keeps same-name files). */

/* ---- Enquiry form #wpforms-form-357: contrast on dark and light templates -----------------------------------
   Cause: salient-child/style.css sets `body[data-form-style="minimal"] input, select { color: white !important }`
   on every page (written for the black templates); the inline <style id="dynamic-css-inline-css"> dims the radio
   labels (opacity .65) and the Country select (#676767 !important, opacity .7 !important when unselected).
   Light vs dark is decided by the same body classes that make the theme paint .container-wrap #f5f5f5:
   `.tax-product_cat.woocommerce .container-wrap` (theme dynamic CSS), `body.single-product .container-wrap` and
   `body.single-category_page .container-wrap` (inline page styles, !important). Everything else is black.
   !important is used only where the overridden theme declaration carries !important (noted per rule). */

/* Both templates. !important: theme select colour/opacity and the #f5f5f5 control face are !important. */
#wpforms-form-357 select { opacity: 1 !important; color: #b3b3b3 !important; }
#wpforms-form-357 select:valid { color: #fff !important; }
#wpforms-form-357 :is(input[type="radio"], input[type="checkbox"]) { background: transparent !important; }
#wpforms-form-357 .wpforms-field-radio li label { color: #b3b3b3; opacity: 1; }
#wpforms-form-357 :is(.wpforms-field-radio, .wpforms-field-checkbox) { --wpforms-field-border-color: #777777; }
#wpforms-357-field_10 label a { text-decoration: underline; }

/* Light templates (#f5f5f5): near-black typed text, theme grey #676767 for placeholders and labels,
   rings/boxes and checked marks in the underline grey / near-black (the brand gold is 2.7:1 on #f5f5f5).
   !important: input colour and placeholder (salient-child: white !important, placeholder opacity .7 !important),
   select colour (inline theme CSS, !important), labels (product pages carry an inline <style> with
   `body.single-product .wpforms-form label { color: #7a7a7a !important }` = 3.9:1). */
:is(body.tax-product_cat.woocommerce, body.single-product, body.single-category_page) #wpforms-form-357 :is(input[type="text"], input[type="email"], input[type="tel"]) { color: #111 !important; }
:is(body.tax-product_cat.woocommerce, body.single-product, body.single-category_page) #wpforms-form-357 input::placeholder { color: #676767 !important; opacity: 1 !important; }
:is(body.tax-product_cat.woocommerce, body.single-product, body.single-category_page) #wpforms-form-357 select { color: #676767 !important; }
:is(body.tax-product_cat.woocommerce, body.single-product, body.single-category_page) #wpforms-form-357 select:valid { color: #111 !important; }
:is(body.tax-product_cat.woocommerce, body.single-product, body.single-category_page) #wpforms-form-357 :is(.wpforms-field-radio, .wpforms-field-checkbox) li label { color: #676767 !important; }
:is(body.tax-product_cat.woocommerce, body.single-product, body.single-category_page) #wpforms-form-357 :is(.wpforms-field-radio, .wpforms-field-checkbox) { --wpforms-field-border-color: #5e5e5e; --wpforms-button-background-color: #111; }
:is(body.tax-product_cat.woocommerce, body.single-product, body.single-category_page) #wpforms-357-field_10 label a { color: #111; }

/* ---- Downloads catalogue gate (dark card #111). !important: child theme sets border-color #5e5e5e !important. */
.sarelli-dl-gate .sarelli-dl-field :is(input, select) { border-color: #777777 !important; }
.sarelli-dl-gate .sarelli-dl-field input::placeholder { color: #999999; opacity: 1; }

/* ---- Focus indicators ------------------------------------------------------------------------------------------
   WhatsApp: two-tone ring (black next to the green, white outside) so one of them is >=3:1 on any page.
   !important on box-shadow only because the plugin sets box-shadow in the element's inline style. */
#ht-ctc-chat:focus-visible { outline: none; }
#ht-ctc-chat:focus-visible .ht_ctc_padding { outline: 3px solid #000; outline-offset: 0; box-shadow: 0 0 0 6px #fff, 0 0 11px rgba(0, 0, 0, .5) !important; }
/* Header CONTACT US: white ring outside the gold button. The gold pill is the link's ::before (the <a> box is taller),
   so the ring goes on ::before. English menu only: the it/fr/ar menus have no button_solid_color_2 item. */
#header-outer #top nav > ul > li.button_solid_color_2 > a:focus-visible::before { outline: 2px solid #fff; outline-offset: 3px; }

/* ==== BEGIN form-fields (F-05/F-06/F-07): visible labels, required marks, "About You" legend ====================
   Hook: class `sarelli-field-label`, which App\Support\Fixes\FormFields (fix "labels") puts in place of WPForms'
   `wpforms-label-hide` (1x1 px clip) on the labels of fields 3,4,5,6,7,12 and the legend of field 13. Without the
   fixer these rules match nothing. Label text and the WPForms required mark <span class="wpforms-required-label">*</span>
   are the captured markup; the mark is hidden by an inline page style (display:none) and shown here in the label colour.
   Colours are the ones of the form section above: #b3b3b3 on the black templates, #676767 on #f5f5f5.
   !important only on the light colour: product pages carry `body.single-product .wpforms-form label { color: #7a7a7a !important }`. */
#wpforms-form-357 .sarelli-field-label {
  display: block; float: none; position: static; width: auto; height: auto; margin: 0 0 4px; padding: 0; clip: auto; overflow: visible;
  font-family: inherit; font-size: 12px; line-height: 16px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase;
  color: #b3b3b3; text-align: start;
}
#wpforms-form-357 .sarelli-field-label .wpforms-required-label { display: inline; color: inherit; font-weight: 400; margin-inline-start: 1px; }
:is(body.tax-product_cat.woocommerce, body.single-product, body.single-category_page) #wpforms-form-357 .sarelli-field-label { color: #676767 !important; }
/* "About You": the page style `.wpforms-field-radio { padding-top: 33px !important }` lowered the radios to the inputs'
   line; with the legend above them the field takes the 15px top padding of the other fields (legend level with
   "Phone"), and the legend's larger bottom margin keeps the radio row on the phone input's centre line. */
#wpforms-357-field_13-container:has(> fieldset > legend.sarelli-field-label) { padding-top: 15px !important; }
#wpforms-form-357 legend.sarelli-field-label { width: 100%; margin-bottom: 10px; }
/* Arabic pages (<html dir="rtl">): the form keeps a left-to-right box layout but the inputs' text sits on the right,
   so the labels are set flush right, at the start of the typed text. */
html[dir="rtl"] #wpforms-form-357 .sarelli-field-label { text-align: right; }
/* ==== END form-fields ==== */
