/**
 * Custom Select2/SelectWoo Styling for WCDPDR Plugin
 *
 * This file provides custom styling for WooCommerce's selectWoo
 * (their version of Select2) to match the plugin's design
 *
 * @package WooCommerceDynamicPricingDiscountRules
 */

/* Ensure selectWoo dropdowns have proper z-index in modals */
.wcdpdr-modal .select2-container {
	z-index: 999999 !important;
}

.wcdpdr-modal .select2-dropdown {
	z-index: 999999 !important;
}

/* Custom styling for select2/selectWoo in our plugin */
.wcdpdr-select2.select2-container--default .select2-selection--single,
.wcdpdr-select2.select2-container--default .select2-selection--multiple {
	border: 1px solid #ddd;
	border-radius: 3px;
	min-height: 36px;
	padding: 4px 8px;
}

/* Focus state */
.wcdpdr-select2.select2-container--default.select2-container--focus .select2-selection--single,
.wcdpdr-select2.select2-container--default.select2-container--focus .select2-selection--multiple {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

/* Multiple selection tags */
.wcdpdr-select2 .select2-selection__choice {
	background-color: #f0f0f1;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	padding: 2px 8px;
	margin: 2px 4px 2px 0;
}

/* Remove button in tags */
.wcdpdr-select2 .select2-selection__choice__remove {
	color: #787c82;
	margin-right: 4px;
}

.wcdpdr-select2 .select2-selection__choice__remove:hover {
	color: #d63638;
}

/* Dropdown results */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
	background-color: #2271b1;
	color: #fff;
}

/* Make sure dropdown appears above modals */
.select2-container {
	z-index: 999999;
}

/* Ensure proper width for select boxes in forms */
.wcdpdr-form-field .wcdpdr-select2 {
	width: 100% !important;
}

/* Adjust padding for single selection */
.wcdpdr-select2.select2-container--default .select2-selection--single .select2-selection__rendered {
	line-height: 28px;
	padding-left: 4px;
}

/* Loading state */
.wcdpdr-select2.select2-container--default .select2-selection--single .select2-selection__placeholder {
	color: #646970;
}

/* Disabled state */
.wcdpdr-select2.select2-container--default .select2-selection--single.select2-selection--disabled,
.wcdpdr-select2.select2-container--default .select2-selection--multiple.select2-selection--disabled {
	background-color: #f0f0f1;
	cursor: not-allowed;
}
