/**
 * Product Selector Styles
 *
 * Replicates the exact styling from the wdm_sales_rep plugin
 * for enhanced dropdowns and product details display.
 *
 * @package WDM_Sales_Rep_Integration
 * @since 1.0.0
 */

/* Product Selector Container */
.wdm-product-selector-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wdm-product-selector-header {
	text-align: center;
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 2px solid #007cba;
}

.wdm-product-selector-header h3 {
	margin: 0 0 10px 0;
	color: #333;
	font-size: 2em;
	font-weight: 600;
}

.wdm-product-selector-header p {
	margin: 0;
	color: #666;
	font-size: 1.1em;
}

/* Product Filters */
.wdm-product-filters {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 25px;
	margin-bottom: 30px;
}

.wdm-filter-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.wdm-filter-group label {
	font-weight: 600;
	color: #333;
	font-size: 1em;
	margin-bottom: 5px;
}

/* Enhanced Dropdown Styling */
.wdm-enhanced-dropdown {
	position: relative;
	width: 100%;
	font-family: inherit;
}

.wdm-enhanced-dropdown .wdm-selected-display {
	padding: 12px 15px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	position: relative;
	min-height: 20px;
	max-height: 120px;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 4px;
	transition: all 0.3s ease;
	font-size: 14px;
	color: #333;
	overflow-y: auto;
	overflow-x: hidden;
}

.wdm-enhanced-dropdown .wdm-selected-display:hover {
	border-color: #007cba;
}

.wdm-enhanced-dropdown .wdm-selected-display:after {
	content: '▼';
	position: absolute;
	right: 15px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 12px;
	color: #666;
	transition: transform 0.3s ease;
}

.wdm-enhanced-dropdown.active .wdm-selected-display:after {
	transform: translateY(-50%) rotate(180deg);
}

.wdm-enhanced-dropdown .wdm-dropdown-options {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid #ddd;
	border-top: none;
	border-radius: 0 0 4px 4px;
	max-height: 200px;
	overflow-y: auto;
	z-index: 1000;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.wdm-enhanced-dropdown .wdm-dropdown-option {
	padding: 10px 15px;
	cursor: pointer;
	border-bottom: 1px solid #f0f0f0;
	transition: background-color 0.2s ease;
	font-size: 14px;
	color: #333;
}

.wdm-enhanced-dropdown .wdm-dropdown-option:last-child {
	border-bottom: none;
}

.wdm-enhanced-dropdown .wdm-dropdown-option:hover {
	background-color: #f8f9fa;
}

.wdm-enhanced-dropdown .wdm-dropdown-option.selected {
	background-color: #007cba;
	color: #fff;
}

.wdm-enhanced-dropdown .wdm-dropdown-option.selected:hover {
	background-color: #005a87;
}

.wdm-enhanced-dropdown .wdm-select-all-option {
	font-weight: 600;
	background-color: #f8f9fa;
	border-bottom: 2px solid #ddd;
}

.wdm-enhanced-dropdown .wdm-select-all-option:hover {
	background-color: #e9ecef;
}

.wdm-enhanced-dropdown .wdm-select-all-option.selected {
	background-color: #28a745;
	color: #fff;
}

.wdm-enhanced-dropdown .wdm-select-all-option.selected:hover {
	background-color: #218838;
}

.wdm-enhanced-dropdown .wdm-hidden-input {
	display: none;
}

.wdm-enhanced-dropdown .wdm-search-input {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-top: none;
	border-radius: 0;
	box-sizing: border-box;
	font-size: 14px;
	outline: none;
}

.wdm-enhanced-dropdown .wdm-search-input:focus {
	border-color: #007cba;
}

.wdm-enhanced-dropdown .wdm-search-input::placeholder {
	color: #999;
	font-style: italic;
}

/* Selected Items Display */
.wdm-selected-item {
	display: inline-flex;
	align-items: center;
	background: #007cba;
	color: white;
	padding: 4px 8px;
	margin: 2px 0;
	border-radius: 12px;
	font-size: 12px;
	max-width: 100%;
	word-break: break-word;
	line-height: 1.2;
}

.wdm-remove-option {
	margin-left: 5px;
	cursor: pointer;
	font-weight: bold;
	transition: color 0.2s ease;
}

.wdm-remove-option:hover {
	color: #ff6b6b;
}

/* Product Details Container */
.wdm-product-details {
	background: #fff;
	border: 1px solid #e9ecef;
	border-radius: 6px;
	padding: 20px;
	margin-bottom: 20px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	width: 100%;
	box-sizing: border-box;
}

.wdm-product-details h4 {
	margin: 0 0 20px 0;
	color: #333;
	font-size: 1.5em;
	font-weight: 600;
	padding-bottom: 10px;
	border-bottom: 2px solid #007cba;
}

.wdm-product-list {
	display: grid;
	gap: 20px;
	width: 100%;
}

/* Product Detail Cards */
.wdm-product-detail-card {
	display: flex;
	flex-direction: row;
	gap: 20px;
	padding: 20px;
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.05);
	transition: all 0.3s ease;
	width: 100%;
	box-sizing: border-box;
}

