#cwls-root,
#cwls-root * {
	box-sizing: border-box;
}

#cwls-root {
	--cwls-gold: #d5a928;
	--cwls-gold-light: #f2d26b;
	--cwls-gold-dark: #9f7410;
	--cwls-black: #090909;
	--cwls-panel: #111111;
	--cwls-panel-soft: #181818;
	--cwls-line: rgba(213, 169, 40, 0.26);
	--cwls-text: #ffffff;
	--cwls-muted: #bdbdbd;
	--cwls-danger: #ff7373;
	--cwls-success: #62d08b;
	--cwls-z-index: 99990;
	--cwls-icon-size: 22px;
	--cwls-button-radius: 50%;
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.45;
	color: var(--cwls-text);
}

#cwls-root[hidden],
#cwls-root [hidden] {
	display: none !important;
}

#cwls-root button,
#cwls-root input,
#cwls-root textarea {
	font: inherit;
}

#cwls-root button {
	-webkit-tap-highlight-color: transparent;
}

#cwls-root .cwls-visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

#cwls-root .cwls-widget {
	position: static;
	pointer-events: none;
}

#cwls-root .cwls-launcher {
	position: fixed;
	z-index: var(--cwls-z-index);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-width: 0;
	padding: 0 18px;
	border: 1px solid rgba(255, 229, 145, 0.7);
	border-radius: var(--cwls-button-radius);
	outline: 0;
	color: #0b0b0b;
	background: linear-gradient(135deg, var(--cwls-gold-light) 0%, var(--cwls-gold) 46%, var(--cwls-gold-dark) 100%);
	box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34), 0 4px 14px rgba(213, 169, 40, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.38);
	cursor: pointer;
	pointer-events: auto;
	user-select: none;
	transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

#cwls-root.cwls-rounded-rectangle .cwls-launcher {
	border-radius: 14px;
}

#cwls-root .cwls-launcher:hover {
	filter: brightness(1.06);
	transform: translateY(-2px);
	box-shadow: 0 15px 38px rgba(0, 0, 0, 0.4), 0 5px 20px rgba(213, 169, 40, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

#cwls-root .cwls-launcher:active {
	transform: translateY(0);
}

#cwls-root .cwls-launcher:focus-visible,
#cwls-root .cwls-popup button:focus-visible,
#cwls-root .cwls-popup input:focus-visible,
#cwls-root .cwls-popup textarea:focus-visible {
	outline: 3px solid rgba(242, 210, 107, 0.52);
	outline-offset: 3px;
}

#cwls-root .cwls-launcher:disabled {
	cursor: wait;
	opacity: 0.72;
}

#cwls-root .cwls-launcher__icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 var(--cwls-icon-size);
	width: var(--cwls-icon-size);
	height: var(--cwls-icon-size);
}

#cwls-root .cwls-launcher__icon svg,
#cwls-root .cwls-launcher__image {
	display: block;
	width: 100%;
	height: 100%;
}

#cwls-root .cwls-launcher__icon svg {
	fill: currentColor;
}

#cwls-root .cwls-launcher__image {
	object-fit: contain;
}

#cwls-root .cwls-launcher__text {
	min-width: 0;
	overflow: hidden;
	font-size: 14px;
	font-weight: 750;
	letter-spacing: 0.01em;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#cwls-root .cwls-launcher__badge {
	position: absolute;
	top: -7px;
	right: -5px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 23px;
	height: 23px;
	padding: 0 6px;
	border: 2px solid #080808;
	border-radius: 999px;
	color: #fff;
	background: #e04444;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.38);
	font-size: 11px;
	font-weight: 800;
	line-height: 1;
}

#cwls-root.cwls-round-gold-launcher .cwls-launcher {
	padding: 0;
	gap: 0;
	border: 0;
	border-radius: 50%;
	color: transparent;
	background: transparent;
	box-shadow: none;
	overflow: visible;
}

#cwls-root.cwls-round-gold-launcher .cwls-launcher:hover {
	filter: brightness(1.04) saturate(1.04);
	transform: translateY(-2px) scale(1.025);
	box-shadow: none;
}

#cwls-root.cwls-round-gold-launcher .cwls-launcher:active {
	transform: translateY(0) scale(0.98);
}

