/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* ==========================================================
   FIX: Colors attribute must render as color dots, not text
   buttons. Scoped to the Colors attribute only — Sizes stay
   buttons. Works whether the plugin renders button or color
   swatches, so it survives admin/term re-syncs.
   ========================================================== */
[data-attribute_name="attribute_colors"] .variable-item.button-variable-item,
[data-attribute_name="attribute_seam-colors"] .variable-item.button-variable-item {
	width: 36px !important;
	height: 36px !important;
	min-width: 0 !important;
	padding: 0 !important;
	margin: 0 8px 8px 0 !important;
	border-radius: 50% !important;
	overflow: hidden;
	text-indent: -9999px;
	white-space: nowrap;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .18);
	box-sizing: border-box;
}

[data-attribute_name="attribute_colors"] .variable-item.button-variable-item .variable-item-contents,
[data-attribute_name="attribute_seam-colors"] .variable-item.button-variable-item .variable-item-contents {
	width: 100%;
	height: 100%;
	line-height: 0;
}

[data-attribute_name="attribute_colors"] .variable-item.button-variable-item .variable-item-span-button,
[data-attribute_name="attribute_seam-colors"] .variable-item.button-variable-item .variable-item-span-button {
	display: none;
}

/* !important beats the plugin's base rule
   (.woo-variation-swatches .variable-items-wrapper .variable-item
   sets background-color:#fff at much higher specificity) */
