/**
 * Livechat cột stream: ghi đè Flatsome (button / input) trong #livechat_app.
 * Hai điểm chính: (1) header “Tắt chat” không nền trắng, (2) hàng tên + nút không chồng / không cắt mép.
 */

body.cakhia-stream-live .chat-container #livechat_app.cakhia-livechat-mount {
	isolation: isolate;
	overflow-x: visible !important;
}

/* --- Flatsome: reset nút (trừ .button theme). Submit không min-width:0 để không bị co mất chữ --- */
html body.cakhia-stream-live .chat-container #livechat_app button:not(.button) {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	margin: 0 !important;
	padding: 0 !important;
	max-width: none !important;
	line-height: 1.35 !important;
	font-size: inherit !important;
	font-weight: 500 !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	text-rendering: auto !important;
	text-shadow: none !important;
	vertical-align: middle !important;
	touch-action: manipulation !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	min-height: 0 !important;
}

html body.cakhia-stream-live .chat-container #livechat_app button:not(.button):not(.tw-bg-chat-primary) {
	min-width: 0 !important;
}

html body.cakhia-stream-live .chat-container #livechat_app input[type="text"] {
	margin: 0 !important;
	height: auto !important;
	min-height: 0 !important;
	line-height: 1.25rem !important;
	font-size: 0.875rem !important;
	font-weight: 400 !important;
	background-color: rgb(45, 45, 45) !important;
	background-image: none !important;
	border: 1px solid rgb(63, 63, 70) !important;
	border-radius: 0.25rem !important;
	color: rgb(250, 250, 250) !important;
	box-shadow: none !important;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	padding: 0.5rem 0.75rem !important;
	box-sizing: border-box !important;
	-webkit-appearance: none !important;
	appearance: none !important;
}

html body.cakhia-stream-live .chat-container #livechat_app input[type="text"].tw-pl-8 {
	padding-left: 2rem !important;
}

html body.cakhia-stream-live .chat-container #livechat_app input[type="text"]:focus {
	background-color: rgb(45, 45, 45) !important;
	color: rgb(250, 250, 250) !important;
	border-color: #f97316 !important;
	box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.45) !important;
	outline: none !important;
	opacity: 1 !important;
}

/* --- 1) Header cam: mọi nút điều khiển = ghost trắng, không nền hệ thống / Flatsome --- */
body.cakhia-stream-live .chat-container #livechat_app .tw-h-10.tw-bg-chat-primary {
	color: #fff !important;
	color-scheme: dark;
}

body.cakhia-stream-live .chat-container #livechat_app .tw-h-10.tw-bg-chat-primary button:not(.button),
body.cakhia-stream-live .chat-container #livechat_app .tw-h-10.tw-bg-chat-primary [type="button"]:not(.button) {
	gap: 0.5rem !important;
	padding: 0.25rem 0.5rem !important;
	height: auto !important;
	min-height: 0 !important;
	min-width: 0 !important;
	font-weight: 500 !important;
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
	background: none !important;
	background-color: transparent !important;
	background-image: none !important;
	border: 0 !important;
	border-radius: 0.25rem !important;
	box-shadow: none !important;
	outline: none !important;
	opacity: 1 !important;
	filter: none !important;
}

body.cakhia-stream-live .chat-container #livechat_app .tw-h-10.tw-bg-chat-primary button:not(.button)::before,
body.cakhia-stream-live .chat-container #livechat_app .tw-h-10.tw-bg-chat-primary button:not(.button)::after,
body.cakhia-stream-live .chat-container #livechat_app .tw-h-10.tw-bg-chat-primary [type="button"]:not(.button)::before,
body.cakhia-stream-live .chat-container #livechat_app .tw-h-10.tw-bg-chat-primary [type="button"]:not(.button)::after {
	content: none !important;
	display: none !important;
}

body.cakhia-stream-live .chat-container #livechat_app .tw-h-10.tw-bg-chat-primary button:not(.button) *,
body.cakhia-stream-live .chat-container #livechat_app .tw-h-10.tw-bg-chat-primary [type="button"]:not(.button) * {
	color: inherit !important;
	-webkit-text-fill-color: inherit !important;
}

body.cakhia-stream-live .chat-container #livechat_app .tw-h-10.tw-bg-chat-primary button:not(.button):hover,
body.cakhia-stream-live .chat-container #livechat_app .tw-h-10.tw-bg-chat-primary [type="button"]:not(.button):hover {
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
	opacity: 0.9 !important;
	background-color: transparent !important;
}

body.cakhia-stream-live .chat-container #livechat_app .tw-h-10.tw-bg-chat-primary button:not(.button) svg,
body.cakhia-stream-live .chat-container #livechat_app .tw-h-10.tw-bg-chat-primary [type="button"]:not(.button) svg {
	display: block !important;
	width: 1rem !important;
	height: 1rem !important;
	min-width: 1rem !important;
	flex-shrink: 0 !important;
	color: #fff !important;
	fill: currentColor !important;
	stroke: currentColor !important;
	overflow: visible !important;
}

/* --- 2) Hàng ô tên + nút Chat / Vào Chat: flex, ô co – nút không co --- */
body.cakhia-stream-live .chat-container #livechat_app form.tw-flex.tw-flex-col {
	overflow-x: visible !important;
	min-width: 0 !important;
}

body.cakhia-stream-live .chat-container #livechat_app form.tw-flex.tw-flex-col > .tw-flex.tw-gap-2 {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	gap: 0.5rem !important;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	box-sizing: border-box !important;
	overflow: visible !important;
}

body.cakhia-stream-live .chat-container #livechat_app form .tw-flex.tw-gap-2 > .tw-relative.tw-flex-1 {
	flex: 1 1 0% !important;
	min-width: 0 !important;
	max-width: none !important;
	width: auto !important;
	overflow: visible !important;
}

body.cakhia-stream-live .chat-container #livechat_app form .tw-flex.tw-gap-2 > button[type="submit"]:not(.button),
body.cakhia-stream-live .chat-container #livechat_app form .tw-flex.tw-gap-2 > button.tw-bg-chat-primary:not(.button) {
	flex: 0 0 auto !important;
	flex-shrink: 0 !important;
	align-self: center !important;
	min-width: 5.5rem !important;
	width: auto !important;
	max-width: none !important;
}

body.cakhia-stream-live .chat-container #livechat_app button[type="submit"]:not(.button).tw-bg-chat-primary {
	background-color: #f97316 !important;
	background-image: none !important;
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
	border: 0 !important;
	box-shadow: none !important;
	padding: 0.5rem 0.85rem !important;
	font-weight: 700 !important;
	font-size: 0.875rem !important;
	line-height: 1.25rem !important;
	border-radius: 0.375rem !important;
	white-space: nowrap !important;
}

body.cakhia-stream-live .chat-container #livechat_app button[type="submit"]:not(.button).tw-bg-chat-primary:hover {
	background-color: #ea580c !important;
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
}

body.cakhia-stream-live .chat-container #livechat_app form.tw-flex.tw-flex-col > p.tw-text-center {
	background: transparent !important;
	box-shadow: none !important;
}

body.cakhia-stream-live .chat-container #livechat_app form .tw-mt-2.tw-flex.tw-justify-between > button:not(.button) {
	display: inline !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	color: #f97316 !important;
	-webkit-text-fill-color: #f97316 !important;
	padding: 0 !important;
	min-height: 0 !important;
	font-size: 0.75rem !important;
	line-height: 1rem !important;
	font-weight: 500 !important;
	text-decoration: underline !important;
	text-underline-offset: 2px !important;
}