#cwls-root.cwls-round-gold-launcher .cwls-launcher__icon {
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
	filter: drop-shadow(0 12px 13px rgba(0, 0, 0, 0.34));
}

#cwls-root.cwls-round-gold-launcher .cwls-launcher__image {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

#cwls-root.cwls-round-gold-launcher .cwls-launcher__badge {
	top: 2px;
	right: 1px;
	color: #fff;
}

#cwls-root .cwls-popup {
	position: fixed;
	z-index: calc(var(--cwls-z-index) + 1);
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 1px solid rgba(213, 169, 40, 0.46);
	border-radius: 22px;
	outline: none;
	color: var(--cwls-text);
	background: linear-gradient(155deg, #181818 0%, var(--cwls-black) 58%, #050505 100%);
	box-shadow: 0 28px 74px rgba(0, 0, 0, 0.58), 0 8px 24px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.025) inset;
	pointer-events: auto;
	isolation: isolate;
	overscroll-behavior: contain;
	animation: cwls-popup-in 170ms ease-out both;
}

@keyframes cwls-popup-in {
	from {
		opacity: 0;
		transform: translateY(8px) scale(0.985);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

#cwls-root .cwls-popup::before {
	position: absolute;
	z-index: -1;
	top: -90px;
	right: -70px;
	width: 210px;
	height: 210px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(213, 169, 40, 0.14), transparent 68%);
	content: "";
	pointer-events: none;
}

#cwls-root .cwls-popup__header {
	position: relative;
	display: grid;
	grid-template-columns: 46px minmax(0, 1fr) 38px;
	align-items: center;
	gap: 11px;
	flex: 0 0 auto;
	min-height: 74px;
	padding: 12px 13px 12px 15px;
	border-bottom: 1px solid var(--cwls-line);
	background: rgba(8, 8, 8, 0.76);
}

#cwls-root .cwls-popup__header::after {
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: -1px;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--cwls-gold), transparent);
	content: "";
	opacity: 0.62;
}

#cwls-root .cwls-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	overflow: hidden;
	border: 2px solid var(--cwls-gold);
	border-radius: 50%;
	background: linear-gradient(145deg, #2b2b2b, #111);
	box-shadow: 0 0 0 3px rgba(213, 169, 40, 0.1);
}

#cwls-root .cwls-avatar__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

#cwls-root .cwls-avatar__fallback {
	font-size: 18px;
	font-weight: 800;
	color: var(--cwls-gold-light);
}

#cwls-root .cwls-popup__heading {
	min-width: 0;
}

#cwls-root .cwls-popup__title {
	margin: 0 0 2px;
	overflow: hidden;
	color: var(--cwls-text);
	font-size: 15px;
	font-weight: 760;
	letter-spacing: 0.01em;
	line-height: 1.25;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#cwls-root .cwls-popup__presence {
	display: flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
	color: var(--cwls-muted);
	font-size: 12px;
}

#cwls-root .cwls-popup__presence-dot {
	flex: 0 0 8px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #858585;
	box-shadow: 0 0 0 3px rgba(133, 133, 133, 0.13);
}

#cwls-root.cwls-is-online .cwls-popup__presence-dot {
	background: var(--cwls-success);
	box-shadow: 0 0 0 3px rgba(98, 208, 139, 0.14), 0 0 12px rgba(98, 208, 139, 0.35);
}

#cwls-root .cwls-popup__presence-text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#cwls-root .cwls-popup__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 50%;
	color: #d6d6d6;
	background: transparent;
	cursor: pointer;
	transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

#cwls-root .cwls-popup__close:hover {
	border-color: rgba(213, 169, 40, 0.22);
	color: var(--cwls-gold-light);
	background: rgba(213, 169, 40, 0.08);
}

#cwls-root .cwls-popup__close svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
}

#cwls-root .cwls-popup__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
}

#cwls-root .cwls-notice {
	flex: 0 0 auto;
	margin: 10px 12px 0;
	padding: 9px 11px;
	border: 1px solid rgba(213, 169, 40, 0.35);
	border-radius: 10px;
	color: #f0d77f;
	background: rgba(213, 169, 40, 0.09);
	font-size: 12px;
}

#cwls-root .cwls-notice--error {
	border-color: rgba(255, 115, 115, 0.35);
	color: #ffc2c2;
	background: rgba(255, 70, 70, 0.09);
}

#cwls-root .cwls-chat {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
}

