.a123-fc,
.a123-fc *,
.a123-fc *::before,
.a123-fc *::after {
	box-sizing: border-box;
}

.a123-fc {
	--a123-fc-offset-x: 24px;
	--a123-fc-offset-bottom: 24px;
	--a123-fc-offset-x-mobile: 14px;
	--a123-fc-offset-bottom-mobile: 14px;
	--a123-fc-button-size: 58px;
	--a123-fc-button-size-mobile: 54px;
	--a123-fc-text: #141414;
	--a123-fc-muted: #777;
	--a123-fc-border: #e8e8e8;
	--a123-fc-bg: #fff;
	position: fixed;
	bottom: var(--a123-fc-offset-bottom);
	z-index: 99990;
	font-family: inherit;
	line-height: normal;
}

.a123-fc--right { right: var(--a123-fc-offset-x); }
.a123-fc--left { left: var(--a123-fc-offset-x); }

/* Frontend controls avoid native button markup to prevent Elementor/theme global button styling. */
.a123-fc-launcher {
	all: unset;
	box-sizing: border-box;
	position: relative;
	display: grid;
	place-items: center;
	width: var(--a123-fc-button-size);
	height: var(--a123-fc-button-size);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background-color: #242424;
	color: #fff;
	box-shadow: 0 10px 28px rgba(0,0,0,.18);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.a123-fc-launcher:hover,
.a123-fc-launcher:focus-visible {
	transform: translateY(-2px);
	background-color: #111;
	box-shadow: 0 14px 34px rgba(0,0,0,.22);
	outline: 2px solid rgba(17,17,17,.18);
	outline-offset: 3px;
}

.a123-fc-launcher > svg,
.a123-fc-launcher-chat {
	position: absolute;
	width: 26px;
	height: 26px;
	fill: currentColor;
	transition: opacity .18s ease, transform .18s ease;
}

.a123-fc-launcher .a123-fc-custom-icon {
	position: absolute;
	display: block;
	width: 58%;
	height: 58%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	object-fit: contain;
	transition: opacity .18s ease, transform .18s ease;
}

.a123-fc-launcher-close {
	position: absolute;
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	opacity: 0;
	transform: rotate(-45deg) scale(.75);
	transition: opacity .18s ease, transform .18s ease;
}

.a123-fc-launcher-close svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.a123-fc.is-open .a123-fc-launcher-chat,
.a123-fc.is-open .a123-fc-launcher .a123-fc-custom-icon { opacity: 0; transform: rotate(45deg) scale(.75); }
.a123-fc.is-open .a123-fc-launcher-close { opacity: 1; transform: rotate(0) scale(1); }

.a123-fc-panel {
	position: absolute;
	bottom: calc(var(--a123-fc-button-size) + 14px);
	width: 310px;
	padding: 16px;
	border: 1px solid var(--a123-fc-border);
	border-radius: 18px;
	background-color: var(--a123-fc-bg);
	box-shadow: 0 18px 50px rgba(0,0,0,.15);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(10px) scale(.97);
	transform-origin: bottom right;
	transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.a123-fc--right .a123-fc-panel { right: 0; }
.a123-fc--left .a123-fc-panel { left: 0; transform-origin: bottom left; }
.a123-fc.is-open .a123-fc-panel { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }

.a123-fc-panel__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.a123-fc-panel__title { margin: 0; padding: 0; color: var(--a123-fc-text); background: transparent; font-size: 16px; font-weight: 700; line-height: 1.3; }
.a123-fc-panel__subtitle { margin: 3px 0 0; padding: 0; color: var(--a123-fc-muted); background: transparent; font-size: 12px; font-weight: 400; line-height: 1.45; }

.a123-fc-panel__close {
	all: unset;
	box-sizing: border-box;
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	margin: -2px -2px 0 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: #f3f3f3;
	color: #333;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.a123-fc-panel__close svg { display: block; width: 18px; height: 18px; fill: currentColor; }
.a123-fc-panel__close:hover,
.a123-fc-panel__close:focus-visible { background-color: #e9e9e9; outline: 2px solid rgba(0,0,0,.12); outline-offset: 2px; }

.a123-fc-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 9px;
	max-height: min(56vh, 430px);
	padding-right: 2px;
	overflow-y: auto;
	overflow-x: hidden;
	overscroll-behavior: contain;
	scrollbar-width: thin;
}

.a123-fc-grid > :only-child { grid-column: 1 / -1; }

.a123-fc-channel,
.a123-fc-channel:link,
.a123-fc-channel:visited {
	all: unset;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 9px;
	min-width: 0;
	min-height: 50px;
	padding: 8px 9px;
	border: 1px solid var(--a123-fc-border);
	border-radius: 12px;
	background-color: #fff;
	color: var(--a123-fc-text);
	text-decoration: none;
	box-shadow: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.a123-fc-channel:hover,
.a123-fc-channel:focus-visible {
	color: var(--a123-fc-text);
	border-color: #d6d6d6;
	background-color: #fafafa;
	box-shadow: 0 6px 16px rgba(0,0,0,.06);
	transform: translateY(-1px);
	outline: 2px solid rgba(0,0,0,.08);
	outline-offset: 1px;
}

.a123-fc-channel__icon {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 9px;
	background-color: #242424;
	color: #fff;
	box-shadow: none;
}

.a123-fc--brand .a123-fc-channel__icon:not(.has-custom-icon) {
	background-color: var(--a123-fc-item-color, #242424);
}

.a123-fc--brand .a123-fc-channel--whatsapp { --a123-fc-item-color: #25D366; }
.a123-fc--brand .a123-fc-channel--zalo { --a123-fc-item-color: #0068FF; }
.a123-fc--brand .a123-fc-channel--telegram { --a123-fc-item-color: #229ED9; }
.a123-fc--brand .a123-fc-channel--wechat { --a123-fc-item-color: #07C160; }
.a123-fc--brand .a123-fc-channel--kakao { --a123-fc-item-color: #FEE500; }
.a123-fc--brand .a123-fc-channel--line { --a123-fc-item-color: #06C755; }
.a123-fc--brand .a123-fc-channel--kakao .a123-fc-channel__icon:not(.has-custom-icon) { color: #191919; }

.a123-fc-channel__icon svg { display: block; width: 19px; height: 19px; fill: currentColor; }
.a123-fc-channel__icon.has-custom-icon { background-color: transparent !important; color: inherit; }
.a123-fc-channel__icon .a123-fc-custom-icon { display: block; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; object-fit: contain; }

.a123-fc-channel__label {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: inherit;
	background: transparent;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
}

@media (min-width: 1025px) {
	.a123-fc--hide-desktop { display: none !important; }
}

@media (min-width: 768px) and (max-width: 1024px) {
	.a123-fc--hide-tablet { display: none !important; }
}

@media (max-width: 767px) {
	.a123-fc--hide-mobile { display: none !important; }
	.a123-fc { bottom: calc(var(--a123-fc-offset-bottom-mobile) + env(safe-area-inset-bottom, 0px)); }
	.a123-fc--right { right: var(--a123-fc-offset-x-mobile); }
	.a123-fc--left { left: var(--a123-fc-offset-x-mobile); }
	.a123-fc-launcher { width: var(--a123-fc-button-size-mobile); height: var(--a123-fc-button-size-mobile); }
	.a123-fc-panel { bottom: calc(var(--a123-fc-button-size-mobile) + 12px); width: min(310px, calc(100vw - 28px)); padding: 14px; border-radius: 16px; }
	.a123-fc--right .a123-fc-panel { right: 0; }
	.a123-fc--left .a123-fc-panel { left: 0; }
	.a123-fc-grid { gap: 8px; max-height: min(54vh, 390px); }
	.a123-fc-channel,
	.a123-fc-channel:link,
	.a123-fc-channel:visited { min-height: 48px; padding: 7px 8px; }
	.a123-fc-channel__label { font-size: 12.5px; }
}

@media (max-width: 360px) {
	.a123-fc-grid { grid-template-columns: 1fr; }
	.a123-fc-panel { width: min(278px, calc(100vw - 24px)); }
}

@media (prefers-reduced-motion: reduce) {
	.a123-fc *,
	.a123-fc *::before,
	.a123-fc *::after { transition-duration: .01ms !important; }
}
