/**
 * Future Notifier — optional theme polish.
 *
 * Loaded only when the matching options are enabled, and every block is scoped
 * to a body class so a shop can switch any of them off without touching CSS.
 *
 * The !important flags are deliberate: these rules exist to override a theme
 * that styles the same elements with high specificity (Flatsome and friends).
 * Colours come from custom properties so the plugin's accent setting drives
 * them — never hardcode the blue again.
 */

:root {
	--fd-accent: #3b82f6;
	--fd-accent-soft: #eff6ff;
	--fd-accent-line: #93c5fd;
	--fd-accent-ink: #1d4ed8;
	--fd-accent-ring: rgba(59, 130, 246, 0.18);
	--fd-line: #e4e7eb;
	--fd-ink: #1a202c;
	--fd-ink-soft: #374151;
	--fd-ink-strong: #111827;
	--fd-hover-bg: #f3f4f6;
	--fd-control-radius: 6px;
}

/* ==========================================================================
   Swatch buttons
   ========================================================================== */

.fd-theme-swatches .ux-swatch.ux-swatch--label {
	/* Longhands on purpose: a var() inside the `border` shorthand takes the
	   width and style down with it if the variable is ever missing. */
	border-width: 1px !important;
	border-style: solid !important;
	border-color: var(--fd-line) !important;
	border-radius: 10px !important;
	padding: 4px 11px !important;
	margin: 0 !important;
	background-color: #ffffff !important;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
	color: var(--fd-ink) !important;
	min-width: auto !important;
	height: auto !important;
	transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease !important;
}

.fd-theme-swatches .ux-swatch.ux-swatch--label .ux-swatch__text {
	font-weight: bold !important;
	font-size: 16px !important;
}

.fd-theme-swatches .ux-swatch.ux-swatch--label:hover {
	border-color: var(--fd-accent-line) !important;
	background-color: #f5f9ff !important;
}

/* Selected state. The ring is drawn INSIDE the box (inset shadow) rather than
   by thickening the border — a 2px border would resize the pill and shove
   every swatch after it sideways on each click. */
.fd-theme-swatches .ux-swatch.ux-swatch--label.selected {
	border-color: var(--fd-accent) !important;
	background-color: var(--fd-accent-soft) !important;
	box-shadow: inset 0 0 0 1px var(--fd-accent), 0 0 0 3px var(--fd-accent-ring) !important;
}

.fd-theme-swatches .ux-swatch.ux-swatch--label:hover .ux-swatch__text,
.fd-theme-swatches .ux-swatch.ux-swatch--label.selected .ux-swatch__text {
	color: var(--fd-accent-ink) !important;
}

/* A sold-out swatch keeps its red tint even while selected, so "chosen" never
   erases "unavailable". */
.fd-theme-swatches .ux-swatch.ux-swatch--label.is-out-of-stock.selected {
	background-color: #fef2f2 !important;
}

/* Keyboard focus has to stay visible once the theme's outline is gone. */
.fd-theme-swatches .ux-swatch.ux-swatch--label:focus-within {
	border-color: var(--fd-accent) !important;
	box-shadow: 0 0 0 3px var(--fd-accent-ring) !important;
}

/* Spacing comes from the container gap alone. The original used a negative
   right margin, which pulls the wrong way in RTL and fought the gap. */
.fd-theme-swatches table.variations .ux-swatches,
.fd-theme-swatches .custom-variation-radios {
	gap: 6px !important;
	margin-bottom: 0 !important;
}

/* ==========================================================================
   Attribute rows: label above its options, not beside them
   ========================================================================== */

.fd-theme-swatches table.variations tbody,
.fd-theme-swatches table.variations tr {
	display: flex !important;
	flex-direction: column !important;
	align-items: flex-start !important;
	width: 100% !important;
}

/* WooCommerce ships <th class="label">; some themes render <td>. Cover both —
   targeting only td silently does nothing on a stock install. */
.fd-theme-swatches table.variations th.label,
.fd-theme-swatches table.variations td.label {
	display: block !important;
	width: 100% !important;
	padding: 0 0 8px 0 !important;
	text-align: start !important;
}

.fd-theme-swatches table.variations td.value {
	display: block !important;
	width: 100% !important;
	padding: 0 !important;
}

.fd-theme-swatches .variations a.reset_variations {
	display: none !important;
}

/* ==========================================================================
   Quantity boxes
   ========================================================================== */

.fd-theme-quantity .quick-view .quantity,
.fd-theme-quantity .product-lightbox .quantity,
.fd-theme-quantity form.cart .quantity,
.fd-theme-quantity .widget_shopping_cart .quantity,
.fd-theme-quantity .cart_list .quantity,
.fd-theme-quantity .mini_cart_item .quantity,
.fd-theme-quantity .header-cart-inner .quantity {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	border: 1px solid #e5e7eb !important;
	border-radius: var(--fd-control-radius) !important;
	background: #ffffff !important;
	overflow: hidden !important;
	vertical-align: middle !important;
}