#cwls-root .cwls-chat__messages {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 10px;
	min-height: 0;
	padding: 16px 14px;
	overflow-x: hidden;
	overflow-y: auto;
	scrollbar-color: rgba(213, 169, 40, 0.46) transparent;
	scrollbar-width: thin;
	overscroll-behavior: contain;
}

#cwls-root .cwls-chat__messages::-webkit-scrollbar,
#cwls-root .cwls-offline::-webkit-scrollbar {
	width: 6px;
}

#cwls-root .cwls-chat__messages::-webkit-scrollbar-thumb,
#cwls-root .cwls-offline::-webkit-scrollbar-thumb {
	border-radius: 999px;
	background: rgba(213, 169, 40, 0.46);
}

#cwls-root .cwls-chat__empty {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 180px;
	padding: 24px 16px;
	text-align: center;
}

#cwls-root .cwls-chat__empty svg {
	width: 48px;
	height: 48px;
	margin-bottom: 13px;
	fill: var(--cwls-gold);
	opacity: 0.9;
}

#cwls-root .cwls-chat__empty strong {
	margin-bottom: 5px;
	color: #f4f4f4;
	font-size: 14px;
	font-weight: 720;
}

#cwls-root .cwls-chat__empty span {
	max-width: 260px;
	color: var(--cwls-muted);
	font-size: 12px;
	line-height: 1.55;
}

#cwls-root .cwls-message {
	display: flex;
	width: 100%;
}

#cwls-root .cwls-message--visitor {
	justify-content: flex-end;
}

#cwls-root .cwls-message--operator {
	justify-content: flex-start;
}

#cwls-root .cwls-message__bubble {
	max-width: 82%;
	padding: 9px 11px 7px;
	border-radius: 15px;
	box-shadow: 0 5px 16px rgba(0, 0, 0, 0.2);
}

#cwls-root .cwls-message--visitor .cwls-message__bubble {
	border-bottom-right-radius: 5px;
	color: #111;
	background: linear-gradient(135deg, #efd36f, var(--cwls-gold));
}

#cwls-root .cwls-message--operator .cwls-message__bubble {
	border: 1px solid rgba(213, 169, 40, 0.18);
	border-bottom-left-radius: 5px;
	color: #f6f6f6;
	background: #242424;
}

#cwls-root .cwls-message__body {
	margin: 0;
	overflow-wrap: anywhere;
	font-size: 13px;
	line-height: 1.48;
	white-space: pre-wrap;
}

#cwls-root .cwls-message__time {
	display: block;
	margin-top: 3px;
	font-size: 10px;
	line-height: 1.2;
	text-align: right;
	opacity: 0.62;
}

#cwls-root .cwls-composer {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 44px;
	align-items: end;
	gap: 9px;
	flex: 0 0 auto;
	padding: 11px 12px max(11px, env(safe-area-inset-bottom));
	border-top: 1px solid var(--cwls-line);
	background: rgba(8, 8, 8, 0.86);
}

#cwls-root .cwls-composer__input {
	display: block;
	width: 100%;
	min-height: 42px;
	max-height: 112px;
	margin: 0;
	padding: 10px 12px;
	resize: none;
	overflow-y: auto;
	border: 1px solid rgba(255, 255, 255, 0.13);
	border-radius: 14px;
	outline: 0;
	color: #fff;
	background: #202020;
	font-size: 13px;
	line-height: 1.45;
	transition: border-color 140ms ease, box-shadow 140ms ease;
}

#cwls-root .cwls-composer__input::placeholder,
#cwls-root .cwls-field__input::placeholder {
	color: #a8a8a8;
	opacity: 1;
}

#cwls-root .cwls-composer__input:focus,
#cwls-root .cwls-field__input:focus {
	border-color: rgba(213, 169, 40, 0.75);
	box-shadow: 0 0 0 3px rgba(213, 169, 40, 0.1);
}

#cwls-root .cwls-composer__send {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgba(255, 229, 145, 0.58);
	border-radius: 14px;
	color: #111;
	background: linear-gradient(135deg, var(--cwls-gold-light), var(--cwls-gold-dark));
	box-shadow: 0 5px 15px rgba(213, 169, 40, 0.17);
	cursor: pointer;
	transition: transform 140ms ease, filter 140ms ease;
}