.wdm-product-detail-card:hover {
	box-shadow: 0 4px 8px rgba(0,0,0,0.1);
	transform: translateY(-2px);
}

.wdm-product-image {
	text-align: center;
	flex-shrink: 0;
	width: 150px;
}

.wdm-product-image img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wdm-product-info {
	display: flex;
	flex-direction: column;
	gap: 15px;
	width: 100%;
	flex: 1;
}

.wdm-product-name-section {
	margin-bottom: 15px;
}

.wdm-product-name-label {
	font-size: 0.9em;
	color: #666;
	font-weight: 600;
	margin-bottom: 5px;
	display: block;
}

.wdm-product-name {
	margin: 0 0 10px 0;
	color: #333;
	font-size: 1.3em;
	font-weight: 600;
	line-height: 1.3;
}

.wdm-product-short-desc-section {
	margin-bottom: 15px;
}

.wdm-product-short-desc-label {
	font-size: 0.9em;
	color: #666;
	font-weight: 600;
	margin-bottom: 5px;
	display: block;
}

.wdm-product-short-desc {
	color: #666;
	font-size: 0.95em;
	line-height: 1.4;
	margin-top: 8px;
	padding: 10px;
	background: #f8f9fa;
	border-radius: 4px;
	border-left: 3px solid #007cba;
}

.wdm-product-sku {
	margin: 0;
	color: #666;
	font-size: 0.9em;
	font-family: monospace;
	background: #e9ecef;
	padding: 4px 8px;
	border-radius: 4px;
	display: inline-block;
	width: fit-content;
}

/* Product Price Styling */
.wdm-product-price-section {
	margin-bottom: 15px;
}

.wdm-product-price-label {
	font-size: 0.9em;
	color: #666;
	font-weight: 600;
	margin-bottom: 5px;
	display: block;
}

.wdm-product-price {
	font-size: 1.2em;
	font-weight: 600;
	color: #28a745;
}

/* Type of Test Styling */
.wdm-product-test-type-section {
	margin-bottom: 15px;
}

.wdm-product-test-type-label {
	font-size: 0.9em;
	color: #666;
	font-weight: 600;
	margin-bottom: 5px;
	display: block;
}

.wdm-product-test-type-value {
	font-size: 1em;
	color: #333;
	font-weight: 500;
	padding: 8px 12px;
	background: #e3f2fd;
	border: 1px solid #007cba;
	border-radius: 4px;
	display: inline-block;
	width: fit-content;
}

.wdm-sale-price {
	color: #dc3545;
	margin-right: 10px;
}

.wdm-regular-price {
	color: #6c757d;
	text-decoration: line-through;
	font-size: 0.9em;
}

/* Stock Status */
.wdm-product-stock {
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 0.9em;
	font-weight: 600;
	text-align: center;
	width: fit-content;
}

