/* Floating Contact Button – Frontend */

.fc-buttons {
	--fc-btn-color: #2176ff;
	--fc-btn-size: 56px;
	position: fixed;
	left: 20px;
	bottom: 24px;
	z-index: 99999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 14px;
	line-height: 1.4;
}

.fc-buttons-content {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

/* Panel */
.fc-button-list {
	position: absolute;
	bottom: calc(var(--fc-btn-size) + 12px);
	left: 0;
	width: min(300px, calc(100vw - 40px));
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
	overflow: hidden;
	transform-origin: bottom left;
	animation: fc-slide-in 0.22s ease;
}

.fc-button-list[hidden] {
	display: none !important;
}

@keyframes fc-slide-in {
	from {
		opacity: 0;
		transform: translateY(10px) scale(0.96);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.fc-list-title-container {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 14px;
	background: var(--fc-btn-color);
	color: #fff;
}

.fc-close-view-btn {
	appearance: none;
	border: 0;
	background: transparent;
	color: #fff;
	padding: 0;
	width: 24px;
	height: 24px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.fc-arrow {
	display: block;
	width: 10px;
	height: 10px;
	border-right: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(45deg);
	margin-top: -4px;
}

.fc-list-title {
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.fc-channel-list-container {
	padding: 12px 14px 14px;
	max-height: min(360px, calc(100vh - 160px));
	overflow-y: auto;
}

.fc-grid-title {
	margin-bottom: 10px;
}

.fc-grid-title p {
	margin: 0;
	color: #222;
	font-size: 14px;
}

.fc-channel-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.fc-social-channel {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: #222;
	padding: 6px 4px;
	border-radius: 6px;
	transition: background 0.15s ease;
}

.fc-social-channel:hover {
	background: #f5f7fb;
	color: #111;
}

.fc-chat-button-icon {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	background: #888;
}

.fc-chat-button-icon svg {
	width: 20px;
	height: 20px;
	fill: #fff;
}

.fc-chat-button-icon.channel-phone {
	background: #25d366;
}

.fc-chat-button-icon.channel-facebook_messenger {
	background: #0084ff;
}

.fc-chat-button-icon.channel-mail {
	background: #f5a623;
}

.fc-chat-button-icon.channel-zalo {
	background: #0068ff;
}

.fc-chat-button-icon.channel-whatsapp {
	background: #25d366;
}

.fc-chat-button-icon.channel-custom {
	background: #607d8b;
}

.fc-list-channel-title {
	font-size: 14px;
	word-break: break-word;
}

/* Trigger */
.fc-trigger {
	position: relative;
}

.fc-trigger-button {
	position: relative;
	width: var(--fc-btn-size);
	height: var(--fc-btn-size);
}

.fc-trigger-top,
.fc-trigger-bottom {
	position: absolute;
	inset: 0;
}

.fc-chat-button-link {
	appearance: none;
	border: 0;
	padding: 0;
	margin: 0;
	width: var(--fc-btn-size);
	height: var(--fc-btn-size);
	border-radius: 50%;
	background: var(--fc-btn-color);
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fc-chat-button-link:hover {
	transform: scale(1.05);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.fc-chat-button-link .fc-chat-button-icon {
	width: 28px;
	height: 28px;
	background: transparent;
	border-radius: 0;
}

.fc-chat-button-link .fc-chat-button-icon svg {
	width: 28px;
	height: 28px;
	fill: #fff;
}

.fc-cta-tooltip {
	position: absolute;
	left: calc(var(--fc-btn-size) + 12px);
	top: 50%;
	transform: translateY(-50%);
	background: #fff;
	color: #222;
	padding: 8px 12px;
	border-radius: 4px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
	white-space: nowrap;
	font-size: 13px;
	pointer-events: none;
}

.fc-cta-tooltip::before {
	content: "";
	position: absolute;
	left: -6px;
	top: 50%;
	transform: translateY(-50%);
	border: 6px solid transparent;
	border-right-color: #fff;
	border-left: 0;
}

/* Open / closed states */
.fc-buttons[data-open="0"] .fc-trigger-bottom {
	visibility: hidden;
	pointer-events: none;
	opacity: 0;
}

.fc-buttons[data-open="0"] .fc-trigger-top {
	visibility: visible;
	opacity: 1;
}

.fc-buttons[data-open="1"] .fc-trigger-top {
	visibility: hidden;
	pointer-events: none;
	opacity: 0;
}

.fc-buttons[data-open="1"] .fc-trigger-bottom {
	visibility: visible;
	opacity: 1;
}

.fc-buttons[data-open="1"] .fc-cta-tooltip {
	display: none;
}

@media (max-width: 480px) {
	.fc-buttons {
		left: 12px;
		bottom: 16px;
	}

	.fc-button-list {
		width: min(280px, calc(100vw - 24px));
	}

	.fc-right-box {
		right: 12px;
		bottom: 16px;
		width: 110px;
		padding: 6px;
	}

	.fc-right-text {
		font-size: 11px;
	}
}

/* Right fixed box */
.fc-right-box {
	--fc-right-text-color: #6b2c91;
	position: fixed;
	right: 20px;
	bottom: 24px;
	z-index: 99998;
	width: 130px;
	padding: 8px;
	background: #fff;
	border: 1px solid var(--fc-right-text-color);
	border-radius: 4px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	text-align: center;
	text-decoration: none;
	display: block;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.fc-right-box:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
	text-decoration: none;
}

.fc-right-image {
	display: block;
	line-height: 0;
}

.fc-right-image img {
	display: block;
	width: 100%;
	height: auto;
}

.fc-right-text {
	display: block;
	margin-top: 8px;
	color: var(--fc-right-text-color);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1.2;
}
