/* Корзина экскурсий (cart.js) на карточках и в калькуляторе программы: плюсик на значке, подсказка при наведении,
   сообщение после добавления. Сами квадратные кнопки - .excard-cartbtn в site.css и .exd-cart-btn в excursion-details.css */

/* #region Плюсик на значке: «положить», после добавления его сменяет галочка .excard-cartbtn-check / .exd-cart-check */
.cart-ico {
	position: relative;
	display: inline-flex;
}

.cart-plus {
	position: absolute;
	right: -7px;
	top: -6px;
	width: 16px;
	height: 16px;
	box-sizing: border-box;
	border-radius: 50%;
	border: 2px solid #eaf4fe;
	background: #008ef1;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}

.is-in .cart-plus {
	display: none;
}
/* #endregion */

/* #region Подсказка при наведении: только мышью, на телефоне объясняет попап новой функции (feature-hint.js) */
.cart-tip {
	display: none;
}

@media (hover: hover) and (pointer: fine) {
	.cart-tip {
		display: block;
		position: absolute;
		right: -4px;
		bottom: calc(100% + 10px);
		z-index: 6;
		width: 236px;
		padding: 9px 12px;
		border-radius: 10px;
		background: #0f172a;
		color: #cbd5e1;
		font: 600 13px/1.4 Manrope, 'Manrope Fallback', sans-serif;
		text-align: left;
		white-space: normal;
		box-shadow: 0 10px 30px rgba(15, 23, 42, .3);
		opacity: 0;
		transform: translateY(4px);
		pointer-events: none;
		transition: opacity .15s ease, transform .15s ease;
	}

		.cart-tip b {
			display: block;
			margin-bottom: 1px;
			color: #fff;
			font-size: 14px;
			font-weight: 800;
		}

		.cart-tip::after {
			content: "";
			position: absolute;
			right: 20px;
			top: 100%;
			border: 6px solid transparent;
			border-top-color: #0f172a;
		}

	:hover > .cart-tip, :focus-visible > .cart-tip {
		opacity: 1;
		transform: none;
		transition-delay: .12s;
	}

	.cart-tip-in, .is-in > .cart-tip .cart-tip-add {
		display: none;
	}

	.is-in > .cart-tip .cart-tip-in {
		display: block;
	}
}
/* #endregion */

/* #region Сообщение после добавления (Cart.showToast) - в стиле тоста подборок .pl-toast */
.cart-toast {
	position: fixed;
	left: 50%;
	bottom: 26px;
	transform: translateX(-50%);
	z-index: 100002;
	display: flex;
	align-items: center;
	gap: 14px;
	width: max-content;
	max-width: min(620px, calc(100vw - 24px));
	padding: 12px 12px 12px 16px;
	border-radius: 14px;
	background: #0f172a;
	color: #fff;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 24px 50px -16px rgba(15, 23, 42, .7);
	font-family: Manrope, 'Manrope Fallback', sans-serif;
	animation: cartToastIn .2s ease-out;
}

	.cart-toast[hidden] {
		display: none;
	}

	.cart-toast > svg {
		flex: none;
		color: #6ee7b7;
	}

.cart-toast-body {
	min-width: 0;
}

.cart-toast-text {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
}

.cart-toast-sub {
	margin-top: 2px;
	font-size: 12.5px;
	font-weight: 600;
	color: #94a3b8;
}

.cart-toast-action {
	flex: none;
	min-height: 40px;
	padding: 0 14px;
	border: 0;
	border-radius: 10px;
	background: rgba(255, 255, 255, .12);
	color: #7cc4ff;
	font: 800 13.5px Manrope, 'Manrope Fallback', sans-serif;
	white-space: nowrap;
	cursor: pointer;
	transition: background .15s ease;
}

	.cart-toast-action:hover {
		background: rgba(255, 255, 255, .2);
	}

@keyframes cartToastIn {
	from { opacity: 0; transform: translate(-50%, 8px); }
	to { opacity: 1; transform: translateX(-50%); }
}

@keyframes cartToastUp {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}

/* на телефоне во всю ширину над нижним меню, как тост подборок; кнопка отдельной строкой, иначе текст сжимается в столбик */
@media (max-width: 575.98px) {
	.cart-toast {
		left: 12px;
		right: 12px;
		width: auto;
		max-width: none;
		transform: none;
		bottom: calc(88px + env(safe-area-inset-bottom));
		flex-wrap: wrap;
		align-items: flex-start;
		gap: 10px 12px;
		padding: 14px;
		animation-name: cartToastUp;
	}

	.cart-toast-body {
		flex: 1 1 0;
	}

	.cart-toast-action {
		flex: 1 0 100%;
		min-height: 44px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cart-toast {
		animation: none;
	}
}
/* #endregion */