.wdm-instock {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.wdm-outofstock {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

/* Product Categories */
.wdm-product-categories {
	font-size: 0.9em;
	color: #666;
	background: #f8f9fa;
	padding: 8px 12px;
	border-radius: 4px;
	border-left: 3px solid #007cba;
	width: 100%;
	box-sizing: border-box;
}

.wdm-product-categories strong {
	color: #333;
}

/* Product Description */
.wdm-product-description {
	color: #495057;
	font-size: 0.95em;
	line-height: 1.5;
	background: #f8f9fa;
	padding: 12px;
	border-radius: 6px;
	border-left: 4px solid #007cba;
	width: 100%;
	box-sizing: border-box;
}

/* Product Specifications */
.wdm-product-specs {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin: 20px 0;
	padding: 16px;
	background: #f8f9fa;
	border-radius: 8px;
	border: 1px solid #e9ecef;
	width: 100%;
	box-sizing: border-box;
}

.wdm-product-weight,
.wdm-product-dimensions {
	font-size: 0.95em;
	color: #495057;
	font-weight: 500;
	padding: 8px 12px;
	background: #ffffff;
	border-radius: 6px;
	border: 1px solid #dee2e6;
}

/* Subscription Fields */
.wdm-product-subscription-fields {
	margin: 25px 0 !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 12px !important;
	padding: 20px !important;
	background: #ffffff !important;
	border: 1px solid #e9ecef !important;
	border-radius: 8px !important;
	box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
	width: 100% !important;
}

.wdm-product-actual-duration,
.wdm-product-duration {
	margin: 16px 0 !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 8px !important;
	width: 100% !important;
}

.wdm-product-actual-duration span {
	background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
	border: 2px solid #007cba;
	border-radius: 8px;
	padding: 12px 16px;
	font-size: 1.1em;
	font-weight: 700;
	color: #007cba;
	display: inline-block;
	width: 100% !important;
	max-width: 300px !important;
	text-align: center;
	min-width: 120px;
	box-shadow: 0 2px 4px rgba(0,124,186,0.1);
}

/* Custom Fields */
.wdm-product-custom-fields {
	margin: 25px 0 !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 12px !important;
	padding: 20px !important;
	background: #ffffff !important;
	border: 1px solid #e9ecef !important;
	border-radius: 8px !important;
	box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
	width: 100% !important;
}

.wdm-product-actual-price label,
.wdm-product-price-input label,
.wdm-product-test-type label,
.wdm-product-quantity label,
.wdm-product-hours label,
.wdm-product-actual-duration label,
.wdm-product-duration label,
.wdm-product-quantity-section label,
.wdm-product-hours-section label,
.wdm-product-actual-duration-section label,
.wdm-product-duration-section label,
.wdm-product-custom-price-section label {
	font-size: 1em;
	color: #2c3e50;
	font-weight: 600;
	margin-bottom: 4px;
	display: block !important;
	width: 100% !important;
}

/* Individual field containers */
.wdm-product-actual-price,
.wdm-product-quantity,
.wdm-product-hours,
.wdm-product-quantity-section,
.wdm-product-hours-section,
.wdm-product-actual-duration-section,
.wdm-product-duration-section,
.wdm-product-custom-price-section {
	width: 100% !important;
	margin-bottom: 15px !important;
}

.wdm-price-field,
.wdm-quantity-field,
.wdm-hours-field,
.wdm-duration-field {
	border: 2px solid #e9ecef !important;
	border-radius: 8px !important;
	padding: 12px 16px !important;
	font-size: 1em !important;
	width: 100% !important;
	max-width: 200px !important;
	transition: all 0.3s ease-in-out !important;
	background: #ffffff !important;
	box-sizing: border-box !important;
}

.wdm-duration-field {
	max-width: 200px !important;
}

.wdm-duration-unit {
	margin-left: 8px;
	color: #666;
	font-size: 0.9em;
	font-weight: 500;
}

/* Variation Selector Styling */
.wdm-variation-selector {
	border: 2px solid #007cba !important;
	border-radius: 8px !important;
	padding: 10px 12px !important;
	font-size: 0.95em !important;
	width: 100% !important;
	max-width: 300px !important;
	transition: all 0.3s ease-in-out !important;
	background: #ffffff !important;
	box-sizing: border-box !important;
	cursor: pointer;
}

.wdm-variation-selector:focus {
	outline: none !important;
	border-color: #005a87 !important;
	box-shadow: 0 0 0 3px rgba(0, 122, 186, 0.15) !important;
	transform: translateY(-1px) !important;
}

.wdm-variation-selector:hover {
	border-color: #005a87 !important;
	background-color: #f8f9fa !important;
}

.wdm-price-field:focus,
.wdm-quantity-field:focus,
.wdm-hours-field:focus,
.wdm-duration-field:focus {
	outline: none !important;
	border-color: #007cba !important;
	box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.15) !important;
	transform: translateY(-1px) !important;
}

/* Price input wrapper with dollar sign */
.wdm-price-input-wrapper {
	position: relative !important;
	display: inline-flex !important;
	align-items: center !important;
	width: 100% !important;
	max-width: 200px !important;
}

.wdm-price-symbol {
	position: absolute !important;
	left: 12px !important;
	color: #6c757d !important;
	font-weight: 600 !important;
	font-size: 1em !important;
	z-index: 1 !important;
	pointer-events: none !important;
	background: transparent !important;
}

.wdm-price-field {
	padding-left: 28px !important;
}

/* Loading and Error States */
.wdm-loading {
	text-align: center;
	padding: 40px;
	color: #007cba;
	font-style: italic;
	font-size: 1.1em;
}

.wdm-error {
	text-align: center;
	padding: 40px;
	color: #dc3545;
	font-weight: 600;
	background: #f8d7da;
	border: 1px solid #f5c6cb;
	border-radius: 6px;
}

/* Responsive Design */
@media (max-width: 768px) {
	.wdm-product-selector-container {
		padding: 15px;
		margin: 10px;
	}
	
	.wdm-product-selector-header h3 {
		font-size: 1.5em;
	}
	
	.wdm-product-filters {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	
	.wdm-product-detail-card {
		flex-direction: column;
		gap: 15px;
		text-align: center;
	}
	
	.wdm-product-image {
		order: -1;
	}
	
	.wdm-product-specs {
		flex-direction: column;
		gap: 10px;
	}
	
	.wdm-product-custom-fields {
		padding: 15px !important;
	}
	
	.wdm-price-field,
	.wdm-quantity-field,
	.wdm-hours-field,
	.wdm-duration-field {
		max-width: 100% !important;
	}
}

/* Enhanced Dropdown Responsive */
@media (max-width: 768px) {
	.wdm-enhanced-dropdown .wdm-dropdown-options {
		max-height: 150px;
	}
	
	.wdm-enhanced-dropdown .wdm-dropdown-option {
		padding: 12px 15px;
		font-size: 16px;
	}
	
	.wdm-enhanced-dropdown .wdm-selected-display {
		padding: 15px;
		font-size: 16px;
		max-height: 100px;
	}
	
	.wdm-selected-item {
		font-size: 13px;
		padding: 3px 6px;
	}
}

/* Accessibility Improvements */
.wdm-product-selector-container:focus,
.wdm-enhanced-dropdown .wdm-selected-display:focus {
	outline: 2px solid #007cba;
	outline-offset: 2px;
}

.wdm-price-field:focus,
.wdm-quantity-field:focus,
.wdm-hours-field:focus,
.wdm-duration-field:focus {
	outline: none !important;
	border-color: #007cba !important;
	box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.15) !important;
}

/* Order Notes Section */
.wdm-order-notes {
	background: #fff;
	border: 1px solid #e9ecef;
	border-radius: 6px;
	padding: 20px;
	margin-bottom: 20px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	width: 100%;
	box-sizing: border-box;
}

.wdm-order-notes h4 {
	margin: 0 0 20px 0;
	color: #333;
	font-size: 1.5em;
	font-weight: 600;
	padding-bottom: 10px;
	border-bottom: 2px solid #007cba;
}

.wdm-notes-section {
	margin-bottom: 25px;
	width: 100%;
}

.wdm-notes-section:last-child {
	margin-bottom: 0;
}

.wdm-notes-section label {
	font-size: 1em;
	color: #2c3e50;
	font-weight: 600;
	margin-bottom: 8px;
	display: block;
	width: 100%;
}

.wdm-rich-editor-container {
	width: 100%;
	position: relative;
}

.wdm-rich-editor {
	width: 100%;
	min-height: 150px;
	padding: 12px;
	border: 2px solid #e9ecef;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.5;
	resize: vertical;
	transition: all 0.3s ease-in-out;
	background: #ffffff;
	box-sizing: border-box;
	font-family: inherit;
}

.wdm-rich-editor:focus {
	outline: none;
	border-color: #007cba;
	box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.15);
}

