/**
 * Public styles for WP Offer Engine.
 *
 * @package WP_Offer_Engine
 * @since   1.0.0
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
	--woe-primary: #2563eb;
	--woe-primary-hover: #1d4ed8;
	--woe-secondary: #64748b;
	--woe-success: #22c55e;
	--woe-error: #ef4444;
	--woe-warning: #f59e0b;
	--woe-bg: #f8fafc;
	--woe-card-bg: #ffffff;
	--woe-border: #e2e8f0;
	--woe-text: #1e293b;
	--woe-text-muted: #64748b;
	--woe-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
	--woe-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
	--woe-radius: 12px;
	--woe-radius-sm: 8px;
	--woe-transition: 0.2s ease;
}

/* ==========================================================================
   Configurator Container
   ========================================================================== */
.woe-configurator {
	position: relative;
	max-width: 1400px;
	margin: 0 auto;
	padding: 20px;
	background: var(--woe-bg);
	border-radius: var(--woe-radius);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	display: grid;
	grid-template-columns: 1fr 320px;
	grid-template-rows: auto 1fr auto;
	grid-template-areas:
		"progress progress"
		"content sidebar"
		"navigation navigation";
	gap: 24px;
}

.woe-progress {
	grid-area: progress;
}

.woe-steps-container {
	grid-area: content;
}

.woe-shopping-list {
	grid-area: sidebar;
}

.woe-navigation {
	grid-area: navigation;
}

/* Hide legacy summary panel */
.woe-summary-panel {
	display: none !important;
}

@media (max-width: 1024px) {
	.woe-configurator {
		grid-template-columns: 1fr;
		grid-template-areas:
			"progress"
			"content"
			"navigation";
		padding-bottom: 80px; /* Space for floating shopping list */
	}
}

.woe-error {
	background: #fef2f2;
	border: 1px solid var(--woe-error);
	color: var(--woe-error);
	padding: 16px 20px;
	border-radius: var(--woe-radius-sm);
	text-align: center;
}

/* ==========================================================================
   Progress Bar
   ========================================================================== */
.woe-progress {
	margin-bottom: 32px;
}

.woe-progress-bar {
	height: 8px;
	background: var(--woe-border);
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: 16px;
}

.woe-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--woe-primary), #3b82f6);
	border-radius: 4px;
	transition: width 0.4s ease;
}

.woe-progress-steps {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
}

.woe-progress-step {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background: var(--woe-card-bg);
	border: 2px solid var(--woe-border);
	border-radius: 50px;
	font-size: 13px;
	color: var(--woe-text-muted);
	transition: all var(--woe-transition);
}

.woe-progress-step .woe-step-number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	background: var(--woe-border);
	border-radius: 50%;
	font-weight: 600;
	font-size: 12px;
}

.woe-progress-step .woe-step-title {
	display: none;
}

@media (min-width: 768px) {
	.woe-progress-step .woe-step-title {
		display: inline;
	}
}

.woe-progress-step.active {
	border-color: var(--woe-primary);
	color: var(--woe-primary);
}

.woe-progress-step.active .woe-step-number {
	background: var(--woe-primary);
	color: #fff;
}

.woe-progress-step.completed {
	border-color: var(--woe-success);
	color: var(--woe-success);
	cursor: pointer;
}

.woe-progress-step.completed .woe-step-number {
	background: var(--woe-success);
	color: #fff;
}

.woe-progress-step.completed .woe-step-number::before {
	content: "✓";
}

.woe-progress-step.completed:hover {
	transform: translateY(-2px);
	box-shadow: var(--woe-shadow);
}

/* ==========================================================================
   Steps Container
   ========================================================================== */
.woe-steps-container {
	margin-bottom: 24px;
}

.woe-step {
	background: var(--woe-card-bg);
	border-radius: var(--woe-radius);
	padding: 32px;
	box-shadow: var(--woe-shadow);
}

/* Hidden by visibility rules */
.woe-step.woe-hidden-by-rule {
	display: none !important;
}

.woe-step-header {
	text-align: center;
	margin-bottom: 32px;
}

.woe-step-header .woe-step-title {
	font-size: 24px;
	font-weight: 700;
	color: var(--woe-text);
	margin: 0 0 8px;
}

.woe-step-header .woe-step-description {
	font-size: 16px;
	color: var(--woe-text-muted);
	margin: 0;
}