#cwls-root .cwls-composer__send:hover,
#cwls-root .cwls-offline__submit:hover,
#cwls-root .cwls-offline__again:hover {
	filter: brightness(1.08);
}

#cwls-root .cwls-composer__send:active {
	transform: scale(0.96);
}

#cwls-root .cwls-composer__send:disabled,
#cwls-root .cwls-offline__submit:disabled {
	cursor: wait;
	filter: grayscale(0.25);
	opacity: 0.62;
}

#cwls-root .cwls-composer__send svg {
	width: 21px;
	height: 21px;
	fill: currentColor;
}

#cwls-root .cwls-offline {
	flex: 1 1 auto;
	min-height: 0;
	padding: 18px 16px max(18px, env(safe-area-inset-bottom));
	overflow-y: auto;
	scrollbar-color: rgba(213, 169, 40, 0.46) transparent;
	scrollbar-width: thin;
	overscroll-behavior: contain;
}

#cwls-root .cwls-offline__intro {
	margin-bottom: 15px;
}

#cwls-root .cwls-offline__intro h3,
#cwls-root .cwls-offline__success h3 {
	margin: 0 0 5px;
	color: var(--cwls-gold-light);
	font-size: 16px;
	font-weight: 760;
}

#cwls-root .cwls-offline__intro p,
#cwls-root .cwls-offline__success p {
	margin: 0;
	color: var(--cwls-muted);
	font-size: 12px;
	line-height: 1.55;
}

#cwls-root .cwls-offline__form,
#cwls-root .cwls-offline__visitor-fields {
	display: flex;
	flex-direction: column;
	gap: 11px;
}

#cwls-root .cwls-offline__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 10px;
}

#cwls-root .cwls-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-width: 0;
}

#cwls-root .cwls-field__label {
	color: #e8e8e8;
	font-size: 11px;
	font-weight: 650;
	letter-spacing: 0.015em;
}

#cwls-root .cwls-field__input {
	display: block;
	width: 100%;
	height: 39px;
	margin: 0;
	padding: 8px 10px;
	border: 1px solid rgba(255, 255, 255, 0.13);
	border-radius: 10px;
	outline: 0;
	color: #fff;
	background: #202020;
	font-size: 12px;
	line-height: 1.4;
	transition: border-color 140ms ease, box-shadow 140ms ease;
}

#cwls-root .cwls-field__textarea {
	height: auto;
	min-height: 82px;
	resize: vertical;
}

#cwls-root .cwls-offline__submit,
#cwls-root .cwls-offline__again {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 42px;
	margin: 2px 0 0;
	padding: 9px 16px;
	border: 1px solid rgba(255, 229, 145, 0.58);
	border-radius: 12px;
	color: #111;
	background: linear-gradient(135deg, var(--cwls-gold-light), var(--cwls-gold-dark));
	box-shadow: 0 6px 18px rgba(213, 169, 40, 0.15);
	font-size: 13px;
	font-weight: 760;
	cursor: pointer;
}

#cwls-root .cwls-offline__success {
	padding: 44px 18px 26px;
	text-align: center;
}

#cwls-root .cwls-offline__success > svg {
	width: 58px;
	height: 58px;
	margin-bottom: 14px;
	fill: var(--cwls-success);
}

#cwls-root .cwls-offline__success p {
	max-width: 260px;
	margin: 0 auto 20px;
}

#cwls-root .cwls-offline__again {
	max-width: 190px;
	margin: 0 auto;
	color: var(--cwls-gold-light);
	background: transparent;
	box-shadow: none;
}

@media (max-width: 600px) {
	#cwls-root .cwls-launcher {
		padding-right: 14px;
		padding-left: 14px;
	}

	#cwls-root.cwls-round-gold-launcher .cwls-launcher {
		padding: 0;
	}

	#cwls-root .cwls-launcher__text {
		font-size: 13px;
	}

	#cwls-root .cwls-popup {
		border-radius: 19px;
	}

	#cwls-root .cwls-popup__header {
		min-height: 70px;
		padding-left: max(13px, env(safe-area-inset-left));
		padding-right: max(11px, env(safe-area-inset-right));
	}

	#cwls-root .cwls-chat__messages {
		padding: 14px 11px;
	}

	#cwls-root .cwls-message__bubble {
		max-width: 88%;
	}

	#cwls-root .cwls-offline {
		padding-right: max(13px, env(safe-area-inset-right));
		padding-left: max(13px, env(safe-area-inset-left));
	}
}

