.gk-floating-contact {
	position: fixed;
	right: var(--gkfc-right, 24px);
	bottom: calc(var(--gkfc-bottom, 24px) + 92px);
	z-index: 9999;
}

.gk-floating-contact__stack {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
}

.gk-floating-contact__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	box-shadow: 0 12px 26px rgba(19, 35, 56, 0.18);
	color: #fff;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	position: relative;
}

.gk-floating-contact__button span {
	display: none;
}

.gk-floating-contact__button::after {
	content: attr(aria-label);
	position: absolute;
	right: calc(100% + 12px);
	top: 50%;
	transform: translateY(-50%) translateX(8px);
	padding: 8px 10px;
	border-radius: 10px;
	background: rgba(21, 31, 46, 0.92);
	box-shadow: 0 12px 28px rgba(9, 18, 31, 0.22);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.gk-floating-contact__button:hover::after,
.gk-floating-contact__button:focus-visible::after {
	opacity: 1;
	transform: translateY(-50%) translateX(0);
}

.gk-floating-contact__button:hover {
	transform: translateY(-2px);
	box-shadow: 0 20px 36px rgba(19, 35, 56, 0.24);
	color: #fff;
}

.gk-floating-contact__button svg {
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
	color: #fff;
	fill: currentColor;
}

.gk-floating-contact__button.is-messenger {
	background: #1677ff;
}

.gk-floating-contact__button.is-zalo {
	background: #0068ff;
}

.gk-floating-contact__button.is-zalo svg {
	color: #fff;
	background: transparent;
}

.gk-floating-contact__button.is-ai {
	background: #183a67;
}

.gk-floating-contact__panel {
	position: absolute;
	right: 0;
	bottom: 76px;
	width: min(420px, calc(100vw - 32px));
	max-height: min(75vh, 720px);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 28px 60px rgba(10, 21, 37, 0.24);
}

.gk-floating-contact__panel-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 20px;
	border-bottom: 1px solid #e6edf5;
	background: #183a67;
	color: #fff;
}

.gk-floating-contact__panel-brand {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.gk-floating-contact__panel-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.14);
	flex: 0 0 42px;
}

.gk-floating-contact__panel-icon svg {
	width: 22px;
	height: 22px;
	color: #fff;
	fill: currentColor;
}

.gk-floating-contact__panel-header strong {
	display: block;
	font-size: 16px;
}

.gk-floating-contact__panel-intro {
	margin-top: 4px;
	font-size: 13px;
	line-height: 1.5;
	opacity: 0.86;
}

.gk-floating-contact__panel-intro p {
	margin: 0;
}

.gk-floating-contact__close {
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 20px;
	line-height: 32px;
	cursor: pointer;
	flex: 0 0 32px;
}

.gk-floating-contact__panel-body {
	flex: 1 1 auto;
	padding: 0;
	background: linear-gradient(180deg, #f3f8ff 0%, #eef5ff 100%);
	overflow: auto;
}

.gk-floating-contact__panel-body iframe {
	display: block;
	width: 100%;
	min-height: 520px;
	border: 0;
}

.gk-floating-contact__panel-body p {
	margin: 0;
	padding: 20px;
	color: #42556d;
}

.gk-floating-contact__demo {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 18px;
}

.gk-floating-contact__demo-status {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	border: 1px solid rgba(24, 58, 103, 0.08);
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.78);
	box-shadow: 0 14px 32px rgba(20, 42, 70, 0.08);
	backdrop-filter: blur(10px);
}

.gk-floating-contact__demo-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 16px;
	background: linear-gradient(135deg, #183a67 0%, #2b5d97 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
	color: #fff;
	flex: 0 0 48px;
}

.gk-floating-contact__demo-avatar svg {
	width: 24px;
	height: 24px;
	color: #fff;
	fill: currentColor;
}