/* Help Tooltip / Hint Box */
.woe-step-help {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 16px;
	padding: 14px 18px;
	background: linear-gradient(135deg, #fef9e7 0%, #fef3c7 100%);
	border: 1px solid #f59e0b;
	border-left: 4px solid #f59e0b;
	border-radius: 8px;
	color: #92400e;
}

.woe-step-help .woe-help-icon {
	font-size: 20px;
	flex-shrink: 0;
	line-height: 1;
}

.woe-step-help .woe-help-text {
	font-size: 14px;
	line-height: 1.5;
}

/* ==========================================================================
   Options Grid
   ========================================================================== */
.woe-options {
	display: grid;
	gap: 16px;
}

.woe-options-single,
.woe-options-multiple {
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

@media (min-width: 768px) {
	.woe-options-single,
	.woe-options-multiple {
		grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	}
}

/* ==========================================================================
   Option Card
   ========================================================================== */
.woe-option {
	position: relative;
	background: var(--woe-card-bg);
	border: 2px solid var(--woe-border);
	border-radius: var(--woe-radius-sm);
	padding: 20px;
	cursor: pointer;
	transition: all var(--woe-transition);
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.woe-option:hover {
	border-color: var(--woe-primary);
	transform: translateY(-2px);
	box-shadow: var(--woe-shadow);
}

.woe-option.selected {
	border-color: var(--woe-primary);
	background: linear-gradient(180deg, #eff6ff, #dbeafe);
}

.woe-option .woe-option-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.woe-option-image {
	width: 100%;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: var(--woe-radius-sm);
	background: var(--woe-bg);
}

.woe-option-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--woe-transition);
}

.woe-option:hover .woe-option-image img {
	transform: scale(1.05);
}

.woe-option-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.woe-option-label {
	font-size: 16px;
	font-weight: 600;
	color: var(--woe-text);
}

.woe-option-description {
	font-size: 14px;
	color: var(--woe-text-muted);
	line-height: 1.5;
}

.woe-option-price {
	font-size: 15px;
	font-weight: 700;
	color: var(--woe-primary);
	margin-top: auto;
}

.woe-option-check {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 24px;
	height: 24px;
	border: 2px solid var(--woe-border);
	border-radius: 50%;
	background: var(--woe-card-bg);
	transition: all var(--woe-transition);
}

.woe-option.selected .woe-option-check {
	border-color: var(--woe-primary);
	background: var(--woe-primary);
}

.woe-option.selected .woe-option-check::after {
	content: "✓";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #fff;
	font-size: 14px;
	font-weight: bold;
}

/* Multiple selection - square checkbox */
.woe-options-multiple .woe-option-check {
	border-radius: 4px;
}

/* ==========================================================================
   Input Options
   ========================================================================== */
.woe-options-input {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.woe-input-option {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.woe-input-label {
	font-size: 16px;
	font-weight: 600;
	color: var(--woe-text);
}

.woe-input-unit {
	font-weight: 400;
	color: var(--woe-text-muted);
}

.woe-input-description {
	font-size: 14px;
	color: var(--woe-text-muted);
	margin: 0;
}

.woe-input-wrapper {
	display: flex;
	align-items: center;
	gap: 12px;
}

.woe-input {
	flex: 1;
	padding: 12px 16px;
	font-size: 16px;
	border: 2px solid var(--woe-border);
	border-radius: var(--woe-radius-sm);
	background: var(--woe-card-bg);
	color: var(--woe-text);
	transition: all var(--woe-transition);
}

.woe-input:focus {
	outline: none;
	border-color: var(--woe-primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.woe-input.woe-error {
	border-color: var(--woe-error);
}

.woe-input-suffix {
	font-size: 16px;
	color: var(--woe-text-muted);
	white-space: nowrap;
}

.woe-input-range {
	-webkit-appearance: none;
	appearance: none;
	height: 8px;
	background: var(--woe-border);
	border-radius: 4px;
	border: none;
	padding: 0;
}

.woe-input-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 24px;
	height: 24px;
	background: var(--woe-primary);
	border-radius: 50%;
	cursor: pointer;
	transition: transform var(--woe-transition);
}

.woe-input-range::-webkit-slider-thumb:hover {
	transform: scale(1.1);
}

.woe-range-output {
	min-width: 60px;
	padding: 8px 12px;
	background: var(--woe-bg);
	border-radius: var(--woe-radius-sm);
	text-align: center;
	font-weight: 600;
	color: var(--woe-primary);
}

.woe-input-select {
	cursor: pointer;
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
}

.woe-input-help {
	font-size: 13px;
	color: var(--woe-text-muted);
	margin: 4px 0 0;
}

/* ==========================================================================
   Summary Panel
   ========================================================================== */
.woe-summary-panel {
	background: var(--woe-card-bg);
	border-radius: var(--woe-radius);
	padding: 24px;
	margin-bottom: 24px;
	box-shadow: var(--woe-shadow);
}

.woe-summary-title {
	font-size: 18px;
	font-weight: 700;
	color: var(--woe-text);
	margin: 0 0 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--woe-border);
}

.woe-summary-content {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.woe-summary-selections {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.woe-summary-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px dashed var(--woe-border);
}

.woe-summary-row:last-child {
	border-bottom: none;
}

.woe-summary-label {
	color: var(--woe-text-muted);
	font-size: 14px;
}

.woe-summary-value {
	font-weight: 600;
	color: var(--woe-text);
}

.woe-summary-pricing {
	padding-top: 16px;
	border-top: 2px solid var(--woe-border);
}

.woe-price-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
}

.woe-price-total {
	padding-top: 12px;
}

.woe-price-total .woe-price-label {
	font-size: 18px;
	font-weight: 700;
	color: var(--woe-text);
}

.woe-price-total .woe-price-value {
	font-size: 24px;
	font-weight: 700;
	color: var(--woe-primary);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.woe-navigation {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.woe-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 28px;
	font-size: 16px;
	font-weight: 600;
	border: none;
	border-radius: var(--woe-radius-sm);
	cursor: pointer;
	transition: all var(--woe-transition);
}

.woe-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.woe-btn-prev {
	background: var(--woe-bg);
	color: var(--woe-text-muted);
	border: 2px solid var(--woe-border);
}

.woe-btn-prev:not(:disabled):hover {
	background: var(--woe-border);
	color: var(--woe-text);
}

.woe-btn-next {
	background: var(--woe-primary);
	color: #fff;
	margin-left: auto;
}

.woe-btn-next:not(:disabled):hover {
	background: var(--woe-primary-hover);
	transform: translateY(-2px);
	box-shadow: var(--woe-shadow-lg);
}

.woe-btn-submit {
	background: linear-gradient(135deg, var(--woe-success), #16a34a);
	color: #fff;
	margin-left: auto;
}

.woe-btn-submit:not(:disabled):hover {
	transform: translateY(-2px);
	box-shadow: var(--woe-shadow-lg);
}

.woe-btn-icon {
	font-size: 18px;
}

/* ==========================================================================
   Loading Overlay
   ========================================================================== */
.woe-loading-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.9);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	z-index: 1000;
	border-radius: var(--woe-radius);
}

.woe-spinner {
	width: 48px;
	height: 48px;
	border: 4px solid var(--woe-border);
	border-top-color: var(--woe-primary);
	border-radius: 50%;
	animation: woe-spin 0.8s linear infinite;
}

@keyframes woe-spin {
	to {
		transform: rotate(360deg);
	}
}

.woe-loading-overlay span {
	font-size: 16px;
	color: var(--woe-text-muted);
}

/* ==========================================================================
   Notifications
   ========================================================================== */
.woe-notification {
	position: fixed;
	bottom: 24px;
	right: 24px;
	padding: 16px 24px;
	border-radius: var(--woe-radius-sm);
	font-size: 15px;
	font-weight: 500;
	box-shadow: var(--woe-shadow-lg);
	z-index: 10000;
	animation: woe-slide-in 0.3s ease;
}

@keyframes woe-slide-in {
	from {
		transform: translateX(100%);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

.woe-notification-success {
	background: var(--woe-success);
	color: #fff;
}

.woe-notification-error {
	background: var(--woe-error);
	color: #fff;
}

.woe-notification-info {
	background: var(--woe-primary);
	color: #fff;
}

/* ==========================================================================
   Animations
   ========================================================================== */
.woe-shake {
	animation: woe-shake 0.5s ease;
}

@keyframes woe-shake {
	0%, 100% { transform: translateX(0); }
	20%, 60% { transform: translateX(-10px); }
	40%, 80% { transform: translateX(10px); }
}

/* ==========================================================================
   Theme: Dark
   ========================================================================== */
.woe-theme-dark {
	--woe-bg: #1e293b;
	--woe-card-bg: #334155;
	--woe-border: #475569;
	--woe-text: #f1f5f9;
	--woe-text-muted: #94a3b8;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 767px) {
	.woe-configurator {
		padding: 16px;
	}

	.woe-step {
		padding: 20px;
	}

	.woe-step-header .woe-step-title {
		font-size: 20px;
	}

	.woe-options-single,
	.woe-options-multiple {
		grid-template-columns: 1fr;
	}

	.woe-navigation {
		flex-direction: column;
	}

	.woe-btn {
		width: 100%;
		justify-content: center;
	}

	.woe-btn-next,
	.woe-btn-submit {
		margin-left: 0;
	}

	.woe-notification {
		left: 16px;
		right: 16px;
		bottom: 16px;
	}
}

/* ==========================================================================
   Product Filters
   ========================================================================== */
.woe-product-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	padding: 16px 20px;
	margin-bottom: 20px;
	background: var(--woe-card-bg);
	border: 1px solid var(--woe-border);
	border-radius: var(--woe-radius-sm);
	align-items: flex-end;
}

.woe-filter-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 150px;
}

.woe-filter-group label {
	font-size: 12px;
	font-weight: 600;
	color: var(--woe-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.woe-filter-group select {
	padding: 8px 32px 8px 12px;
	border: 1px solid var(--woe-border);
	border-radius: var(--woe-radius-sm);
	background: var(--woe-bg);
	font-size: 14px;
	color: var(--woe-text);
	cursor: pointer;
	transition: border-color var(--woe-transition), box-shadow var(--woe-transition);
	appearance: none;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
	background-position: right 8px center;
	background-repeat: no-repeat;
	background-size: 16px;
}

.woe-filter-group select:hover {
	border-color: var(--woe-primary);
}

.woe-filter-group select:focus {
	outline: none;
	border-color: var(--woe-primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.woe-sort-group {
	margin-left: auto;
}

/* Products Grid for WooCommerce */
.woe-products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px;
}

.woe-product-option {
	display: flex;
	flex-direction: column;
	padding: 0;
	overflow: hidden;
}

.woe-product-option .woe-option-image {
	width: 100%;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: var(--woe-radius-sm) var(--woe-radius-sm) 0 0;
}

.woe-product-option .woe-option-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--woe-transition);
}

.woe-product-option:hover .woe-option-image img {
	transform: scale(1.05);
}

.woe-product-option .woe-option-content {
	padding: 12px 16px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.woe-product-option .woe-product-title {
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 4px;
}

.woe-product-option .woe-product-price {
	margin-top: auto;
	padding-top: 8px;
	font-weight: 600;
	color: var(--woe-primary);
}

.woe-no-products {
	text-align: center;
	padding: 40px 20px;
	color: var(--woe-text-muted);
}

@media (max-width: 600px) {
	.woe-product-filters {
		flex-direction: column;
		align-items: stretch;
	}
	
	.woe-filter-group {
		min-width: auto;
	}
	
	.woe-sort-group {
		margin-left: 0;
	}
	
	.woe-products-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
	.woe-navigation,
	.woe-progress-bar,
	.woe-loading-overlay {
		display: none !important;
	}

	.woe-configurator {
		background: none;
		box-shadow: none;
	}

	.woe-step {
		display: block !important;
		page-break-inside: avoid;
	}
}

/* ==========================================================================
   Global Inputs (Project Parameters)
   ========================================================================== */
.woe-global-inputs {
	padding: 20px;
	background: var(--woe-card-bg);
	border-radius: var(--woe-radius);
	box-shadow: var(--woe-shadow);
}

.woe-global-inputs-list {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.woe-global-input-row {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.woe-global-input-label {
	font-size: 16px;
	font-weight: 600;
	color: var(--woe-text);
}

.woe-global-input-field {
	display: flex;
	align-items: center;
	gap: 12px;
}

.woe-global-input {
	flex: 1;
	max-width: 300px;
	padding: 12px 16px;
	font-size: 16px;
	border: 2px solid var(--woe-border);
	border-radius: var(--woe-radius-sm);
	background: var(--woe-card-bg);
	color: var(--woe-text);
	transition: all var(--woe-transition);
}

.woe-global-input:focus {
	outline: none;
	border-color: var(--woe-primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.woe-global-input.woe-input-select {
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 36px;
}

.woe-global-input-field .woe-input-unit {
	font-size: 14px;
	color: var(--woe-text-muted);
	min-width: 40px;
}

.woe-loading-variables {
	text-align: center;
	color: var(--woe-text-muted);
	font-style: italic;
	padding: 20px;
}

@media (min-width: 768px) {
	.woe-global-input-row {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
	
	.woe-global-input-label {
		flex: 0 0 200px;
	}
	
	.woe-global-input-field {
		flex: 1;
	}
}

/* ==========================================================================
   Auto-Resolve Product Selector
   ========================================================================== */
.woe-auto-resolve-container {
	text-align: center;
}

.woe-auto-resolve-product {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 30px;
	background: var(--woe-card-bg);
	border: 3px solid var(--woe-primary);
	border-radius: var(--woe-radius);
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
	max-width: 400px;
	margin: 0 auto 20px;
}

.woe-auto-resolve-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 16px;
	background: linear-gradient(135deg, var(--woe-success), #059669);
	color: white;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-radius: 20px;
	margin-bottom: 20px;
}

.woe-auto-resolve-badge .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.woe-auto-resolve-product .woe-product-image {
	margin-bottom: 15px;
}

.woe-auto-resolve-product .woe-product-image img {
	max-width: 200px;
	height: auto;
	border-radius: var(--woe-radius-sm);
}

.woe-auto-resolve-product .woe-product-title {
	font-size: 20px;
	font-weight: 700;
	color: var(--woe-text);
	margin-bottom: 10px;
}

.woe-auto-resolve-product .woe-option-description {
	font-size: 14px;
	color: var(--woe-text-muted);
	margin-bottom: 15px;
	line-height: 1.5;
}

.woe-auto-resolve-product .woe-product-price {
	font-size: 24px;
	font-weight: 700;
	color: var(--woe-primary);
}

.woe-auto-resolve-change {
	margin: 10px auto;
	padding: 10px 24px;
	font-size: 14px;
	cursor: pointer;
}

.woe-auto-resolve-alternatives {
	margin-top: 20px;
	padding: 20px;
	background: var(--woe-bg);
	border-radius: var(--woe-radius);
}

.woe-auto-resolve-alternatives h4 {
	margin: 0 0 20px;
	font-size: 16px;
	color: var(--woe-text);
}

.woe-auto-resolve-alternatives .woe-products-grid {
	margin-bottom: 15px;
}

.woe-auto-resolve-cancel {
	color: var(--woe-text-muted);
	font-size: 14px;
	cursor: pointer;
}

.woe-recommended-tag {
	position: absolute;
	top: 8px;
	right: 8px;
	padding: 4px 10px;
	background: var(--woe-success);
	color: white;
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	border-radius: 12px;
}

/* ==========================================================================
   Live Shopping List
   ========================================================================== */
.woe-shopping-list {
	position: sticky;
	top: 20px;
	background: var(--woe-card-bg);
	border-radius: var(--woe-radius);
	box-shadow: var(--woe-shadow);
	overflow: hidden;
	max-height: calc(100vh - 100px);
	display: flex;
	flex-direction: column;
}

.woe-shopping-list-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	background: linear-gradient(135deg, var(--woe-primary), #1d4ed8);
	color: white;
}

.woe-shopping-list-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 16px;
	font-weight: 600;
}

.woe-shopping-list-title .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

.woe-shopping-list-count {
	background: rgba(255, 255, 255, 0.2);
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 500;
}

.woe-shopping-list-items {
	flex: 1;
	overflow-y: auto;
	padding: 12px;
}

.woe-shopping-list-empty {
	text-align: center;
	padding: 40px 20px;
	color: var(--woe-text-muted);
}

.woe-shopping-list-empty .dashicons {
	font-size: 48px;
	width: 48px;
	height: 48px;
	margin-bottom: 12px;
	opacity: 0.3;
}

.woe-shopping-list-empty p {
	margin: 0;
	font-size: 14px;
}

.woe-shopping-item {
	position: relative;
	display: flex;
	gap: 12px;
	padding: 12px;
	background: var(--woe-bg);
	border-radius: var(--woe-radius-sm);
	margin-bottom: 8px;
	transition: all var(--woe-transition);
}

.woe-shopping-item:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.woe-shopping-item-badge {
	position: absolute;
	top: -6px;
	left: 8px;
	padding: 2px 8px;
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	border-radius: 8px;
	letter-spacing: 0.3px;
}

.woe-badge-recommended {
	background: linear-gradient(135deg, var(--woe-success), #059669);
	color: white;
}

.woe-badge-selected {
	background: var(--woe-primary);
	color: white;
}

.woe-badge-auto {
	background: #f59e0b;
	color: white;
}

.woe-shopping-item-image {
	flex: 0 0 60px;
	width: 60px;
	height: 60px;
	border-radius: var(--woe-radius-sm);
	overflow: hidden;
	background: white;
}

.woe-shopping-item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.woe-shopping-item-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.woe-shopping-item-name {
	font-size: 14px;
	font-weight: 600;
	color: var(--woe-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.woe-shopping-item-variant {
	font-size: 12px;
	color: var(--woe-text-muted);
}

.woe-shopping-item-qty-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 4px;
}

.woe-shopping-item-qty {
	font-size: 12px;
	color: var(--woe-text-muted);
	background: var(--woe-card-bg);
	padding: 2px 8px;
	border-radius: 4px;
}

.woe-shopping-item-price {
	font-size: 14px;
	font-weight: 700;
	color: var(--woe-primary);
}

.woe-shopping-item-hint {
	font-size: 11px;
	color: var(--woe-text-muted);
	font-style: italic;
	opacity: 0.8;
}

.woe-shopping-item-remove {
	position: absolute;
	top: 8px;
	right: 8px;
	background: none;
	border: none;
	color: var(--woe-text-muted);
	cursor: pointer;
	padding: 4px;
	opacity: 0;
	transition: opacity var(--woe-transition);
}

.woe-shopping-item:hover .woe-shopping-item-remove {
	opacity: 1;
}

.woe-shopping-item-remove:hover {
	color: var(--woe-error);
}

.woe-shopping-list-footer {
	padding: 16px 20px;
	background: var(--woe-bg);
	border-top: 1px solid var(--woe-border);
}

.woe-shopping-list-total {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.woe-total-label {
	font-size: 14px;
	font-weight: 500;
	color: var(--woe-text-muted);
}

.woe-total-value {
	font-size: 24px;
	font-weight: 700;
	color: var(--woe-primary);
}

/* Responsive: mobile - hide sidebar, show floating summary */
@media (max-width: 1024px) {
	.woe-shopping-list {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		top: auto;
		max-height: none;
		border-radius: var(--woe-radius) var(--woe-radius) 0 0;
		z-index: 100;
		transform: translateY(calc(100% - 60px));
		transition: transform 0.3s ease;
	}
	
	.woe-shopping-list.is-expanded {
		transform: translateY(0);
		max-height: 60vh;
	}
	
	.woe-shopping-list-header {
		cursor: pointer;
	}
	
	.woe-shopping-list-items {
		max-height: 40vh;
	}
}

/* ==========================================================================
   WooCommerce Cart Integration - Exploded Cart Badges
   ========================================================================== */
.woe-cart-badge {
	display: inline-block;
	width: 10px;
	height: 10px;
	background: var(--woe-primary, #2563eb);
	border-radius: 50%;
	margin-right: 8px;
	flex-shrink: 0;
}

.woe-cart-badge--recommended {
	background: var(--woe-success, #22c55e);
}

/* WooCommerce cart item styling for configured products */
.woocommerce-cart-form .cart_item:has(.woe-cart-badge) {
	border-left: 3px solid var(--woe-primary, #2563eb);
}

.woocommerce-cart-form .cart_item:has(.woe-cart-badge--recommended) {
	border-left-color: var(--woe-success, #22c55e);
}

/* Configuration label in cart item data */
.woocommerce-cart-form .cart_item .variation dt:contains('Konfiguracja') + dd {
	font-weight: 600;
	color: var(--woe-primary, #2563eb);
}

/* Project grouping visual indicator */
.woocommerce-cart-form .cart_item[data-woe-project] {
	position: relative;
}

.woocommerce-cart-form .cart_item[data-woe-project]::before {
	content: '';
	position: absolute;
	left: -16px;
	top: 0;
	bottom: 0;
	width: 3px;
	background: var(--woe-primary, #2563eb);
	opacity: 0.5;
}