.wdm-rich-editor::placeholder {
	color: #999;
	font-style: italic;
}

/* TinyMCE Editor Styling */
.wdm-rich-editor-container .mce-tinymce {
	border: 2px solid #e9ecef !important;
	border-radius: 8px !important;
	box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
	transition: all 0.3s ease-in-out !important;
}

.wdm-rich-editor-container .mce-tinymce.mce-focus {
	border-color: #007cba !important;
	box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.15) !important;
}

.wdm-rich-editor-container .mce-toolbar {
	background: #f8f9fa !important;
	border-bottom: 1px solid #e9ecef !important;
	border-radius: 6px 6px 0 0 !important;
}

.wdm-rich-editor-container .mce-toolbar .mce-btn {
	background: transparent !important;
	border: none !important;
	border-radius: 4px !important;
	margin: 2px !important;
	transition: all 0.2s ease !important;
}

.wdm-rich-editor-container .mce-toolbar .mce-btn:hover {
	background: #e9ecef !important;
}

.wdm-rich-editor-container .mce-toolbar .mce-btn.mce-active {
	background: #007cba !important;
	color: #fff !important;
}

.wdm-rich-editor-container .mce-edit-area {
	border: none !important;
}

.wdm-rich-editor-container .mce-edit-area iframe {
	border-radius: 0 0 6px 6px !important;
}

