/*
 * RESUSMED Avatar Help System - icon launcher + clean transparent avatar.
 * Frontend scope is intentionally limited to .rsm-ah-widget so the plugin does
 * not modify Slider Revolution, Elementor, WooCommerce, menus or page layout.
 */

.rsm-ah-widget {
	--rsm-ah-navy: #102743;
	--rsm-ah-navy-dark: #0b1f36;
	--rsm-ah-white: #ffffff;
	font-family: inherit;
	box-sizing: border-box;
	contain: layout style;
}

.rsm-ah-widget,
.rsm-ah-widget *,
.rsm-ah-widget *::before,
.rsm-ah-widget *::after {
	box-sizing: border-box;
}

.rsm-ah-position-floating.rsm-ah-auto-context,
.rsm-ah-position-floating:not(.rsm-ah-auto-context),
.rsm-ah-position-compact.rsm-ah-auto-context {
	position: fixed;
	left: 22px;
	right: auto;
	bottom: 22px;
	z-index: 99980;
}

.rsm-ah-position-inline,
.rsm-ah-position-button,
.rsm-ah-position-card,
.rsm-ah-position-compact:not(.rsm-ah-auto-context) {
	position: relative;
	display: inline-flex;
	margin: 10px 0;
	vertical-align: bottom;
}

.rsm-ah-open {
	display: inline-flex;
	align-items: center;
	gap: 11px;
	border: 0;
	border-radius: 999px;
	background: var(--rsm-ah-navy);
	color: var(--rsm-ah-white);
	padding: 8px 15px 8px 8px;
	box-shadow: 0 14px 34px rgba(16, 39, 67, .25);
	cursor: pointer;
	font-weight: 400;
	line-height: 1.15;
	transition: transform .16s ease, box-shadow .16s ease, background .16s ease, opacity .16s ease;
	min-height: 56px;
}

.rsm-ah-open:hover,
.rsm-ah-open:focus {
	transform: translateY(-1px);
	box-shadow: 0 18px 42px rgba(16, 39, 67, .30);
	background: var(--rsm-ah-navy-dark);
	color: var(--rsm-ah-white);
}

.rsm-ah-avatar-dot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--rsm-ah-navy);
	border: 2px solid rgba(255,255,255,.92);
	box-shadow: 0 10px 28px rgba(16, 39, 67, .30);
	flex: 0 0 auto;
}

.rsm-ah-avatar-dot img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.rsm-ah-open-label {
	white-space: nowrap;
	font-weight: 400;
}

.rsm-ah-position-compact .rsm-ah-open {
	padding: 6px;
	border-radius: 50%;
	min-height: auto;
}

.rsm-ah-position-compact .rsm-ah-open-label {
	display: none;
}

.rsm-ah-widget.rsm-ah-avatar-active .rsm-ah-open {
	display: none;
}

.rsm-ah-avatar-stage[hidden] {
	display: none !important;
}

.rsm-ah-avatar-stage {
	display: block;
	width: clamp(150px, 16vw, 260px);
	max-width: 34vw;
	line-height: 0;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin: 0 !important;
	overflow: visible !important;
	pointer-events: none;
	contain: layout paint style;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity .24s ease, transform .24s ease;
}

.rsm-ah-widget.rsm-ah-avatar-active .rsm-ah-avatar-stage {
	opacity: 1;
	transform: translateY(0);
}

.rsm-ah-avatar-video,
.rsm-ah-avatar-image {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	background-color: transparent !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	outline: 0 !important;
	object-fit: contain;
	pointer-events: none;
}

.rsm-ah-avatar-video::-webkit-media-controls,
.rsm-ah-avatar-video::-webkit-media-controls-enclosure,
.rsm-ah-avatar-video::-webkit-media-controls-panel,
.rsm-ah-avatar-video::-webkit-media-controls-play-button,
.rsm-ah-avatar-video::-webkit-media-controls-start-playback-button {
	display: none !important;
	-webkit-appearance: none;
}

@media (max-width: 768px) {
	.rsm-ah-position-floating.rsm-ah-auto-context,
	.rsm-ah-position-floating:not(.rsm-ah-auto-context),
	.rsm-ah-position-compact.rsm-ah-auto-context {
		left: 10px;
		bottom: 14px;
	}

	.rsm-ah-avatar-stage {
		width: clamp(118px, 30vw, 178px);
		max-width: 38vw;
	}
}
