/* ==========================================================================
   PRODUCT COMPARE POPUP PLUGIN STYLES
   ========================================================================== */

/* Floating Bar Container */
.poliflex-compare-floating-bar {
	position: fixed;
	bottom: 30px;
	right: 30px;
	z-index: 9990;
	display: flex;
	align-items: center;
	gap: 12px;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	padding: 10px 16px;
	border-radius: 50px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.poliflex-compare-floating-bar .poliflex-compare-toggle-btn,
.poliflex-compare-toggle-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background-color: var(--site-accent-color, #9e3929);
	color: #FFFFFF !important;
	border: none;
	padding: 10px 20px;
	border-radius: 30px;
	font-family: var(--site-main-font, 'Outfit', sans-serif);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.25s ease;
	position: relative;
	line-height: 1.2;
}

.poliflex-compare-floating-bar .poliflex-compare-toggle-btn:hover,
.poliflex-compare-toggle-btn:hover {
	background-color: var(--site-heading-color, #181818);
	color: #FFFFFF !important;
	transform: translateY(-1px);
}

.poliflex-compare-floating-bar .poliflex-compare-toggle-btn.active,
.poliflex-compare-toggle-btn.active {
	background-color: var(--site-heading-color, #181818);
	color: #FFFFFF !important;
}

.poliflex-compare-toggle-btn .badge-count {
	background-color: #FFFFFF;
	color: var(--site-accent-color, #9e3929);
	font-size: 12px;
	font-weight: 800;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-left: 4px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.poliflex-compare-floating-bar .poliflex-compare-action-btn,
.poliflex-compare-action-btn {
	display: inline-flex;
	align-items: center;
	background-color: #E2E8F0;
	color: #A0AEC0 !important;
	border: none;
	padding: 10px 22px;
	border-radius: 30px;
	font-family: var(--site-main-font, 'Outfit', sans-serif);
	font-size: 14px;
	font-weight: 600;
	cursor: not-allowed;
	transition: all 0.25s ease;
	line-height: 1.2;
}

.poliflex-compare-floating-bar .poliflex-compare-action-btn.ready,
.poliflex-compare-action-btn.ready {
	background-color: #22C55E;
	color: #FFFFFF !important;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}

.poliflex-compare-floating-bar .poliflex-compare-action-btn.ready:hover,
.poliflex-compare-action-btn.ready:hover {
	background-color: #16A34A;
	color: #FFFFFF !important;
	transform: translateY(-1px);
}

/* Card Checkbox Overlay */
ul.products-grid li.product_item,
.woocommerce ul.products li.product {
	position: relative;
}

.poliflex-compare-checkbox-wrapper {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 25;
}

.poliflex-compare-checkbox-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(4px);
	padding: 6px 12px;
	border-radius: 20px;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
	border: 1px solid var(--site-accent-color, #9e3929);
	user-select: none;
	transition: all 0.2s ease;
}

.poliflex-compare-checkbox-label:hover {
	transform: scale(1.03);
}

.poliflex-compare-checkbox {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.poliflex-compare-checkbox-label .checkbox-custom {
	width: 16px;
	height: 16px;
	border: 2px solid var(--site-accent-color, #9e3929);
	border-radius: 4px;
	display: inline-block;
	position: relative;
	transition: background-color 0.2s ease;
}

.poliflex-compare-checkbox:checked + .checkbox-custom {
	background-color: var(--site-accent-color, #9e3929);
}

.poliflex-compare-checkbox:checked + .checkbox-custom::after {
	content: '';
	position: absolute;
	left: 4px;
	top: 1px;
	width: 4px;
	height: 8px;
	border: solid #FFFFFF;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.poliflex-compare-checkbox-label .checkbox-text {
	font-size: 12px;
	font-weight: 700;
	color: var(--site-heading-color, #181818);
}

li.product_item.is-selected-for-compare,
.woocommerce ul.products li.product.is-selected-for-compare {
	outline: 2px solid var(--site-accent-color, #9e3929);
	outline-offset: 2px;
	border-radius: 8px;
}

/* Modal Popup Overlay */
.poliflex-compare-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.poliflex-compare-modal-container {
	background: #FFFFFF;
	width: 100%;
	max-width: 1100px;
	max-height: 90vh;
	border-radius: 16px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
	from {
		opacity: 0;
		transform: translateY(20px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.poliflex-compare-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 30px;
	border-bottom: 1px solid #E2E8F0;
	background: #F8FAFC;
}

.poliflex-compare-modal-title {
	font-family: var(--site-main-font, 'Outfit', sans-serif);
	font-size: 22px;
	font-weight: 700;
	color: var(--site-heading-color, #181818);
	margin: 0;
}

.poliflex-compare-modal-close {
	background: transparent;
	border: none;
	font-size: 28px;
	line-height: 1;
	color: #64748B;
	cursor: pointer;
	padding: 0 8px;
	border-radius: 6px;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.poliflex-compare-modal-close:hover {
	color: #EF4444;
	background-color: #F1F5F9;
}

.poliflex-compare-modal-body {
	padding: 30px;
	overflow-y: auto;
	flex: 1;
}

.poliflex-compare-table-wrapper {
	overflow-x: auto;
}

/* Comparison Table */
.poliflex-compare-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	text-align: center;
}

.poliflex-compare-table th,
.poliflex-compare-table td {
	padding: 16px;
	border-bottom: 1px solid #E2E8F0;
	vertical-align: middle;
	font-family: var(--site-main-font, 'Outfit', sans-serif);
	font-size: 14px;
	color: #334155;
}

.poliflex-compare-table th.feature-col,
.poliflex-compare-table td.feature-col {
	text-align: left;
	width: 180px;
	min-width: 160px;
	background-color: #F8FAFC;
	position: sticky;
	left: 0;
	z-index: 2;
	border-right: 2px solid #E2E8F0;
}

.poliflex-compare-table th.product-col,
.poliflex-compare-table td.product-col {
	min-width: 220px;
	position: relative;
}

.poliflex-compare-table th.product-col {
	padding-top: 25px;
	background: #FFFFFF;
}

.remove-compare-item {
	position: absolute;
	top: 4px;
	right: 4px;
	background: #F1F5F9;
	color: #64748B;
	border: none;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}

.remove-compare-item:hover {
	background: #EF4444;
	color: #FFFFFF;
}

.compare-thumb {
	width: 100px;
	height: 100px;
	object-fit: cover;
	border-radius: 8px;
	margin-bottom: 10px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.compare-product-title {
	display: block;
	font-weight: 600;
	font-size: 15px;
	color: var(--site-heading-color, #181818);
	text-decoration: none;
	line-height: 1.3;
}

.compare-product-title:hover {
	color: var(--site-accent-color, #9e3929);
}

.compare-price-cell {
	font-size: 18px;
	font-weight: 700;
	color: var(--site-accent-color, #9e3929);
}

.compare-badge {
	background: #F1F5F9;
	padding: 4px 10px;
	border-radius: 12px;
	font-weight: 600;
	color: #0F172A;
}

.poliflex-compare-table tr.action-row td {
	padding-top: 24px;
	border-bottom: none;
}

.compare-action-cell .button,
.compare-action-cell a.button,
.compare-action-cell button {
	display: inline-block;
	width: 100%;
	background-color: var(--site-accent-color, #9e3929);
	color: #FFFFFF !important;
	padding: 12px 18px;
	border-radius: 25px;
	font-weight: 600;
	font-size: 13px;
	text-transform: uppercase;
	text-decoration: none;
	border: none;
	box-shadow: 0 4px 12px rgba(158, 57, 41, 0.25);
	transition: all 0.2s ease;
}

.compare-action-cell .button:hover,
.compare-action-cell a.button:hover,
.compare-action-cell button:hover {
	background-color: var(--site-heading-color, #181818);
	box-shadow: none;
}

/* Responsive adjustment */
@media (max-width: 768px) {
	.poliflex-compare-floating-bar {
		bottom: 20px;
		right: 15px;
		left: 15px;
		justify-content: center;
	}
	.poliflex-compare-modal-container {
		max-height: 95vh;
	}
	.poliflex-compare-modal-body {
		padding: 15px;
	}
}
