/* PayLocker Assistant — widget styles
 * Brand: navy #003B73, accent blue #00A3FB, grey #4D4D4D
 */

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

.pla-launcher {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 999999;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 18px;
	border: none;
	border-radius: 999px;
	background: #003B73;
	color: #fff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(0, 59, 115, 0.28);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pla-launcher:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 24px rgba(0, 59, 115, 0.34);
}

.pla-launcher:focus-visible {
	outline: 3px solid #00A3FB;
	outline-offset: 2px;
}

.pla-launcher svg {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
}

.pla-launcher.pla-hidden {
	display: none;
}

/* Panel */
.pla-panel {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 999999;
	width: 380px;
	max-width: calc(100vw - 32px);
	height: 560px;
	max-height: calc(100vh - 40px);
	display: none;
	flex-direction: column;
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 18px 50px rgba(0, 20, 45, 0.28);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #1c2733;
}

.pla-panel.pla-open {
	display: flex;
}

/* Header */
.pla-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 18px;
	background: #003B73;
	color: #fff;
}

.pla-header-title {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.pla-header-title strong {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.2px;
}

.pla-header-title span {
	font-size: 12px;
	opacity: 0.82;
}

.pla-close {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 6px;
	border-radius: 6px;
}

.pla-close:hover {
	background: rgba(255, 255, 255, 0.14);
}

/* Messages */
.pla-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	background: #f5f8fb;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.pla-msg {
	max-width: 85%;
	padding: 10px 14px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.5;
	white-space: pre-wrap;
	word-wrap: break-word;
}

.pla-msg-bot {
	align-self: flex-start;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-bottom-left-radius: 4px;
	color: #1c2733;
}

.pla-msg-bot.pla-critical {
	border-color: #f0b429;
	background: #fffaf0;
}

.pla-msg-user {
	align-self: flex-end;
	background: #003B73;
	color: #fff;
	border-bottom-right-radius: 4px;
}

/* Audience chips */
.pla-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-self: flex-start;
	max-width: 100%;
}

.pla-chip {
	border: 1px solid #00A3FB;
	background: #fff;
	color: #003B73;
	border-radius: 999px;
	padding: 7px 13px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.12s ease, color 0.12s ease;
}

.pla-chip:hover {
	background: #00A3FB;
	color: #fff;
}

/* Talk to us link under a bot message */
.pla-talk {
	align-self: flex-start;
	margin-top: -4px;
}

.pla-talk a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #003B73;
	text-decoration: none;
	border-bottom: 1px solid rgba(0, 59, 115, 0.35);
	padding-bottom: 1px;
}

.pla-talk a:hover {
	color: #00A3FB;
	border-color: #00A3FB;
}

.pla-talk.pla-talk-critical a {
	background: #003B73;
	color: #fff;
	padding: 8px 14px;
	border-radius: 8px;
	border: none;
}

.pla-talk.pla-talk-critical a:hover {
	background: #00538f;
	color: #fff;
}

/* Typing indicator */
.pla-typing {
	align-self: flex-start;
	display: inline-flex;
	gap: 4px;
	padding: 12px 14px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	border-bottom-left-radius: 4px;
}

.pla-typing span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #9aa8b8;
	animation: pla-bounce 1.2s infinite ease-in-out;
}

.pla-typing span:nth-child(2) { animation-delay: 0.15s; }
.pla-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes pla-bounce {
	0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
	40% { transform: translateY(-4px); opacity: 1; }
}

/* Composer */
.pla-composer {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid #e6edf3;
	background: #fff;
}

.pla-input {
	flex: 1;
	resize: none;
	border: 1px solid #cdd8e3;
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 14px;
	font-family: inherit;
	line-height: 1.4;
	max-height: 120px;
	color: #1c2733;
}

.pla-input:focus {
	outline: none;
	border-color: #00A3FB;
	box-shadow: 0 0 0 3px rgba(0, 163, 251, 0.15);
}

.pla-send {
	flex: 0 0 auto;
	border: none;
	background: #003B73;
	color: #fff;
	border-radius: 10px;
	width: 42px;
	height: 42px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.pla-send:hover { background: #00538f; }
.pla-send:disabled { opacity: 0.5; cursor: default; }
.pla-send svg { width: 18px; height: 18px; }

.pla-footer {
	text-align: center;
	font-size: 11px;
	color: #8a97a6;
	padding: 6px 0 10px;
	background: #fff;
}

@media (max-width: 480px) {
	.pla-panel {
		right: 8px;
		bottom: 8px;
		height: calc(100vh - 16px);
	}
	.pla-launcher {
		right: 12px;
		bottom: 12px;
	}
}
