/* Passmasters Assistant — widget styles
   Brand: green #69BE28 · charcoal #27312D · Montserrat headings */

.pma-root {
	--pma-green: #69be28;
	--pma-green-dark: #55a01d;
	--pma-charcoal: #27312d;
	--pma-ink: #1c211f;
	--pma-paper: #ffffff;
	--pma-mist: #f2f4f1;
	--pma-line: #e2e6e0;
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 999999;
	font-family: 'Proza Libre', 'Helvetica Neue', Arial, sans-serif;
	font-size: 15px;
	line-height: 1.55;
}

.pma-root, .pma-root * { box-sizing: border-box; }

/* ---------- Launcher bubble ---------- */

.pma-launcher {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	margin-left: auto;
	border: none;
	border-radius: 50%;
	background: var(--pma-green);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(39, 49, 45, 0.35);
	transition: transform 0.15s ease, background 0.15s ease;
}
.pma-launcher:hover { background: var(--pma-green-dark); transform: scale(1.06); }
.pma-launcher:focus-visible { outline: 3px solid var(--pma-charcoal); outline-offset: 2px; }
.pma-launcher .pma-ic-close { display: none; }
.pma-open .pma-launcher .pma-ic-chat { display: none; }
.pma-open .pma-launcher .pma-ic-close { display: block; }

/* ---------- Panel ---------- */

.pma-panel {
	display: none;
	flex-direction: column;
	width: 370px;
	max-width: calc(100vw - 40px);
	height: 540px;
	max-height: calc(100vh - 120px);
	margin-bottom: 14px;
	background: var(--pma-paper);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 12px 40px rgba(39, 49, 45, 0.3);
}
.pma-open .pma-panel { display: flex; animation: pma-pop 0.18s ease-out; }

@keyframes pma-pop {
	from { opacity: 0; transform: translateY(10px) scale(0.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
	.pma-open .pma-panel { animation: none; }
	.pma-launcher { transition: none; }
}

/* ---------- Header ---------- */

.pma-header {
	padding: 16px 18px 14px;
	background: var(--pma-charcoal);
	border-bottom: 4px solid var(--pma-green);
}
.pma-title {
	font-family: Montserrat, 'Helvetica Neue', Arial, sans-serif;
	font-weight: 800;
	font-size: 17px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #fff;
}
.pma-subtitle { margin-top: 2px; font-size: 12.5px; color: rgba(255, 255, 255, 0.75); }

/* ---------- Message log ---------- */

.pma-log {
	flex: 1;
	overflow-y: auto;
	padding: 16px 14px 8px;
	background: var(--pma-mist);
}
.pma-msg {
	max-width: 85%;
	margin-bottom: 10px;
	padding: 10px 13px;
	border-radius: 12px;
	white-space: normal;
	word-wrap: break-word;
	overflow-wrap: anywhere;
}
.pma-msg-assistant {
	background: var(--pma-paper);
	color: var(--pma-ink);
	border: 1px solid var(--pma-line);
	border-bottom-left-radius: 4px;
}
.pma-msg-user {
	margin-left: auto;
	background: var(--pma-green);
	color: #fff;
	border-bottom-right-radius: 4px;
}
.pma-msg a { color: var(--pma-green-dark); font-weight: 600; text-decoration: underline; }
.pma-msg-user a { color: #fff; }

/* Typing indicator */
.pma-typing { display: inline-flex; gap: 5px; padding: 14px 16px; }
.pma-typing span {
	width: 7px; height: 7px; border-radius: 50%;
	background: var(--pma-green);
	animation: pma-blink 1.2s infinite ease-in-out;
}
.pma-typing span:nth-child(2) { animation-delay: 0.15s; }
.pma-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes pma-blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

/* ---------- Quick chips ---------- */

.pma-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 8px 14px;
	background: var(--pma-mist);
}
.pma-chips.pma-hidden { display: none; }
.pma-chip {
	padding: 6px 11px;
	border: 1.5px solid var(--pma-green);
	border-radius: 999px;
	background: var(--pma-paper);
	color: var(--pma-charcoal);
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.12s ease, color 0.12s ease;
}
.pma-chip:hover { background: var(--pma-green); color: #fff; }
.pma-chip:focus-visible { outline: 2px solid var(--pma-charcoal); outline-offset: 1px; }

/* ---------- Input ---------- */

.pma-form {
	display: flex;
	gap: 8px;
	padding: 10px 12px;
	background: var(--pma-paper);
	border-top: 1px solid var(--pma-line);
}
.pma-input {
	flex: 1;
	padding: 10px 13px;
	border: 1.5px solid var(--pma-line);
	border-radius: 10px;
	font: inherit;
	color: var(--pma-ink);
	background: var(--pma-paper);
}
.pma-input:focus { outline: none; border-color: var(--pma-green); box-shadow: 0 0 0 3px rgba(105, 190, 40, 0.2); }
.pma-send {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	border: none;
	border-radius: 10px;
	background: var(--pma-green);
	color: #fff;
	cursor: pointer;
	transition: background 0.12s ease;
}
.pma-send:hover { background: var(--pma-green-dark); }
.pma-send:disabled { opacity: 0.55; cursor: default; }
.pma-send:focus-visible { outline: 2px solid var(--pma-charcoal); outline-offset: 1px; }

/* ---------- Footer ---------- */

.pma-footer {
	padding: 7px 14px 9px;
	background: var(--pma-paper);
	font-size: 11px;
	color: #6b746f;
	text-align: center;
}
.pma-footer a { color: var(--pma-green-dark); }

/* ---------- Mobile ---------- */

@media (max-width: 480px) {
	.pma-root { right: 12px; bottom: 12px; }
	.pma-panel { width: calc(100vw - 24px); height: min(560px, calc(100vh - 100px)); }
}