@media (max-width: 380px) {
	#cwls-root .cwls-offline__row {
		grid-template-columns: minmax(0, 1fr);
	}

	#cwls-root .cwls-popup__header {
		grid-template-columns: 42px minmax(0, 1fr) 36px;
		gap: 9px;
	}

	#cwls-root .cwls-avatar {
		width: 42px;
		height: 42px;
	}
}

@media (prefers-reduced-motion: reduce) {
	#cwls-root .cwls-launcher,
	#cwls-root .cwls-popup,
	#cwls-root .cwls-popup button,
	#cwls-root .cwls-popup input,
	#cwls-root .cwls-popup textarea {
		animation: none !important;
		transition: none !important;
	}
}

@media (forced-colors: active) {
	#cwls-root .cwls-launcher,
	#cwls-root .cwls-popup,
	#cwls-root .cwls-popup button,
	#cwls-root .cwls-popup input,
	#cwls-root .cwls-popup textarea {
		border: 1px solid ButtonText;
	}
}

/* Coin Work panel launcher: real PNG at right-centre, with no gold disk. */
@media (max-width: 820px) {
	html body.coinplugin-panel-screen #cwls-root .cwls-launcher {
		position: fixed !important;
		top: 50% !important;
		left: auto !important;
		right: max(8px, env(safe-area-inset-right)) !important;
		bottom: auto !important;
		width: 62px !important;
		height: 62px !important;
		min-width: 62px !important;
		min-height: 62px !important;
		max-width: 62px !important;
		max-height: 62px !important;
		padding: 0 !important;
		border: 0 !important;
		border-radius: 0 !important;
		background: transparent !important;
		box-shadow: none !important;
		transform: translateY(-50%) !important;
	}

	html body.coinplugin-panel-screen #cwls-root .cwls-launcher__icon {
		display: grid !important;
		place-items: center !important;
		width: 62px !important;
		height: 62px !important;
		flex: 0 0 62px !important;
		filter: none !important;
	}

	html body.coinplugin-panel-screen #cwls-root .cwls-launcher__image {
		display: block !important;
		visibility: visible !important;
		width: 100% !important;
		height: 100% !important;
		object-fit: contain !important;
	}

	html body.coinplugin-panel-screen #cwls-root .cwls-launcher__icon::before,
	html body.coinplugin-panel-screen #cwls-root .cwls-launcher__icon::after {
		content: none !important;
		display: none !important;
	}
}


/* iPhone keyboard guard: keep live support above iOS keyboard and remove footer overlap. */
@media (max-width: 820px) {
	html body.coinplugin-panel-screen.cwls-ios-keyboard-open .coinplugin-mobile-footer-nav,
	html body.coinplugin-panel-screen.cwls-ios-keyboard-open #coinpluginPanelBottomMenu,
	html body.coinplugin-panel-screen.cwls-ios-keyboard-open .coinplugin-panel-nav,
	html body.coinplugin-panel-screen.cwls-ios-keyboard-open .coinplugin-mobile-menu-bar {
		opacity: 0 !important;
		visibility: hidden !important;
		pointer-events: none !important;
		transform: translate3d(-50%, calc(130% + env(safe-area-inset-bottom)), 0) !important;
	}

	html body.coinplugin-panel-screen.cwls-ios-keyboard-open #cwls-root {
		--cwls-z-index: 2147483600;
	}

	html body.coinplugin-panel-screen.cwls-ios-keyboard-open #cwls-root .cwls-popup {
		z-index: 2147483602 !important;
		max-height: calc(var(--cwls-visible-vh, 100vh) - 16px) !important;
		border-radius: 18px !important;
	}

	html body.coinplugin-panel-screen.cwls-ios-keyboard-open #cwls-root .cwls-launcher {
		opacity: 0 !important;
		visibility: hidden !important;
		pointer-events: none !important;
	}

	html body.coinplugin-panel-screen.cwls-ios-keyboard-open #cwls-root .cwls-chat__messages {
		-webkit-overflow-scrolling: touch !important;
	}

	html body.coinplugin-panel-screen.cwls-ios-keyboard-open #cwls-root .cwls-composer {
		padding-bottom: max(11px, env(safe-area-inset-bottom)) !important;
	}
}