[data-attribute_name="attribute_colors"] .button-variable-item-white        { background-color: #ffffff !important; }
[data-attribute_name="attribute_colors"] .button-variable-item-black        { background-color: #1c1c1c !important; }
[data-attribute_name="attribute_colors"] .button-variable-item-sport-grey   { background-color: #b6bab6 !important; }
[data-attribute_name="attribute_colors"] .button-variable-item-dark-heather{ background-color: #4a4a4a !important; }
[data-attribute_name="attribute_colors"] .button-variable-item-navy         { background-color: #000080 !important; }

/* Additional graphic-tee colorways mapped as dots */
[data-attribute_name="attribute_colors"] .button-variable-item-antique-irish-green { background-color: #1e7b3c !important; }
[data-attribute_name="attribute_colors"] .button-variable-item-royal               { background-color: #4169e1 !important; }
[data-attribute_name="attribute_colors"] .button-variable-item-heather-sapphire    { background-color: #7b9bc0 !important; }
[data-attribute_name="attribute_colors"] .button-variable-item-yellow-haze         { background-color: #d9b94c !important; }
[data-attribute_name="attribute_colors"] .button-variable-item-cardinal-red        { background-color: #c41e3a !important; }

/* ==========================================================
   FIX: Printed tees use the Seam Colors attribute. Render the
   actual seam color as a dot instead of the text label
   ("Black stitching" / "White stitching").
   ========================================================== */
[data-attribute_name="attribute_seam-colors"] .button-variable-item-black-stitching { background-color: #1c1c1c !important; }
[data-attribute_name="attribute_seam-colors"] .button-variable-item-white-stitching { background-color: #ffffff !important; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35) !important; }

/* Selected state: double ring visible on both light and dark swatches */
[data-attribute_name="attribute_colors"] .variable-item.button-variable-item.selected,
[data-attribute_name="attribute_seam-colors"] .variable-item.button-variable-item.selected {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #111 !important;
}

[data-attribute_name="attribute_colors"] .variable-item.button-variable-item:focus-visible,
[data-attribute_name="attribute_seam-colors"] .variable-item.button-variable-item:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}

/* ==========================================================
   FIX: White-on-white visibility issues.
   Theme accent color used: #E8363C.
   ========================================================== */
:root {
	--theme-link-initial-color: #e8363c;
	--theme-link-hover-color: #b32229;
	--theme-button-text-initial-color: #ffffff;
	--theme-button-background-initial-color: #e8363c;
	--theme-button-background-hover-color: #b32229;
	--theme-form-text-initial-color: #1c1c1c;
	--theme-form-field-background-initial-color: #ffffff;
	--theme-form-field-border-initial-color: #c8c8c8;
}

/* Form inputs & selects — dark text on white, visible border */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="date"],
textarea,
select,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.wc-block-components-text-input input,
.wc-block-components-select select {
	color: #1c1c1c !important;
	background-color: #ffffff !important;
	border: 1px solid #c8c8c8 !important;
}

/* Inputs placeholders stay readable */
input::placeholder,
textarea::placeholder {
	color: #6b6b6b !important;
	opacity: 1;
}

/* Buttons — theme red bg, white text */
.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.wc-block-components-button,
.wp-element-button,
.wp-block-button__link,
.ct-button {
	background-color: #e8363c !important;
	color: #ffffff !important;
	border-color: #e8363c !important;
}

.woocommerce button.button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.wc-block-components-button:hover,
.wp-element-button:hover,
.wp-block-button__link:hover,
.ct-button:hover {
	background-color: #b32229 !important;
	color: #ffffff !important;
	border-color: #b32229 !important;
}

/* WooCommerce notices / alerts strip — dark text on light bg */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error,
.wc-block-components-notice-banner,
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	color: #1c1c1c !important;
	background-color: #f6f7f7 !important;
	border: 1px solid #e0e0e0 !important;
	border-top-color: #e8363c !important;
}

.woocommerce-notices-wrapper .woocommerce-message a,
.woocommerce-notices-wrapper .woocommerce-info a,
.woocommerce-notices-wrapper .woocommerce-error a,
.wc-block-components-notice-banner a,
.woocommerce-message a,
.woocommerce-info a,
.woocommerce-error a {
	color: #e8363c !important;
}

/* Login / my-account forms — visible labels & fields */
.woocommerce form.login label,
.woocommerce form.register label,
.woocommerce form.lost_reset_password label,
.woocommerce-account .woocommerce label {
	color: #1c1c1c;
}

/* Checkout totals & summary text stays dark */
.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-shipping-fields h3,
.woocommerce-checkout #order_review_heading,
.woocommerce-checkout #payment .payment_box {
	color: #1c1c1c;
}

/* Buttons inside WooCommerce blocks (moderncart/checkout block) */
.wc-block-components-totals-coupon .wc-block-components-button,
.wc-block-components-totals-discount .wc-block-components-button,
.wc-block-cart__submit-container .wc-block-components-button {
	background-color: #e8363c !important;
	color: #ffffff !important;
}

/* Launch Offer notice bar injected at the very top of every page */
.filvyn-launch-notice {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px 12px;
	padding: 9px 16px;
	background-color: #e8363c;
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	position: relative;
	z-index: 9999;
}

.filvyn-launch-notice a {
	color: #ffffff;
	text-decoration: underline;
}

.filvyn-launch-notice .filvyn-apply-discount {
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 700;
	border-radius: 4px;
	background-color: #ffffff !important;
	border-color: #ffffff !important;
	color: #e8363c !important;
}

.filvyn-launch-notice .filvyn-apply-discount:hover,
.filvyn-launch-notice .filvyn-apply-discount:focus {
	background-color: #ffe0e2 !important;
	border-color: #ffe0e2 !important;
	color: #b32229 !important;
}

.filvyn-launch-notice .filvyn-remove-discount {
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 700;
	border-radius: 4px;
	background-color: transparent !important;
	border: 1px solid rgba(255, 255, 255, 0.7) !important;
	color: #ffffff !important;
}

.filvyn-launch-notice .filvyn-remove-discount:hover,
.filvyn-launch-notice .filvyn-remove-discount:focus {
	background-color: #ffffff !important;
	border-color: #ffffff !important;
	color: #e8363c !important;
}

.filvyn-launch-notice .filvyn-discount-msg {
	font-size: 13px;
	font-weight: 600;
	color: #ffffff;
}

.filvyn-launch-notice .filvyn-discount-msg.is-error {
	color: #ffd9db;
}

/* Footer social icon circles: white-on-white fix (inline styles need !important) */
.ct-footer #custom_html-2 a[style*="color: #ffffff"],
.ct-footer .widget_custom_html a[style*="color: #ffffff"],
.ct-footer a[aria-label*="("][style*="border-radius: 50%"],
.ct-footer a[aria-label*="X"][style*="background"],
.ct-footer a[aria-label*="Pinterest"][style*="background"],
.ct-footer a[aria-label*="Facebook"][style*="background"],
.ct-footer a[aria-label*="Instagram"][style*="background"],
.ct-footer a[aria-label*="YouTube"][style*="background"] {
	color: #1c1c1c !important;
	background: #f2f3f5 !important;
}

.ct-footer a[aria-label*="X"][style*="background"]:hover,
.ct-footer a[aria-label*="Pinterest"][style*="background"]:hover,
.ct-footer a[aria-label*="Facebook"][style*="background"]:hover,
.ct-footer a[aria-label*="Instagram"][style*="background"]:hover,
.ct-footer a[aria-label*="YouTube"][style*="background"]:hover {
	color: #ffffff !important;
	background: #e8363c !important;
}