/* Responsive Design for Order Notes */
@media (max-width: 768px) {
	.wdm-order-notes {
		padding: 15px;
		margin: 10px 0;
	}
	
	.wdm-order-notes h4 {
		font-size: 1.3em;
	}
	
	.wdm-rich-editor {
		min-height: 120px;
		font-size: 16px; /* Prevent zoom on iOS */
	}
	
	.wdm-rich-editor-container .mce-toolbar {
		padding: 5px !important;
	}
	
	.wdm-rich-editor-container .mce-toolbar .mce-btn {
		padding: 6px 8px !important;
		font-size: 14px !important;
	}
}

/* Cart Actions */
.wdm-cart-actions {
	margin-top: 20px;
	text-align: center;
}

.wdm-proceed-to-cart-btn {
	background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
	color: white;
	border: none;
	padding: 15px 30px;
	font-size: 1.1em;
	font-weight: 600;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

.wdm-proceed-to-cart-btn:hover {
	background: linear-gradient(135deg, #005a87 0%, #004066 100%);
	transform: translateY(-2px);
	box-shadow: 0 6px 12px rgba(0, 124, 186, 0.4);
}

.wdm-proceed-to-cart-btn:active {
	transform: translateY(0);
	box-shadow: 0 2px 4px rgba(0, 124, 186, 0.3);
}

/* Cart Page */
.wdm-cart-page {
	background: #fff;
	border: 1px solid #e9ecef;
	border-radius: 6px;
	padding: 20px;
	margin-bottom: 20px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	width: 100%;
	box-sizing: border-box;
}

.wdm-cart-header {
	display: flex;
	align-items: center;
	margin-bottom: 25px;
	padding-bottom: 15px;
	border-bottom: 2px solid #007cba;
}

.wdm-back-to-products-btn {
	background: #6c757d;
	color: white;
	border: none;
	padding: 10px 20px;
	font-size: 0.9em;
	font-weight: 500;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.3s ease;
	margin-right: 20px;
}

.wdm-back-to-products-btn:hover {
	background: #5a6268;
	transform: translateY(-1px);
}

.wdm-cart-header h3 {
	margin: 0;
	color: #333;
	font-size: 1.8em;
	font-weight: 600;
}

.wdm-cart-content {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 30px;
}

/* Cart Items */
.wdm-cart-items {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.wdm-cart-item {
	display: flex;
	gap: 20px;
	padding: 20px;
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.wdm-cart-item-image {
	flex-shrink: 0;
	width: 120px;
	height: 120px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border-radius: 6px;
	overflow: hidden;
}

.wdm-cart-item-image img {
	max-width: 100%;
	max-height: 100%;
	object-fit: cover;
}

.wdm-cart-item-no-image {
	color: #6c757d;
	font-size: 0.9em;
	text-align: center;
}

.wdm-cart-item-details {
	flex: 1;
}

.wdm-cart-item-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 10px;
}

.wdm-cart-item-name {
	margin: 0;
	color: #333;
	font-size: 1.2em;
	font-weight: 600;
	flex: 1;
}

.wdm-remove-cart-item-btn {
	background: #dc3545;
	color: white;
	border: none;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	flex-shrink: 0;
	margin-left: 10px;
}

.wdm-remove-cart-item-btn:hover {
	background: #c82333;
	transform: scale(1.1);
}

.wdm-remove-cart-item-btn:active {
	transform: scale(0.95);
}

.wdm-remove-icon {
	font-size: 18px;
	font-weight: bold;
	line-height: 1;
}

.wdm-cart-item-type {
	color: #007cba;
	font-size: 0.9em;
	font-weight: 500;
	margin-bottom: 15px;
}

.wdm-cart-item-info {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 10px;
}

.wdm-cart-item-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 12px;
	background: #fff;
	border-radius: 4px;
	border: 1px solid #e9ecef;
}

.wdm-cart-item-label {
	font-weight: 500;
	color: #666;
}

.wdm-cart-item-value {
	font-weight: 600;
	color: #333;
}

.wdm-cart-item-subtotal {
	background: #e3f2fd !important;
	border-color: #007cba !important;
	font-weight: 600;
}

.wdm-cart-item-subtotal .wdm-cart-item-value {
	color: #007cba;
	font-size: 1.1em;
}

/* Cart Summary */
.wdm-cart-summary {
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 8px;
	padding: 20px;
	height: fit-content;
}

.wdm-cart-totals {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.wdm-cart-total-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 16px;
	background: #fff;
	border-radius: 6px;
	border: 1px solid #e9ecef;
}

.wdm-cart-total-label {
	font-weight: 500;
	color: #666;
}

.wdm-cart-total-value {
	font-weight: 600;
	color: #333;
}

.wdm-cart-total-price {
	background: #e3f2fd !important;
	border-color: #007cba !important;
}

.wdm-cart-total-price .wdm-cart-total-value {
	color: #007cba;
	font-size: 1.2em;
}

/* Cart Notes */
.wdm-cart-notes {
	margin-top: 30px;
	grid-column: 1 / -1;
}

.wdm-cart-notes h4 {
	margin: 0 0 15px 0;
	color: #333;
	font-size: 1.3em;
	font-weight: 600;
	padding-bottom: 10px;
	border-bottom: 2px solid #007cba;
}

.wdm-cart-notes-content {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.wdm-cart-note-section {
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 6px;
	padding: 15px;
}

.wdm-cart-note-section strong {
	color: #333;
	font-size: 0.9em;
	display: block;
	margin-bottom: 8px;
}

.wdm-cart-note-content {
	color: #666;
	font-size: 0.95em;
	line-height: 1.5;
}

.wdm-cart-note-content em {
	color: #999;
	font-style: italic;
}

/* Responsive Design for Cart */
@media (max-width: 768px) {
	.wdm-cart-content {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	
	.wdm-cart-item {
		flex-direction: column;
		text-align: center;
	}
	
	.wdm-cart-item-image {
		width: 100%;
		height: 150px;
	}
	
	.wdm-cart-item-header {
		justify-content: center;
		position: relative;
	}
	
	.wdm-remove-cart-item-btn {
		position: absolute;
		top: 0;
		right: 0;
		margin-left: 0;
	}
	
	.wdm-cart-item-info {
		grid-template-columns: 1fr;
	}
	
	.wdm-cart-notes-content {
		grid-template-columns: 1fr;
	}
	
	.wdm-cart-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 15px;
	}
	
	.wdm-back-to-products-btn {
		margin-right: 0;
	}
}

/* Print Styles */
@media print {
	.wdm-loading,
	.wdm-error {
		display: none !important;
	}
	
	.wdm-product-selector-container {
		box-shadow: none;
		border: 1px solid #000;
	}
	
	.wdm-order-notes {
		box-shadow: none;
		border: 1px solid #000;
	}
	
	.wdm-rich-editor-container .mce-toolbar {
		display: none !important;
	}
	
	.wdm-cart-page {
		box-shadow: none;
		border: 1px solid #000;
	}
	
	.wdm-proceed-to-cart-btn,
	.wdm-back-to-products-btn {
		display: none !important;
	}
}

/* User Selection Styles */
.wdm-cart-user-selection {
	margin: 30px 0;
	padding: 25px;
	background: #f8f9fa;
	border-radius: 8px;
	border: 1px solid #e9ecef;
}

.wdm-cart-user-selection h4 {
	margin: 0 0 20px 0;
	color: #333;
	font-size: 1.3em;
	font-weight: 600;
}

.wdm-user-search-container {
	position: relative;
}

.wdm-user-search-input {
	width: 100%;
	padding: 12px 15px;
	border: 2px solid #ddd;
	border-radius: 6px;
	font-size: 16px;
	transition: border-color 0.3s ease;
}

.wdm-user-search-input:focus {
	outline: none;
	border-color: #007cba;
	box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.wdm-user-search-results {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: white;
	border: 1px solid #ddd;
	border-top: none;
	border-radius: 0 0 6px 6px;
	max-height: 200px;
	overflow-y: auto;
	z-index: 1000;
	box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.wdm-user-search-result {
	padding: 12px 15px;
	cursor: pointer;
	border-bottom: 1px solid #f0f0f0;
	transition: background-color 0.2s ease;
}

.wdm-user-search-result:hover {
	background-color: #f8f9fa;
}

.wdm-user-search-result:last-child {
	border-bottom: none;
}

.wdm-user-search-loading,
.wdm-user-search-no-results,
.wdm-user-search-error {
	padding: 12px 15px;
	color: #666;
	font-style: italic;
	text-align: center;
}

.wdm-user-search-error {
	color: #dc3545;
}

.wdm-selected-user-display {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 15px;
	padding: 12px 15px;
	background: #e8f5e8;
	border: 1px solid #c3e6c3;
	border-radius: 6px;
}

.wdm-selected-user-name {
	font-weight: 600;
	color: #2d5a2d;
}

.wdm-remove-selected-user {
	background: #dc3545;
	color: white;
	border: none;
	border-radius: 50%;
	width: 24px;
	height: 24px;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease;
}

.wdm-remove-selected-user:hover {
	background: #c82333;
}


/* Cart Actions Styles */
.wdm-cart-actions {
	margin: 30px 0;
	padding: 25px;
	background: #f8f9fa;
	border-radius: 8px;
	border: 1px solid #e9ecef;
	text-align: center;
}

.wdm-cart-actions {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
}

.wdm-cart-actions button {
	margin: 0;
	padding: 15px 30px;
	border: none;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	min-width: 180px;
	flex: 0 0 auto;
}


.wdm-place-order-btn {
	background: #007cba;
	color: white;
}

.wdm-place-order-btn:hover:not(:disabled) {
	background: #005a87;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

.wdm-cart-actions button:disabled {
	background: #6c757d;
	color: #fff;
	cursor: not-allowed;
	opacity: 0.6;
	transform: none;
	box-shadow: none;
}

/* Modal Styles */
.wdm-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 10000;
	display: flex;
	justify-content: center;
	align-items: center;
}

.wdm-modal {
	background: white;
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
	max-width: 500px;
	width: 90%;
	max-height: 80vh;
	overflow: hidden;
	animation: wdm-modal-fade-in 0.3s ease-out;
}

@keyframes wdm-modal-fade-in {
	from {
		opacity: 0;
		transform: scale(0.9) translateY(-20px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.wdm-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 25px;
	border-bottom: 1px solid #e9ecef;
	background: #f8f9fa;
}

.wdm-modal-header h3 {
	margin: 0;
	color: #333;
	font-size: 1.4em;
	font-weight: 600;
}

.wdm-modal-close {
	background: none;
	border: none;
	font-size: 24px;
	color: #666;
	cursor: pointer;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: all 0.2s ease;
}

.wdm-modal-close:hover {
	background: #e9ecef;
	color: #333;
}

.wdm-modal-body {
	padding: 25px;
	max-height: 60vh;
	overflow-y: auto;
}

.wdm-modal-body p {
	margin: 0 0 15px 0;
	line-height: 1.6;
	color: #555;
}

.wdm-modal-body p:last-child {
	margin-bottom: 0;
}

.wdm-modal-footer {
	padding: 20px 25px;
	border-top: 1px solid #e9ecef;
	background: #f8f9fa;
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

.wdm-modal-btn {
	padding: 10px 20px;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	min-width: 80px;
}

.wdm-modal-btn-primary {
	background: #007cba;
	color: white;
}

.wdm-modal-btn-primary:hover {
	background: #005a87;
}

.wdm-modal-btn-secondary {
	background: #6c757d;
	color: white;
}

.wdm-modal-btn-secondary:hover {
	background: #545b62;
}

/* Success Modal Styles */
.wdm-modal.wdm-modal-success .wdm-modal-header {
	background: #d4edda;
	border-bottom-color: #c3e6cb;
}

.wdm-modal.wdm-modal-success .wdm-modal-header h3 {
	color: #155724;
}

.wdm-modal.wdm-modal-success .wdm-modal-footer {
	background: #d4edda;
	border-top-color: #c3e6cb;
}

/* Error Modal Styles */
.wdm-modal.wdm-modal-error .wdm-modal-header {
	background: #f8d7da;
	border-bottom-color: #f5c6cb;
}

.wdm-modal.wdm-modal-error .wdm-modal-header h3 {
	color: #721c24;
}

.wdm-modal.wdm-modal-error .wdm-modal-footer {
	background: #f8d7da;
	border-top-color: #f5c6cb;
}

/* Mobile Responsive for new elements */
@media (max-width: 768px) {
	.wdm-cart-actions {
		flex-direction: column;
		gap: 15px;
	}
	
	.wdm-cart-actions button {
		width: 100%;
		min-width: auto;
	}
	
	.wdm-modal {
		width: 95%;
		margin: 20px;
	}
	
	.wdm-modal-header,
	.wdm-modal-body,
	.wdm-modal-footer {
		padding: 15px 20px;
	}
	
	.wdm-modal-footer {
		flex-direction: column;
	}
	
	.wdm-modal-btn {
		width: 100%;
	}
}

/* Checkout Integration Styles */
.wdm-checkout-selected-user {
	background: #e3f2fd;
	border: 1px solid #007cba;
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 30px;
	text-align: center;
}

.wdm-checkout-selected-user h3 {
	margin: 0 0 10px 0;
	color: #007cba;
	font-size: 1.3em;
	font-weight: 600;
}

.wdm-checkout-selected-user p {
	margin: 0;
	color: #333;
	font-size: 1.1em;
}

.wdm-checkout-selected-user strong {
	color: #007cba;
}

/* Custom Order Details on Frontend */
.wdm-custom-order-details {
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 8px;
	padding: 20px;
	margin: 20px 0;
}

.wdm-custom-order-details h2 {
	margin: 0 0 15px 0;
	color: #333;
	font-size: 1.4em;
	font-weight: 600;
	padding-bottom: 10px;
	border-bottom: 2px solid #007cba;
}

.wdm-custom-order-details p {
	margin: 0 0 10px 0;
	color: #555;
	line-height: 1.5;
}

.wdm-custom-order-details strong {
	color: #333;
	font-weight: 600;
}

/* Admin Order Meta Styles */
.wdm-admin-order-meta {
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 6px;
	padding: 15px;
	margin: 15px 0;
}

.wdm-admin-order-meta p {
	margin: 0 0 8px 0;
	color: #555;
	line-height: 1.4;
}

.wdm-admin-order-meta p:last-child {
	margin-bottom: 0;
}

.wdm-admin-order-meta strong {
	color: #333;
	font-weight: 600;
}

/* Responsive Design for Checkout Integration */
@media (max-width: 768px) {
	.wdm-checkout-selected-user {
		padding: 15px;
		margin-bottom: 20px;
	}
	
	.wdm-checkout-selected-user h3 {
		font-size: 1.2em;
	}
	
	.wdm-checkout-selected-user p {
		font-size: 1em;
	}
	
	.wdm-custom-order-details {
		padding: 15px;
		margin: 15px 0;
	}
	
	.wdm-custom-order-details h2 {
		font-size: 1.3em;
	}
}

/* Custom Renewal Information Styles */
.wdm-custom-renewal-info {
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 8px;
	padding: 20px;
	margin: 20px 0;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wdm-custom-renewal-info h3 {
	margin: 0 0 15px 0;
	color: #333;
	font-size: 1.2em;
	font-weight: 600;
	border-bottom: 2px solid #007cba;
	padding-bottom: 8px;
}

.wdm-renewal-item {
	margin-bottom: 12px;
	padding: 10px;
	background: #fff;
	border-radius: 6px;
	border-left: 4px solid #007cba;
}

.wdm-renewal-item:last-child {
	margin-bottom: 0;
}

.wdm-renewal-item strong {
	color: #333;
	font-size: 1.1em;
	display: block;
	margin-bottom: 5px;
}

.wdm-renewal-item .renewal-date {
	color: #666;
	font-size: 0.95em;
	font-weight: 500;
}

/* Responsive styles for renewal info */
@media (max-width: 768px) {
	.wdm-custom-renewal-info {
		padding: 15px;
		margin: 15px 0;
	}
	
	.wdm-custom-renewal-info h3 {
		font-size: 1.1em;
	}
	
	.wdm-renewal-item {
		padding: 8px;
	}
	
	.wdm-renewal-item strong {
		font-size: 1em;
	}
}