#paa-widget-root {
	position: fixed;
	bottom: 24px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
#paa-widget-root.paa-pos-right { right: 24px; }
#paa-widget-root.paa-pos-left { left: 24px; }

.paa-bubble-btn {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0,0,0,0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	transition: transform 0.15s ease;
	position: relative;
}
.paa-bubble-btn:hover { transform: scale(1.06); }
.paa-bubble-btn svg { width: 28px; height: 28px; }

.paa-bubble-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	background: #ff4444;
	color: #fff;
	border-radius: 50%;
	width: 18px;
	height: 18px;
	font-size: 11px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
}

.paa-panel {
	position: absolute;
	bottom: 76px;
	width: 340px;
	max-width: calc(100vw - 32px);
	height: 460px;
	max-height: 70vh;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 10px 40px rgba(0,0,0,0.2);
	display: none;
	flex-direction: column;
	overflow: hidden;
}
#paa-widget-root.paa-pos-right .paa-panel { right: 0; }
#paa-widget-root.paa-pos-left .paa-panel { left: 0; }
.paa-panel.paa-open { display: flex; }

.paa-panel-header {
	padding: 14px 16px;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
}
.paa-panel-header-title {
	font-size: 14px;
	font-weight: 600;
}
.paa-panel-header-sub {
	font-size: 11px;
	opacity: 0.85;
	margin-top: 2px;
	max-width: 260px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.paa-panel-close {
	background: transparent;
	border: none;
	color: #fff;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	opacity: 0.85;
	padding: 4px;
}
.paa-panel-close:hover { opacity: 1; }

.paa-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	background: #f7f8fa;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.paa-msg {
	max-width: 85%;
	padding: 9px 12px;
	border-radius: 12px;
	font-size: 13.5px;
	line-height: 1.4;
	white-space: pre-wrap;
	word-wrap: break-word;
}
.paa-msg-assistant {
	background: #fff;
	color: #222;
	align-self: flex-start;
	border-bottom-left-radius: 4px;
	box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.paa-msg-user {
	color: #fff;
	align-self: flex-end;
	border-bottom-right-radius: 4px;
}
.paa-msg-typing {
	font-style: italic;
	color: #888;
}

.paa-sources {
	margin-top: 8px;
	padding-top: 6px;
	border-top: 1px solid #eee;
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.paa-sources-label {
	font-size: 10.5px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: #999;
	margin-bottom: 2px;
}
.paa-source-link {
	font-size: 12px;
	color: #1a73e8;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}
.paa-source-link:hover {
	text-decoration: underline;
}

.paa-contact-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 14px;
	background: #f0f2f5;
	border-bottom: 1px solid #e6e6e6;
	flex-shrink: 0;
}
.paa-contact-label {
	font-size: 11px;
	color: #666;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.paa-contact-icons {
	display: flex;
	gap: 6px;
	flex-shrink: 0;
}
.paa-contact-icon {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	flex-shrink: 0;
}
.paa-contact-icon svg { width: 16px; height: 16px; }
.paa-contact-whatsapp { background: #25D366; }
.paa-contact-viber { background: #7360F2; }
.paa-contact-telegram { background: #229ED9; }
.paa-contact-call { background: #555; }

.paa-draft-actions {
	margin-top: 10px;
	padding-top: 8px;
	border-top: 1px solid #eee;
}
.paa-draft-actions-label {
	font-size: 11px;
	color: #777;
	margin-bottom: 6px;
}

.paa-input-row {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid #eee;
	background: #fff;
	flex-shrink: 0;
}
.paa-input {
	flex: 1;
	resize: none;
	border: 1px solid #ddd;
	border-radius: 10px;
	padding: 8px 10px !important;
	font-size: 13.5px;
	font-family: inherit;
	line-height: 1.3 !important;
	box-sizing: border-box !important;
	height: 38px !important;
	min-height: 38px !important;
	max-height: 70px !important;
	outline: none;
}
.paa-input:focus { border-color: #bbb; }

.paa-send-btn {
	border: none;
	color: #fff;
	border-radius: 10px;
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
}
.paa-send-btn:disabled { opacity: 0.5; cursor: default; }
.paa-send-btn svg { width: 18px; height: 18px; }

@media (max-width: 480px) {
	.paa-panel {
		width: calc(100vw - 24px);
		height: 65vh;
	}
}
