/* Atomic Elements – Product Compare (storefront) */

.atomel-cmp-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	background: transparent;
	border: 1px solid currentColor;
	border-radius: 4px;
	padding: 6px 12px;
	font-size: 13px;
	line-height: 1.2;
	color: inherit;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.atomel-cmp-btn:hover,
.atomel-cmp-btn.is-active {
	color: #2563eb;
	border-color: #2563eb;
}

.atomel-cmp-btn.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

.atomel-cmp-btn__icon {
	display: inline-flex;
	align-items: center;
}

.atomel-cmp-image-wrap {
	position: absolute;
	top: 10px;
	right: 56px;
	z-index: 3;
}

.atomel-cmp-btn--image {
	width: 38px;
	height: 38px;
	padding: 0;
	justify-content: center;
	border-radius: 50%;
	border-color: transparent;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	color: #333;
}

.atomel-cmp-btn--image .atomel-cmp-btn__label {
	display: none;
}

/* Floating bar */
.atomel-cmp-bar {
	position: fixed;
	left: 50%;
	bottom: -80px;
	transform: translateX(-50%);
	z-index: 9998;
	display: flex;
	align-items: center;
	gap: 14px;
	background: #0f172a;
	color: #fff;
	padding: 12px 18px;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
	transition: bottom 0.25s ease;
	max-width: calc(100% - 32px);
}

.atomel-cmp-bar.is-visible {
	bottom: 20px;
}

.atomel-cmp-bar__label {
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.atomel-cmp-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: #2563eb;
	font-size: 12px;
}

.atomel-cmp-bar__view {
	background: #2563eb;
	color: #fff;
	border: 0;
	border-radius: 6px;
	padding: 8px 14px;
	cursor: pointer;
	font-size: 13px;
}

.atomel-cmp-bar__clear {
	background: transparent;
	border: 0;
	color: #cbd5e1;
	cursor: pointer;
	font-size: 13px;
	text-decoration: underline;
}

/* Modal */
.atomel-cmp-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
}

.atomel-cmp-modal.is-open {
	display: block;
}

.atomel-cmp-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.6);
}

.atomel-cmp-modal__dialog {
	position: relative;
	margin: 4vh auto;
	max-width: 1100px;
	width: calc(100% - 32px);
	max-height: 92vh;
	overflow: auto;
	background: #fff;
	border-radius: 12px;
	padding: 28px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.atomel-cmp-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid #e2e8f0;
	background: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

/* Table */
.atomel-cmp-table {
	width: 100%;
	border-collapse: collapse;
}

.atomel-cmp-table th,
.atomel-cmp-table td {
	border: 1px solid #eef2f7;
	padding: 12px;
	text-align: left;
	vertical-align: top;
	min-width: 160px;
}

.atomel-cmp-table th {
	background: #f8fafc;
	font-weight: 600;
	width: 140px;
	white-space: nowrap;
}

.atomel-cmp-table img {
	max-width: 120px;
	height: auto;
}

.atomel-cmp-remove {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 1px solid #ddd;
	background: #fff;
	color: #dc2626;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

.atomel-cmp-instock {
	color: #16a34a;
}

.atomel-cmp-outstock {
	color: #dc2626;
}

.atomel-cmp-empty {
	padding: 20px 0;
	color: #64748b;
}

.atomel-cmp-toast {
	position: fixed;
	top: 24px;
	right: 24px;
	z-index: 100000;
	background: #0f172a;
	color: #fff;
	padding: 12px 18px;
	border-radius: 8px;
	font-size: 14px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity 0.2s ease, transform 0.2s ease;
	pointer-events: none;
}

.atomel-cmp-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.rtl .atomel-cmp-image-wrap {
	right: auto;
	left: 56px;
}

.rtl .atomel-cmp-table th,
.rtl .atomel-cmp-table td {
	text-align: right;
}