.gk-floating-contact__demo-meta strong,
.gk-floating-contact__panel-header strong {
	display: block;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.gk-floating-contact__demo-meta span {
	display: block;
	margin-top: 3px;
	color: #59708d;
	font-size: 12px;
	line-height: 1.45;
}

.gk-floating-contact__messages {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.gk-floating-contact__message {
	max-width: 88%;
	padding: 14px 15px 12px;
	border-radius: 18px;
	box-shadow: 0 10px 24px rgba(25, 46, 78, 0.08);
}

.gk-floating-contact__message p {
	padding: 0;
	color: #21344d;
	font-size: 13px;
	line-height: 1.6;
}

.gk-floating-contact__message time {
	display: block;
	margin-top: 8px;
	color: #7b8da4;
	font-size: 11px;
	line-height: 1;
}

.gk-floating-contact__message.is-bot {
	align-self: flex-start;
	border-bottom-left-radius: 6px;
	background: #fff;
}

.gk-floating-contact__message.is-user {
	align-self: flex-end;
	border-bottom-right-radius: 6px;
	background: linear-gradient(135deg, #183a67 0%, #285285 100%);
}

.gk-floating-contact__message.is-user p,
.gk-floating-contact__message.is-user time {
	color: #fff;
}

.gk-floating-contact__message.is-user time {
	opacity: 0.78;
}

.gk-floating-contact__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.gk-floating-contact__chips button {
	padding: 10px 12px;
	border: 1px solid rgba(24, 58, 103, 0.12);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 8px 18px rgba(24, 58, 103, 0.06);
	color: #183a67;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}

.gk-floating-contact__demo-note {
	padding: 14px 16px;
	border: 1px dashed rgba(24, 58, 103, 0.2);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.66);
}

.gk-floating-contact__demo-note p {
	padding: 0;
	color: #4a617d;
	font-size: 12px;
	line-height: 1.6;
}

.gk-floating-contact__composer {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px;
	border: 1px solid rgba(24, 58, 103, 0.08);
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 14px 32px rgba(16, 34, 56, 0.08);
}

.gk-floating-contact__composer-field {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0 4px;
}

.gk-floating-contact__composer-placeholder {
	display: block;
	color: #7a8da3;
	font-size: 13px;
	line-height: 1.5;
}

.gk-floating-contact__composer-send {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 14px;
	background: #183a67;
	box-shadow: 0 12px 24px rgba(24, 58, 103, 0.22);
	color: #fff;
	cursor: pointer;
	flex: 0 0 44px;
}

.gk-floating-contact__composer-send svg {
	width: 18px;
	height: 18px;
	color: #fff;
	fill: currentColor;
}

/* WP AI live chat */
.gk-floating-contact__panel-body--live {
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.gk-floating-contact__chat-messages {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-height: 180px;
	background: linear-gradient(180deg, #f3f8ff 0%, #eef5ff 100%);
}

.gk-floating-contact__panel-footer {
	padding: 10px 12px;
	border-top: 1px solid rgba(24, 58, 103, 0.08);
	background: #fff;
}

.gk-floating-contact__panel-footer .gk-floating-contact__composer {
	margin: 0;
	box-shadow: none;
	border-color: rgba(24, 58, 103, 0.12);
}

.gk-floating-contact__composer-input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 6px 4px;
	border: 0;
	background: transparent;
	resize: none;
	font-family: inherit;
	font-size: 13px;
	line-height: 1.5;
	color: #21344d;
	max-height: 96px;
	overflow-y: auto;
}

.gk-floating-contact__composer-input::placeholder {
	color: #7a8da3;
}

.gk-floating-contact__composer-input:focus {
	outline: none;
}

.gk-floating-contact__thinking {
	align-self: flex-start;
	display: flex;
	gap: 5px;
	align-items: center;
	padding: 14px 16px;
	border-radius: 18px;
	border-bottom-left-radius: 6px;
	background: #fff;
	box-shadow: 0 10px 24px rgba(25, 46, 78, 0.08);
}

.gk-floating-contact__thinking span {
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #94a8bc;
	animation: gkfc-pulse 1.2s ease-in-out infinite;
}

.gk-floating-contact__thinking span:nth-child(2) {
	animation-delay: 0.2s;
}

.gk-floating-contact__thinking span:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes gkfc-pulse {
	0%, 60%, 100% { transform: scale(1); opacity: 0.45; }
	30% { transform: scale(1.35); opacity: 1; }
}

@media (max-width: 767px) {
	.gk-floating-contact {
		right: 12px !important;
		bottom: calc(var(--gkfc-bottom, 24px) + 66px) !important;
	}

	.gk-floating-contact__stack {
		gap: 8px !important;
	}

	.gk-floating-contact__button {
		height: 44px !important;
		min-width: 44px !important;
		width: 44px !important;
	}

	.gk-floating-contact__button svg {
		height: 20px !important;
		width: 20px !important;
	}

	.gk-floating-contact__button::after {
		display: none;
	}

	.gk-floating-contact__panel {
		right: -4px;
		bottom: 70px;
		width: min(390px, calc(100vw - 20px));
		max-height: 72vh;
	}

	.gk-floating-contact__panel-body iframe {
		min-height: 460px;
	}

	.gk-floating-contact__demo {
		padding: 16px;
		gap: 14px;
	}

	.gk-floating-contact__message {
		max-width: 92%;
	}
}
