/**
 * Стили UI-блока: иконка-подсказка
 *
 * @package medexpress-by-fin-code
 */

.me-info-tip {
	position: relative;
	display: inline-flex;
	padding: 0;
	margin: 0;
	border: 0;
	background: none;
	color: var(--primary-color);
	cursor: pointer;
	line-height: 0;
	flex-shrink: 0;
	touch-action: manipulation;
}

.me-info-tip__tooltip {
	position: absolute;
	bottom: calc(100% + 12px);
	right: 0;
	z-index: 5;
	width: 360px;
	max-width: calc(100vw - 32px);
	box-sizing: border-box;
	padding: 20px 24px;
	background: var(--menu-background-color);
	color: var(--font-color);
	font-size: 16px;
	line-height: 1.3;
	font-weight: normal;
	text-align: left;
	white-space: normal;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
	pointer-events: none;
}

@media (min-width: 769px) {
	.me-info-tip:hover .me-info-tip__tooltip,
	.me-info-tip:focus .me-info-tip__tooltip,
	.me-info-tip:focus-visible .me-info-tip__tooltip {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}
}

/* Drawer подсказки (мобилка) — тот же паттерн, что у feedback form */
.me-offcanvas--info-tip {
	justify-content: flex-end;
	align-items: stretch;
}

.me-offcanvas--info-tip .me-offcanvas__backdrop {
	background: rgba(var(--primary-color-rgb), 0.43);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.me-offcanvas--info-tip .me-offcanvas__panel {
	width: 50%;
	max-width: 747px;
	border: none;
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
}

.me-info-tip-drawer__close {
	position: absolute;
	top: 40px;
	right: 40px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	background: none;
	border: none;
	color: var(--font-color);
	cursor: pointer;
}

.me-info-tip-drawer__inner {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	padding: 80px 40px 40px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.me-info-tip-drawer__text {
	margin: 0;
	font-size: 16px;
	line-height: 1.3;
	color: var(--font-color);
}

@media (max-width: 768px) {
	.me-info-tip__tooltip {
		display: none;
	}

	.me-offcanvas--info-tip {
		align-items: flex-end;
	}

	.me-offcanvas--info-tip .me-offcanvas__panel {
		width: 100%;
		max-width: none;
		max-height: calc(100vh - 40px);
		transform: translateY(100%);
	}

	.me-offcanvas.is-open.me-offcanvas--info-tip .me-offcanvas__panel {
		transform: translateY(0);
	}

	.me-offcanvas--info-tip .me-offcanvas__panel {
		touch-action: pan-y;
	}

	.me-info-tip-drawer__close {
		top: 20px;
		right: 16px;
		width: 24px;
		height: 24px;
	}

	.me-info-tip-drawer__inner {
		padding: 56px 16px 32px;
	}
}
