:root {
	--pt-primary: #FF9800;
	--pt-primary-dark: #E68900;
	--pt-primary-soft: #fff2e8;
	--pt-surface: #ffffff;
	--pt-surface-alt: #f5f6f7;
	--pt-text: #252525;
	--pt-text-muted: #707780;
	--pt-border: #dfe3e7;
	--pt-success: #2d9b58;
	--pt-offline: #9aa1a8;
	--pt-danger: #dc3545;
	--pt-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
	--pt-radius: 18px;
	--pt-font: "Inter", sans-serif;
}

.chat-launcher,
.chat-panel,
.chat-panel * {
	box-sizing: border-box;
	font: inherit;
}

.chat-launcher,
.chat-panel button,
.chat-panel input,
.chat-panel textarea {
	font-family: var(--pt-font);
}

.chat-launcher {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 2147483000;
	width: 60px;
	height: 60px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	padding: 0;
	color: #fff;
	background: var(--pt-primary);
	box-shadow: 0 12px 30px rgba(255, 122, 24, 0.32);
	cursor: pointer;
	transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.chat-launcher:hover {
	background: var(--pt-primary-dark);
	transform: translateY(-2px);
	box-shadow: 0 15px 34px rgba(255, 122, 24, 0.38);
}

.chat-launcher:focus-visible,
.chat-close:focus-visible,
.chat-submit:focus-visible,
.chat-input:focus-visible,
.chat-textarea:focus-visible {
	outline: 3px solid rgba(255, 122, 24, .3);
	outline-offset: 2px;
}

.chat-launcher__chat-icon {
	width: 29px;
	height: 29px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.chat-launcher__chat-icon circle {
	fill: currentColor;
	stroke: none;
}

.chat-notification-badge {
	position: absolute;
	top: -5px;
	right: -5px;
	min-width: 23px;
	height: 23px;
	padding: 0 6px;
	display: none;
	align-items: center;
	justify-content: center;
	border: 2px solid #fff;
	border-radius: 999px;
	color: #fff;
	background: var(--pt-danger);
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

.chat-notification-badge.is-visible { display: flex; }
.chat-launcher.has-notifications { animation: pt-chat-pulse .45s ease; }

.chat-panel {
	position: fixed;
	right: 24px;
	bottom: 96px;
	z-index: 2147482999;
	width: min(380px, calc(100vw - 32px));
	height: min(620px, calc(100vh - 128px));
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	overflow: hidden;
	border: 1px solid rgba(0, 0, 0, .06);
	border-radius: var(--pt-radius);
	background: var(--pt-surface);
	box-shadow: var(--pt-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(16px) scale(.98);
	transform-origin: bottom right;
	pointer-events: none;
	transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.chat-panel.is-open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

.chat-header {
	min-height: 66px;
	padding: 10px 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	color: #fff;
	background: linear-gradient(135deg, var(--pt-primary), var(--pt-primary-dark));
}

.chat-brand {
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.chat-brand__logo {
	flex-basis: 34px;
	width: 34px;
	height: 34px;
	flex: 0 0 34px;
	display: grid;
	place-items: center;
	border: 1px solid rgba(255,255,255,.36);
	border-radius: 11px;
	background: rgba(255,255,255,.16);
	color: #fff;
	font-size: 20px;
	font-weight: 700;
}

.chat-brand__content { min-width: 0; }
.chat-brand__title { font-size: 17px; font-weight: 700; line-height: 1.2; }

.chat-presence {
	margin-top: 3px;
	display: flex;
	align-items: center;
	gap: 6px;
	color: rgba(255,255,255,.95);
	font-size: 11px;
	line-height: 1.25;
}

.chat-presence__dot {
	flex: 0 0 7px;
	width: 7px;
	height: 7px;
	border: 1px solid rgba(255,255,255,.9);
	border-radius: 50%;
	background: var(--pt-offline);
}

.chat-presence.is-online .chat-presence__dot { background: #55d986; }
.chat-presence.is-offline .chat-presence__dot { background: rgba(255,255,255,.42); }

.chat-close {
	flex-basis: 34px;
	width: 34px;
	height: 34px;
	flex: 0 0 34px;
	border: 0;
	border-radius: 10px;
	color: #fff;
	background: transparent;
	font-size: 31px;
	line-height: 1;
	cursor: pointer;
}

.chat-close:hover { background: rgba(255,255,255,.14); }

.chat-messages {
	padding: 10px 12px 8px;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--pt-surface-alt);
	scrollbar-width: thin;
	scrollbar-color: #aeb4ba transparent;
}

.chat-messages::-webkit-scrollbar { width: 8px; }
.chat-messages::-webkit-scrollbar-thumb { background: #aeb4ba; border-radius: 999px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }

.chat-row { display: flex; margin-bottom: 7px; }
.chat-row--support { justify-content: flex-start; }
.chat-row--user { justify-content: flex-end; }

.chat-bubble {
	padding: 7px 10px 6px;
	border-radius: 13px;
	min-width: 96px;
	max-width: 82%;
	box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

.chat-bubble--support {
	border: 1px solid var(--pt-border);
	border-bottom-left-radius: 6px;
	color: var(--pt-text);
	background: var(--pt-surface);
}

.chat-bubble--user {
	border-bottom-right-radius: 6px;
	color: #fff;
	background: var(--pt-primary);
}

.chat-bubble--user.is-sending { opacity: .72; }
.chat-bubble--user.is-error { background: var(--pt-danger); }

.chat-bubble__author {
	margin-bottom: 2px;
	color: var(--pt-primary-dark);
	font-size: 12px;
	font-weight: 700;
}

.chat-bubble__text {
	color: inherit;
	font-size: 14px;
	line-height: 1.42;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.chat-bubble__meta {
	margin-top: 3px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 7px;
	color: var(--pt-text-muted);
	font-size: 10px;
}

.chat-bubble--user .chat-bubble__meta { color: rgba(255,255,255,.84); }
.chat-delivery { font-weight: 600; }

.chat-retry {
	border: 0;
	padding: 0;
	color: inherit;
	background: transparent;
	font-size: 10px;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}

.chat-form {
	padding: 9px 12px 10px;
	border-top: 1px solid var(--pt-border);
	background: var(--pt-surface);
}

.chat-label {
	display: block;
	margin: 0 0 3px;
	color: var(--pt-text-muted);
	font-size: 12px;
	font-weight: 700;
}

.chat-label:not(:first-child) { margin-top: 6px; }

.chat-input,
.chat-textarea {
	width: 100%;
	border: 1px solid var(--pt-border);
	border-radius: 11px;
	padding: 8px 10px;
	color: var(--pt-text);
	background: #fff;
	font-size: 14px;
	line-height: 1.4;
	transition: border-color .16s ease, box-shadow .16s ease;
}

.chat-input { height: 38px; }
.chat-textarea { 
	min-height: 58px;
	max-height: 110px;
	resize: vertical; 
	}

.chat-input:focus,
.chat-textarea:focus {
	border-color: var(--pt-primary);
	box-shadow: 0 0 0 3px rgba(255,122,24,.13);
	outline: none;
}

.chat-status {
	min-height: 14px;
	margin: 3px 1px;
	color: var(--pt-text-muted);
	font-size: 11px;
}

.chat-submit {
	width: 100%;
	min-height: 38px;
	border: 0;
	border-radius: 11px;
	color: #fff;
	background: var(--pt-primary);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background .16s ease, transform .16s ease;
}

.chat-submit:hover { background: var(--pt-primary-dark); }
.chat-submit:active { transform: translateY(1px); }
.chat-submit:disabled { opacity: .6; cursor: wait; }

.chat-typing-indicator {
	min-height: 20px;
	padding: 3px 12px 5px;
	border-top: 1px solid var(--pt-border);
	color: var(--pt-text-muted);
	background: var(--pt-surface);
	font-size: 12px;
	font-style: italic;
}
.chat-typing-indicator[hidden] { display: none; }

@keyframes pt-chat-pulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.09); }
}

@media (max-width: 560px) {
	.chat-launcher { right: 16px; bottom: 16px; }
	.chat-panel {
		right: 10px;
		bottom: 86px;
		width: calc(100vw - 20px);
		height: min(650px, calc(100vh - 102px));
		border-radius: 16px;
	}
}

@media (max-height: 650px) and (min-width: 561px) {
	.chat-panel { height: calc(100vh - 112px); bottom: 88px; }
}

@media (prefers-reduced-motion: reduce) {
	.chat-launcher,
	.chat-panel,
	.chat-submit { transition: none; animation: none; }
}

//////////////////////


.chat-typing-indicator {
	min-height: 20px;
	padding: 3px 12px 5px;
}