/* OM Compare v1.0.0 — all selectors .omc- prefixed to avoid theme bleed. */

:root { --omc-accent: #273A60; }

/* ---------- card toggle ---------- */
.omc-host { position: relative; }

.omc-toggle {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	background: #fff !important;              /* Astra-proof */
	border: 1px solid #c9cdd6;
	border-radius: 20px;
	font-size: 11.5px;
	font-weight: 600;
	color: #3a4256 !important;
	line-height: 1;
	cursor: pointer;
	user-select: none;
	box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.omc-toggle .omc-box {
	width: 13px;
	height: 13px;
	border: 1.5px solid #9aa2b4;
	border-radius: 3px;
	background: #fff;
	flex: 0 0 auto;
	position: relative;
}
.omc-toggle.omc-on {
	background: var(--omc-accent) !important;
	border-color: var(--omc-accent);
	color: #fff !important;
}
.omc-toggle.omc-on .omc-box {
	background: #fff;
	border-color: #fff;
}
.omc-toggle.omc-on .omc-box::after {
	content: "";
	position: absolute;
	left: 3px;
	top: 0px;
	width: 4px;
	height: 8px;
	border: solid var(--omc-accent);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
.omc-toggle.omc-dim {
	opacity: .35;
	pointer-events: none;
}
.omc-toggle:focus-visible {
	outline: 2px solid var(--omc-accent);
	outline-offset: 2px;
}

/* ---------- tray ---------- */
.omc-tray {
	position: fixed;
	left: 50%;
	bottom: 14px;
	transform: translate(-50%, 120%);
	z-index: 99998;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	width: min(920px, calc(100vw - 24px));
	padding: 10px 14px;
	background: var(--omc-accent);
	border-radius: 12px;
	box-shadow: 0 6px 24px rgba(0,0,0,.28);
	color: #fff;
}
.omc-tray-visible { transform: translate(-50%, 0); }

.omc-tray-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.omc-count { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.omc-lock {
	font-size: 11px;
	font-weight: 600;
	background: rgba(255,255,255,.14);
	padding: 3px 9px;
	border-radius: 20px;
	white-space: nowrap;
}
.omc-lock:empty { display: none; }
.omc-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.omc-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: rgba(255,255,255,.16);
	color: #fff;
	font-size: 11.5px;
	padding: 3px 6px 3px 10px;
	border-radius: 20px;
	white-space: nowrap;
}
.omc-chip-x {
	background: none !important;
	border: none !important;
	color: #fff !important;
	font-size: 14px;
	line-height: 1;
	padding: 0 3px !important;
	cursor: pointer;
	opacity: .85;
}
.omc-chip-x:hover { opacity: 1; }

.omc-tray-right { display: flex; gap: 8px; }
.omc-btn {
	border-radius: 8px;
	padding: 8px 16px !important;
	font-size: 13px !important;
	font-weight: 600;
	cursor: pointer;
	line-height: 1.1;
}
.omc-clear {
	background: transparent !important;
	color: rgba(255,255,255,.85) !important;
	border: 1px solid rgba(255,255,255,.35) !important;
}
.omc-go {
	background: #fff !important;
	color: var(--omc-accent) !important;
	border: none !important;
}
.omc-go:disabled { opacity: .55; cursor: not-allowed; }

.omc-hint {
	flex-basis: 100%;
	font-size: 12px;
	color: #ffd9a0;
	max-height: 0;
	overflow: hidden;
}
.omc-hint-on { max-height: 3em; padding-top: 4px; }

/* ---------- modal ---------- */
.omc-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(15, 20, 34, .55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
body.omc-noscroll { overflow: hidden; }

.omc-modal-card {
	background: #fff;
	border-radius: 14px;
	width: min(980px, 100%);
	max-height: min(86vh, 900px);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: 0 18px 60px rgba(0,0,0,.35);
}
.omc-modal-head {
	background: var(--omc-accent);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	font-size: 14px;
	font-weight: 600;
}
.omc-close {
	background: transparent !important;
	border: none !important;
	color: #fff !important;
	font-size: 22px !important;
	padding: 0 4px !important;
	cursor: pointer;
	line-height: 1;
}
.omc-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.omc-scroll { overflow: auto; -webkit-overflow-scrolling: touch; }

.omc-table {
	border-collapse: collapse;
	width: 100%;
	min-width: 560px;               /* forces horizontal scroll on phones */
	font-size: 12.5px;
}
.omc-table th, .omc-table td {
	padding: 10px 12px;
	border-bottom: 1px solid #e6e8ee;
	text-align: center;
	vertical-align: middle;
	color: #1e2433;
}
.omc-table td.omc-sticky, .omc-table th.omc-sticky {
	position: sticky;
	left: 0;
	background: #fff;
	text-align: left;
	font-weight: 500;
	color: #5a6172;
	min-width: 120px;
	max-width: 170px;
	z-index: 2;
	box-shadow: 1px 0 0 #e6e8ee;
}
.omc-col-head { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.omc-col-head img { max-height: 56px; max-width: 110px; object-fit: contain; }
.omc-col-head span { font-weight: 600; font-size: 13px; line-height: 1.25; }

.omc-grouprow td {
	background: #f3f5f9;
	text-align: left;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--omc-accent);
}
.omc-same td { color: #9aa0ae; }
.omc-same td.omc-sticky { color: #9aa0ae; }
.omc-table tbody tr:nth-child(even):not(.omc-grouprow) td { background: #fafbfd; }
.omc-table tbody tr:nth-child(even):not(.omc-grouprow) td.omc-sticky { background: #fafbfd; }

.omc-modal-foot {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	padding: 10px 16px;
	border-top: 1px solid #e6e8ee;
}
.omc-view {
	background: var(--omc-accent) !important;
	color: #fff !important;
	border: none !important;
	text-decoration: none !important;
	display: inline-block;
}

/* ---------- motion & mobile ---------- */
@media (prefers-reduced-motion: no-preference) {
	.omc-tray { transition: transform .28s ease; }
	.omc-toggle { transition: background .15s ease, color .15s ease, opacity .2s ease; }
	.omc-hint { transition: max-height .2s ease, padding .2s ease; }
}

@media (max-width: 600px) {
	.omc-tray { padding: 9px 10px; gap: 8px; }
	.omc-count { font-size: 12.5px; }
	.omc-chips { display: none; }           /* names crowd small screens; count + lock suffice */
	.omc-btn { padding: 7px 12px !important; font-size: 12px !important; }
	.omc-modal { padding: 8px; }
	.omc-modal-card { max-height: 92vh; }
	.omc-table td.omc-sticky, .omc-table th.omc-sticky { min-width: 96px; max-width: 120px; }
}
