/**
 * Site-wide child theme overrides for Digimoon Cake.
 *
 * Anything expressible in Flatsome Theme Options belongs there, not here —
 * this file is for the handful of things the customizer does not expose.
 */

/* ------------------------------------------------------------------
   Sticky header — ClickUp #86capn2dv

   Height, logo size and the solid white background are set in Theme
   Options (header_height_sticky 64, sticky_logo_padding 12,
   header_bg rgba(255,255,255,1)). Only the shadow is left, because the
   customizer's "Box shadow" toggle is all-or-nothing and Flatsome's own
   stuck-state shadow is offset sideways (1px 1px 10px) and too heavy.

   Flatsome's rule is `.header-wrapper.stuck` (0,2,0) and flatsome.css is
   printed after this file whatever enqueue priority or dependencies we
   declare, so source order cannot be relied on. The `body` prefix wins on
   specificity (0,2,1) deterministically — and without !important, so a
   later, more specific rule can still override it.
   ------------------------------------------------------------------ */

body .header-wrapper.stuck,
body .header.show-on-scroll .header-wrapper {
	box-shadow: 0 1px 3px rgba(10, 10, 10, .08);
}

/* ------------------------------------------------------------------
   Product add-on fields (YITH WAPO) — ClickUp #86cax26bc

   The gift-card select sits directly under WooCommerce's own "Flavours"
   dropdown, so it should read as the same kind of control. The select
   itself already matches once addon_select_width is 100; only the label
   was off — WAPO renders it as body copy (16px/400/#555) while the theme's
   variation labels are 0.81em/700/#222.
   ------------------------------------------------------------------ */

.yith-wapo-addon .wapo-addon-title {
	margin: 0 0 6px;
	font-size: .81em;
	font-weight: 700;
	line-height: 1.3;
	color: #222;
	text-transform: none;
}

/* WAPO ships a required-marker span that stays in the markup even with
   the setting off. */
.yith-wapo-addon .wapo-addon-title .required:empty {
	display: none;
}

/* ------------------------------------------------------------------
   Product-page dropdowns

   Flatsome renders both the variation select and the add-on select as a
   plain white box with a #ddd border and a grey chevron — generic, and it
   reads as disabled next to the gold buttons. Restyled to the shop's own
   language: square, Montserrat, gold accent. Both selects are covered so
   the form stays one system; scoped to the product page so the checkout
   and account forms are untouched.
   ------------------------------------------------------------------ */

.single-product .variations select,
.single-product .yith-wapo-addon select {
	height: 46px;
	padding: 0 42px 0 14px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: .01em;
	color: #0a0a0a;
	background-color: #fff;
	border: 1px solid rgba(10, 10, 10, .18);
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
	transition: border-color .18s ease, box-shadow .18s ease;

	/* Gold chevron replacing Flatsome's grey one. */
	background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='none' stroke='%23b29d51' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 12px auto;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

.single-product .variations select:hover,
.single-product .yith-wapo-addon select:hover {
	border-color: var(--fs-color-secondary, #b29d51);
}

.single-product .variations select:focus,
.single-product .yith-wapo-addon select:focus {
	outline: none;
	border-color: var(--fs-color-secondary, #b29d51);
	box-shadow: 0 0 0 3px rgba(178, 157, 81, .18);
}

/* ------------------------------------------------------------------
   Checkout — ClickUp #86cax30er

   Flatsome deliberately hides the second address line's label and leaves
   the field to its placeholder alone. That worked when the placeholder
   said "Unit Number (NA If Not Required)"; now that the field is optional
   and properly labelled, the label has to show. flatsome-shop.css loads
   after this file, hence the body prefix.
   ------------------------------------------------------------------ */

body #billing_address_2_field > label,
body #shipping_address_2_field > label {
	display: block;
	opacity: 1;
	width: auto;
	overflow: visible;
	white-space: normal;
}

/* One convention, not two. Eight of the ten visible fields are required,
   so marking the two optional ones is less noise than asterisking the
   rest — with a note at the top of the form carrying the rule.

   WooCommerce core renders the marker as an <abbr class="required">, the
   field editor as a <span class="required"> — both appear on this form,
   so cover both rather than assuming one. */
.woocommerce-checkout .form-row label abbr.required,
.woocommerce-checkout .form-row label span.required {
	display: none;
}

.dmc-form-note {
	margin: 0 0 18px;
	font-size: 12.5px;
	line-height: 1.45;
	color: rgba(10, 10, 10, .6);
}

/* Company name only appears for the customers who need it. */
.dmc-corporate-toggle {
	margin-bottom: 14px;
}

.dmc-corporate-toggle label {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0;
	font-size: 14px;
	font-weight: 400;
	color: #0a0a0a;
	cursor: pointer;
}

.dmc-corporate-toggle input[type="checkbox"] {
	width: 17px;
	height: 17px;
	margin: 0;
	accent-color: var(--fs-color-secondary, #b29d51);
	cursor: pointer;
}

.dmc-corporate-hidden {
	display: none;
}

/* ------------------------------------------------------------------
   Floating chat button vs. the off-canvas panels

   Click-to-Chat pins a WhatsApp pill to the bottom-right at z-index
   99999999, which lands on the "Checkout" button inside Flatsome's
   mini-cart drawer. The plugin already excludes itself from the cart and
   checkout pages, so the drawer opened from anywhere else is the only
   place this bites. Flatsome flags an open panel on <html>, so hide the
   pill for as long as one is open rather than nudging it around.
   ------------------------------------------------------------------ */

html.has-off-canvas .ht-ctc.ht-ctc-chat {
	display: none !important;
}

/* The "Add Another Box" label sits left inside the mini-cart's full-width
   button. The rule belongs with the rest of that component's styles in
   inc/free-delivery-bar.php, but those are printed by PHP and this host's
   OPcache kept serving the pre-edit version for well over the cache purge —
   a static stylesheet sidesteps that entirely. */
.dmc-delivery__cta {
	text-align: center;
}