.fd-theme-quantity .quick-view .quantity,
.fd-theme-quantity .product-lightbox .quantity,
.fd-theme-quantity form.cart .quantity {
	height: 44px !important;
	min-width: 120px !important;
	padding: 0 6px !important;
	margin: 0 !important;
	margin-inline-end: 10px !important;
}

.fd-theme-quantity .widget_shopping_cart .quantity,
.fd-theme-quantity .cart_list .quantity,
.fd-theme-quantity .mini_cart_item .quantity,
.fd-theme-quantity .header-cart-inner .quantity {
	height: 36px !important;
	min-width: 100px !important;
	padding: 0 4px !important;
	margin: 6px 0 0 0 !important;
}

.fd-theme-quantity .quantity .plus,
.fd-theme-quantity .quantity .minus {
	padding: 0 !important;
	margin: 0 !important;
	background: transparent !important;
	border: none !important;
	border-radius: 4px !important;
	box-shadow: none !important;
	text-shadow: none !important;
	cursor: pointer !important;
	font-weight: 600 !important;
	color: var(--fd-ink-soft) !important;
	line-height: 1 !important;
	transition: background 0.15s ease, color 0.15s ease !important;
}

.fd-theme-quantity .quick-view .quantity .plus,
.fd-theme-quantity .quick-view .quantity .minus,
.fd-theme-quantity .product-lightbox .quantity .plus,
.fd-theme-quantity .product-lightbox .quantity .minus,
.fd-theme-quantity form.cart .quantity .plus,
.fd-theme-quantity form.cart .quantity .minus {
	width: 32px !important;
	height: 32px !important;
	min-height: 32px !important;
	font-size: 18px !important;
}

.fd-theme-quantity .widget_shopping_cart .quantity .plus,
.fd-theme-quantity .widget_shopping_cart .quantity .minus,
.fd-theme-quantity .cart_list .quantity .plus,
.fd-theme-quantity .cart_list .quantity .minus,
.fd-theme-quantity .mini_cart_item .quantity .plus,
.fd-theme-quantity .mini_cart_item .quantity .minus,
.fd-theme-quantity .header-cart-inner .quantity .plus,
.fd-theme-quantity .header-cart-inner .quantity .minus {
	width: 26px !important;
	height: 26px !important;
	min-height: 26px !important;
	font-size: 16px !important;
}

.fd-theme-quantity .quantity .plus:hover,
.fd-theme-quantity .quantity .minus:hover {
	background: var(--fd-hover-bg) !important;
	color: var(--fd-ink-strong) !important;
}

.fd-theme-quantity .quantity input.qty {
	padding: 0 !important;
	margin: 0 !important;
	border: none !important;
	background: transparent !important;
	text-align: center !important;
	font-weight: 700 !important;
	color: var(--fd-ink-strong) !important;
	box-shadow: none !important;
	appearance: textfield !important;
	-moz-appearance: textfield !important;
}

.fd-theme-quantity .quick-view .quantity input.qty,
.fd-theme-quantity .product-lightbox .quantity input.qty,
.fd-theme-quantity form.cart .quantity input.qty {
	width: 42px !important;
	height: 32px !important;
	font-size: 15px !important;
}

.fd-theme-quantity .widget_shopping_cart .quantity input.qty,
.fd-theme-quantity .cart_list .quantity input.qty,
.fd-theme-quantity .mini_cart_item .quantity input.qty,
.fd-theme-quantity .header-cart-inner .quantity input.qty {
	width: 36px !important;
	height: 26px !important;
	font-size: 14px !important;
}

.fd-theme-quantity .quantity input.qty::-webkit-outer-spin-button,
.fd-theme-quantity .quantity input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none !important;
	margin: 0 !important;
}

/* ==========================================================================
   Catalog ordering dropdown
   ========================================================================== */

.fd-theme-ordering form.woocommerce-ordering select {
	height: 42px !important;
	padding: 8px 34px 8px 15px !important;
	line-height: 1.5 !important;
	font-size: 14px !important;
	vertical-align: middle !important;
	box-sizing: border-box !important;
	appearance: none !important;
	-moz-appearance: none !important;
	-webkit-appearance: none !important;
	/* Removing the native arrow without drawing one leaves a box that does not
	   read as a dropdown, so supply a chevron. */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23374151' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 12px center !important;
	background-size: 14px 14px !important;
}

.rtl .fd-theme-ordering form.woocommerce-ordering select,
[dir="rtl"] .fd-theme-ordering form.woocommerce-ordering select {
	padding: 8px 15px 8px 34px !important;
	background-position: left 12px center !important;
}
