/* 24World Support — lightweight front-end widget. */
.tws-root {
	--tws-primary: #0A1E3C;
	--tws-accent: #C8102E;
	--tws-ink: #14213a;
	--tws-muted: #64748b;
	position: fixed;
	right: max(16px, env(safe-area-inset-right));
	bottom: max(16px, env(safe-area-inset-bottom));
	z-index: 2147483000;
	font-family: inherit;
	color: var(--tws-ink);
}
.tws-root * { box-sizing: border-box; }
.tws-panel[hidden] { display: none !important; }
.tws-bubble {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	min-width: 60px;
	padding: 0;
	border: 1px solid rgba(255,255,255,.28);
	border-radius: 50%;
	background: linear-gradient(145deg, var(--tws-primary), #12315e 68%, var(--tws-accent) 160%);
	color: #fff;
	box-shadow: 0 14px 35px rgba(4, 20, 46, .34), 0 3px 10px rgba(4, 20, 46, .24);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	animation: tws-breathe 3.8s ease-in-out infinite;
}
.tws-root.tws-open .tws-bubble { animation: none; }
.tws-bubble:hover, .tws-bubble:focus-visible { transform: translateY(-2px); outline: 3px solid rgba(200,16,46,.28); outline-offset: 2px; }
.tws-bubble:focus-visible { outline-color: var(--tws-accent); }
.tws-bubble-x {
	display: none;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	font-weight: 400;
	line-height: 1;
	padding-bottom: 3px;
}
.tws-root.tws-open .tws-bubble-avatar { display: none; }
.tws-root.tws-open .tws-bubble-x { display: inline-flex; }
.tws-bubble-avatar, .tws-head-avatar {
	position: relative;
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	overflow: visible;
	border-radius: 50%;
	background: #0A1E3C;
	color: var(--tws-primary);
	font-weight: 800;
}
.tws-bubble-avatar { width: 44px; height: 44px; font-size: 15px; }
.tws-bubble .tws-mascot { background: #0A1E3C; box-shadow: inset 0 0 0 1px rgba(10,30,60,.08); }
.tws-mascot-img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.tws-mascot-video { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; background: #0A1E3C; }
.tws-mascot-still { display: none !important; }
.tws-root.tws-video-off .tws-mascot-video { display: none; }
.tws-root.tws-video-off .tws-mascot-still { display: block !important; }
.tws-mini-avatar .tws-mascot-img { border-radius: 50%; }
.tws-bubble-avatar img, .tws-head-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.tws-presence {
	position: absolute;
	right: -1px;
	bottom: -1px;
	width: 11px;
	height: 11px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #22c55e;
	box-shadow: 0 0 0 3px rgba(34,197,94,.16);
}
.tws-bubble-label { font-size: 14px; font-weight: 800; letter-spacing: .01em; }
.tws-badge {
	position: absolute;
	top: -5px;
	right: -4px;
	min-width: 22px;
	height: 22px;
	padding: 1px 6px;
	border: 2px solid #fff;
	border-radius: 999px;
	background: var(--tws-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	line-height: 18px;
	text-align: center;
}
.tws-panel {
	position: absolute;
	right: 0;
	bottom: 72px;
	display: flex;
	flex-direction: column;
	width: min(392px, calc(100vw - 24px));
	height: min(600px, calc(100dvh - 124px));
	max-height: calc(100dvh - 124px);
	overflow: hidden;
	border: 1px solid rgba(10,30,60,.14);
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 28px 70px rgba(4,20,46,.34), 0 8px 24px rgba(4,20,46,.2);
	transform-origin: bottom right;
	animation: tws-in .22s ease-out;
}
.tws-head {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 14px 14px 13px;
	background: linear-gradient(135deg, var(--tws-primary), #14315f 72%);
	color: #fff;
}
.tws-head-avatar { width: 46px; height: 46px; font-size: 16px; box-shadow: 0 0 0 2px rgba(255,255,255,.24); }
.tws-head-copy { min-width: 0; flex: 1; }
.tws-head-copy strong { display: block; overflow: hidden; font-size: 16px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.tws-head-copy span { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: rgba(255,255,255,.78); font-size: 12px; line-height: 1.25; }
.tws-head-copy i { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.16); }
.tws-voice-toggle {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255,255,255,.12);
	color: #fff;
	cursor: pointer;
}
.tws-voice-toggle svg { display: block; width: 19px; height: 19px; }
.tws-voice-toggle .tws-ic-off { display: none; }
.tws-voice-toggle[aria-pressed="true"] .tws-ic-on { display: none; }
.tws-voice-toggle[aria-pressed="true"] .tws-ic-off { display: block; }
.tws-voice-toggle:hover, .tws-voice-toggle:focus-visible { background: rgba(255,255,255,.22); outline: none; }
.tws-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0 0 3px;
	border: 0;
	border-radius: 50%;
	background: rgba(255,255,255,.12);
	color: #fff;
	font-size: 27px;
	line-height: 1;
	cursor: pointer;
}
.tws-messages {
	flex: 1;
	min-height: 160px;
	overflow-y: auto;
	padding: 16px 13px 10px;
	background:
		radial-gradient(circle at 12% 0%, rgba(200,16,46,.06), transparent 34%),
		linear-gradient(180deg, #f8fafc, #fff 42%);
	scroll-behavior: smooth;
}
.tws-row { display: flex; align-items: flex-end; gap: 7px; margin: 0 0 11px; }
.tws-row.me { justify-content: flex-end; }
.tws-mini-avatar {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 27px;
	height: 27px;
	overflow: hidden;
	border: 1px solid rgba(10,30,60,.1);
	border-radius: 50%;
	background: #fff;
	color: var(--tws-primary);
	font-size: 10px;
	font-weight: 800;
}
.tws-mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tws-msg {
	max-width: 82%;
	padding: 10px 12px;
	border-radius: 16px;
	font-size: 14px;
	line-height: 1.48;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	box-shadow: 0 2px 8px rgba(15,35,65,.06);
}
.tws-row.them .tws-msg { border-bottom-left-radius: 5px; background: #fff; border: 1px solid #e2e8f0; }
.tws-row.me .tws-msg { border-bottom-right-radius: 5px; background: var(--tws-primary); color: #fff; }
.tws-msg a { color: var(--tws-accent); font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.tws-row.me .tws-msg a { color: #fff; }
.tws-typing { display: inline-flex; align-items: center; gap: 4px; height: 18px; }
.tws-typing i { width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; animation: tws-dot 1.1s infinite ease-in-out; }
.tws-typing i:nth-child(2) { animation-delay: .14s; }
.tws-typing i:nth-child(3) { animation-delay: .28s; }
.tws-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 8px 12px 9px; background: #fff; }
.tws-chips button {
	flex: 0 1 auto;
	min-height: 34px;
	padding: 7px 11px;
	border: 1px solid #cbd5e1;
	border-radius: 999px;
	background: #f8fafc;
	color: var(--tws-primary);
	font: inherit;
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
}
.tws-chips button:hover, .tws-chips button:focus-visible { border-color: var(--tws-accent); background: #fff5f6; outline: none; }
.tws-form {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 10px 11px;
	border-top: 1px solid #e2e8f0;
	background: #fff;
}
.tws-form textarea {
	flex: 1;
	min-height: 43px;
	max-height: 108px;
	padding: 11px 12px;
	resize: none;
	border: 1px solid #cbd5e1;
	border-radius: 15px;
	background: #f8fafc;
	color: var(--tws-ink);
	font: inherit;
	font-size: 14px;
	line-height: 1.35;
}
.tws-form textarea:focus { border-color: var(--tws-accent); background: #fff; outline: 3px solid rgba(200,16,46,.14); }
.tws-form button[type="submit"] {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 43px;
	height: 43px;
	border: 0;
	border-radius: 50%;
	background: var(--tws-accent);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 7px 18px rgba(200,16,46,.28);
}
.tws-form button[type="submit"]:disabled { opacity: .55; cursor: wait; }
.tws-foot { margin: 0; padding: 0 14px 10px; background: #fff; color: var(--tws-muted); font-size: 11px; line-height: 1.35; text-align: center; }
.tws-honeypot, .tws-sr { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; padding: 0 !important; margin: -1px !important; }
.tws-noscript { position: fixed; right: 16px; bottom: 16px; z-index: 9999; max-width: 320px; padding: 10px 12px; border-radius: 10px; background: #0A1E3C; color: #fff; font-size: 13px; }
@keyframes tws-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes tws-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes tws-breathe { 0%, 100% { box-shadow: 0 14px 35px rgba(4,20,46,.34), 0 3px 10px rgba(4,20,46,.24); } 50% { box-shadow: 0 16px 38px rgba(4,20,46,.38), 0 0 0 6px rgba(200,16,46,.08); } }
@media (max-width: 700px) {
	body.twn-has-mobile-ad .tws-root { bottom: max(82px, env(safe-area-inset-bottom)); }
	.tws-root { right: max(12px, env(safe-area-inset-right)); }
	.tws-bubble { width: 56px; height: 56px; min-width: 56px; }
	.tws-bubble-avatar { width: 42px; height: 42px; }
	.tws-panel { bottom: 74px; width: min(384px, calc(100vw - 20px)); height: min(548px, calc(100dvh - 150px)); max-height: calc(100dvh - 150px); border-radius: 22px; }
	body.twn-has-mobile-ad .tws-panel { height: min(548px, calc(100dvh - 168px)); max-height: calc(100dvh - 168px); }
	.tws-msg { max-width: 86%; }
}
@media (prefers-reduced-motion: reduce) {
	.tws-bubble, .tws-panel, .tws-typing i, .tws-mascot-img { animation: none !important; }
	.tws-mascot-video { display: none !important; }
	.tws-mascot-still { display: block !important; }
	.tws-messages { scroll-behavior: auto; }
}
