/**
 * RENIC Variation Swatches - Theme & Plugin Compatibility Styles
 * Scoped specifically to detected environments.
 *
 * @package RENIC_Variation_Swatches
 */

/* ==========================================================================
   GENERIC RESET & SELECTOR RESCUE
   ========================================================================== */
/* Suppress third-party Select2 / nice-select overlays on our hidden select */
.rvs-hidden-select + .select2-container,
.rvs-hidden-select + .nice-select,
.rvs-wrap .select2-container,
.rvs-wrap .nice-select {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

/* Ensure clean table cell expansion for standard themes */
.variations tr.rvs-has-swatches th.label {
	display: none !important;
}

.variations tr.rvs-has-swatches td.value {
	display: block !important;
	width: 100% !important;
	padding: 0 0 14px 0 !important;
}

/* Radio button swatches always horizontal */
.rvs-wrap--radio .rvs-list {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap !important;
	align-items: center !important;
	gap: var(--rvs-gap, 8px) !important;
}

.rvs-wrap--radio .rvs-item--radio {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: auto !important;
	flex: 0 0 auto !important;
	padding: 8px 16px !important;
	gap: 8px !important;
	white-space: nowrap !important;
}

.rvs-label-line {
	display: flex !important;
	align-items: center !important;
	justify-content: flex-start !important;
	width: 100% !important;
	gap: 4px !important;
}

.rvs-clear-link {
	margin-left: auto !important;
	padding-left: 8px !important;
	white-space: nowrap !important;
}

/* ==========================================================================
   BLOCKSY THEME COMPATIBILITY
   ========================================================================== */
.rvs-theme-blocksy .ct-product-add-to-cart .variations {
	display: block !important;
	width: 100% !important;
}

.rvs-theme-blocksy .ct-product-add-to-cart .variations tr {
	display: block;
	margin-bottom: 12px;
}

.rvs-theme-blocksy .ct-product-add-to-cart .variations td.value {
	display: block;
	width: 100%;
	padding: 0;
}

/* Blocksy Dark Mode Integration */
[data-theme*="dark"] .rvs-wrap {
	--rvs-text: var(--theme-text-color, #e2e8f0);
	--rvs-bg: var(--theme-card-background, #1e293b);
	--rvs-border: var(--theme-border-color, #334155);
	--rvs-border-hover: #94a3b8;
}

/* Blocksy Quick View Modal Fix */
.ct-quick-view .rvs-wrap {
	margin-bottom: 12px;
}

/* Blocksy Sticky Add-to-Cart Bar */
.ct-sticky-add-to-cart .rvs-wrap {
	margin-bottom: 0;
}

/* ==========================================================================
   ELEMENTOR / ELEMENTOR PRO COMPATIBILITY
   ========================================================================== */
.elementor-widget-woocommerce-product-add-to-cart .variations tr.rvs-has-swatches td.value {
	display: block;
	width: 100%;
}

.elementor-widget-loop-grid .rvs-archive,
.elementor-widget-woocommerce-products .rvs-archive {
	margin: 8px 0;
}

/* ==========================================================================
   ASTRA & KADENCE COMPATIBILITY
   ========================================================================== */
.rvs-theme-astra .ast-product-single-variable .variations,
.rvs-theme-kadence .product_variations {
	width: 100%;
}

.rvs-theme-astra .variations td.value::before,
.rvs-theme-kadence .variations td.value::before {
	display: none !important;
}

/* ==========================================================================
   FLATSOME THEME COMPATIBILITY
   ========================================================================== */
.rvs-theme-flatsome .product-info .variations th {
	display: none !important;
}

.rvs-theme-flatsome .product-info .variations td {
	display: block !important;
	padding: 0 0 10px 0 !important;
}

/* ==========================================================================
   DOKAN VENDOR DASHBOARD COMPATIBILITY
   ========================================================================== */
.rvs-dokan-swatches-box h3 {
	font-size: 15px;
	margin-bottom: 8px;
}

.rvs-dokan-swatches-box .rvs-product-attr-card {
	background: #f8fafc;
	margin-bottom: 14px;
}
