/**
 * OrderGate Flagship Flash — wishlist + compare styles.
 * Reuses the theme's CSS variables (--og-*).
 */

/* ---- Toggle buttons (cards + single product) ---- */

.og-wishlist-btn,
.og-compare-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.5rem 0.75rem;
	font-family: var(--og-font);
	font-size: 0.875rem;
	line-height: 1;
	color: var(--og-muted);
	background: var(--og-bg);
	border: 1px solid var(--og-border);
	border-radius: var(--og-radius);
	cursor: pointer;
	transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.og-wishlist-btn:hover,
.og-compare-btn:hover {
	border-color: var(--og-primary);
	color: var(--og-primary);
}

.og-wishlist-btn.is-active {
	color: #d6242d;
	border-color: #d6242d;
}

.og-wishlist-btn [data-og-wishlist-icon] {
	font-size: 1.125rem;
}

.og-compare-btn.is-active {
	color: var(--og-primary-ink);
	background: var(--og-primary);
	border-color: var(--og-primary);
}

/* ---- Compare tray (fixed bottom bar) ---- */

.og-compare-tray {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 999;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.75rem 1rem;
	background: var(--og-surface);
	border-top: 1px solid var(--og-border);
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
}

.og-compare-tray[hidden] {
	display: none;
}

.og-compare-tray-count {
	font-weight: 700;
	color: var(--og-ink);
}

.og-compare-tray-link {
	flex-shrink: 0;
}

/* ---- Wishlist page list ---- */

.og-wishlist-list {
	list-style: none;
	margin: 0 0 2rem;
	padding: 0;
}

.og-wishlist-row {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem 0;
	border-bottom: 1px solid var(--og-border);
}

.og-wishlist-thumb img {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: var(--og-radius);
}

.og-wishlist-info {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 0;
}

.og-wishlist-name {
	font-weight: 700;
	color: var(--og-ink);
	text-decoration: none;
}

.og-wishlist-name:hover {
	color: var(--og-primary);
}

.og-wishlist-price {
	color: var(--og-primary);
	font-weight: 700;
}

.og-wishlist-actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-shrink: 0;
}

.og-wishlist-remove,
.og-compare-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	color: var(--og-muted);
	background: transparent;
	border: 1px solid var(--og-border);
	border-radius: var(--og-radius);
	cursor: pointer;
}

.og-wishlist-remove:hover,
.og-compare-remove:hover {
	color: var(--og-danger);
	border-color: var(--og-danger);
}

.og-wishlist-empty,
.og-compare-empty {
	text-align: center;
	padding: 3rem 1rem;
	background: var(--og-surface);
	border-radius: var(--og-radius-lg);
}

/* ---- Compare table ---- */

.og-compare-table-wrap {
	overflow-x: auto;
	margin-bottom: 2rem;
	-webkit-overflow-scrolling: touch;
}

.og-compare-table {
	width: 100%;
	min-width: 560px;
	border-collapse: collapse;
	background: var(--og-bg);
}

.og-compare-table th,
.og-compare-table td {
	padding: 0.75rem;
	border: 1px solid var(--og-border);
	vertical-align: top;
	text-align: start;
}

.og-compare-table th[scope="row"] {
	background: var(--og-surface);
	font-weight: 700;
	color: var(--og-ink);
	white-space: nowrap;
}

.og-compare-cell-image img {
	max-width: 120px;
	height: auto;
	border-radius: var(--og-radius);
}

.og-compare-cell-name {
	font-weight: 700;
	color: var(--og-ink);
	text-decoration: none;
}

.og-compare-cell-name:hover {
	color: var(--og-primary);
}

.og-compare-row-price td {
	color: var(--og-primary);
	font-weight: 700;
}

.og-compare-stock.is-in {
	color: var(--og-success);
	font-weight: 700;
}

.og-compare-stock.is-out {
	color: var(--og-danger);
	font-weight: 700;
}

/* ---- Toast ---- */

.og-toast {
	position: fixed;
	inset-inline: 0;
	bottom: 4.5rem;
	z-index: 1000;
	width: max-content;
	max-width: min(90vw, 420px);
	margin-inline: auto;
	padding: 0.75rem 1.25rem;
	color: var(--og-primary-ink);
	background: var(--og-ink);
	border-radius: var(--og-radius);
	box-shadow: var(--og-shadow);
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.2s ease, transform 0.2s ease;
	pointer-events: none;
}

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