/* ═══════════════════════════════════════
   FOCUS STATES — снимаем дефолтную браузерную обводку при клике мышью,
   возвращаем зелёную обводку через :focus-visible для клавиатурного фокуса.
   ═══════════════════════════════════════ */
.exp-tour-card-compare:focus,
.exp-compare-col-remove:focus,
.exp-compare-clear-all:focus,
.exp-compare-bar-clear:focus,
.exp-compare-link:focus,
.wpbar-item.exp-compare-trigger:focus {
	outline: none;
}

.exp-tour-card-compare:focus-visible,
.exp-compare-col-remove:focus-visible,
.exp-compare-clear-all:focus-visible,
.exp-compare-bar-clear:focus-visible,
.exp-compare-link:focus-visible {
	outline: 2px solid #1d9e75;
	outline-offset: 2px;
}

.wpbar-item.exp-compare-trigger:focus-visible {
	outline: 2px solid #1d9e75;
	outline-offset: -2px;
	border-radius: 8px;
}

/* Кнопка «В сравнение» на карточке — круг 40×40, overlay-чек при .is-active */
.exp-tour-card-compare {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 5;
	width: 40px;
	height: 40px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.65);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	color: #1f2937;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, backdrop-filter .15s ease;
	-webkit-tap-highlight-color: transparent;
}
.exp-tour-card-compare::before {
	content: '';
	position: absolute;
	inset: -6px;
	border-radius: 50%;
}
.exp-tour-card-compare:hover {
	background: #ffffff;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	transform: scale(1.06);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.24);
}
.exp-tour-card-compare:active {
	transform: scale(0.95);
}
.exp-tour-card-compare-icon {
	width: 22px;
	height: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #1f2937;
	transition: color .15s ease;
}
.exp-tour-card-compare-icon svg {
	width: 100%;
	height: 100%;
	display: block;
}
.exp-tour-card-compare-label {
	display: none;
}
.exp-tour-card-compare::after {
	content: '';
	position: absolute;
	top: -3px;
	right: -3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #16a34a;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12l4 4 10-10'/></svg>");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 11px 11px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transform: scale(0);
	transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1);
	pointer-events: none;
}
.exp-tour-card-compare.is-active::after {
	transform: scale(1);
}
.exp-tour-card-compare.is-active {
	background: rgba(255, 255, 255, 0.85);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}
.exp-tour-card-compare.is-active:hover {
	background: #ffffff;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}
.exp-tour-card-compare.is-active .exp-tour-card-compare-icon {
	color: #1f2937;
}

/* Плавающая панель */
.exp-compare-bar {
	position: fixed;
	left: 50%;
	bottom: 20px;
	transform: translateX(-50%);
	z-index: 9999;
	max-width: calc(100vw - 24px);
	padding-bottom: env(safe-area-inset-bottom, 0);
	animation: expCompareBarIn .25s ease;
}
.exp-compare-bar[hidden] { display: none; }

@keyframes expCompareBarIn {
	from { opacity: 0; transform: translate(-50%, 12px); }
	to   { opacity: 1; transform: translate(-50%, 0); }
}

.exp-compare-bar-inner {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 12px 10px 16px;
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 14px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
	font-size: 14px;
}

.exp-compare-dots {
	display: flex;
	gap: 5px;
}
.exp-compare-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #e5e7eb;
	transition: background-color .15s ease;
}
.exp-compare-dot.is-filled { background: #1d9e75; }

.exp-compare-count {
	font-weight: 600;
	color: #111;
	white-space: nowrap;
}

.exp-compare-link {
	display: inline-flex;
	align-items: center;
	padding: 7px 14px;
	background: #1d9e75;
	color: #fff !important;
	text-decoration: none !important;
	border-radius: 8px;
	font-weight: 600;
	font-size: 13px;
	line-height: 1;
	transition: background-color .15s ease;
}
.exp-compare-link:hover { background: #178561; }
.exp-compare-link.is-disabled {
	background: #9ca3af;
	cursor: not-allowed;
	pointer-events: none;
}

.exp-compare-bar-clear {
	background: transparent;
	border: 0;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	color: #6b7280;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
	padding: 0;
}
.exp-compare-bar-clear:hover {
	background: #f3f4f6;
	color: #111;
}

@media (max-width: 480px) {
	.exp-compare-bar { left: 12px; right: 12px; bottom: 12px; transform: none; }
	.exp-compare-bar-inner { gap: 10px; padding: 10px 8px 10px 12px; }
	.exp-compare-link { padding: 7px 10px; font-size: 12px; }
	.exp-compare-count { font-size: 13px; }
}

.exp-compare-hint {
	position: fixed;
	left: 50%;
	bottom: 80px;
	transform: translateX(-50%);
	z-index: 10000;
	padding: 10px 16px;
	background: #111;
	color: #fff;
	font-size: 13px;
	font-weight: 500;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.25);
	opacity: 1;
	transition: opacity .5s ease;
	pointer-events: none;
}
.exp-compare-hint.is-fading { opacity: 0; }

@media (max-width: 480px) {
	.exp-compare-hint { bottom: 90px; max-width: calc(100vw - 32px); text-align: center; }
}

/* Интеграция в WPBar */
.wpbar-item.exp-compare-trigger .wpbar-item__counter.exp-compare-counter {
	background: #ef4444;
	color: #fff;
	font-weight: 700;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	font-size: 11px;
	line-height: 18px;
	text-align: center;
	box-shadow: 0 0 0 2px var(--wpbar-bg, #fff);
}

.wpbar-item.exp-compare-trigger.has-items .wpbar-item__counter.exp-compare-counter {
	animation: expCompareCounterPop .35s ease;
}
@keyframes expCompareCounterPop {
	0%   { transform: scale(.6); opacity: 0; }
	60%  { transform: scale(1.15); opacity: 1; }
	100% { transform: scale(1); }
}

.wpbar-item.exp-compare-trigger.is-empty .wpbar-item__icon { opacity: .7; }
.wpbar-item.exp-compare-trigger.is-empty:hover .wpbar-item__icon { opacity: 1; }

.wpbar-item.exp-compare-trigger.is-too-few .wpbar-item__icon {
	opacity: .5;
}
.wpbar-item.exp-compare-trigger.is-too-few:hover .wpbar-item__icon {
	opacity: .7;
}

.wpbar-item.exp-compare-trigger.is-on-compare {
	cursor: not-allowed;
}
.wpbar-item.exp-compare-trigger.is-on-compare .wpbar-item__icon {
	opacity: .35;
	filter: grayscale(.5);
}
.wpbar-item.exp-compare-trigger.is-on-compare:hover .wpbar-item__icon {
	opacity: .35;
}
.wpbar-item.exp-compare-trigger.is-on-compare .wpbar-item__counter {
	opacity: .6;
}

.exp-compare-bar[data-superseded="wpbar"] { display: none !important; }
