/* Parker Levi Assistant — widget styles. Colors come from CSS variables set by the plugin settings. */
.pla {
	--pla-primary: #0B0B0F;
	--pla-accent: #E4232B;
	--pla-text: #FFFFFF;
	--pla-user: #E4232B;
	--pla-bot: #1A1A21;
	--pla-radius: 18px;
	--pla-font: inherit;
	--pla-muted: rgba(255,255,255,.62);
	--pla-border: rgba(255,255,255,.09);
	--pla-input: rgba(255,255,255,.06);
	position: fixed; z-index: 99999; bottom: 22px; right: 22px;
	font-family: var(--pla-font); font-size: 15px; line-height: 1.5; color: var(--pla-text);
	-webkit-font-smoothing: antialiased;
}
.pla[data-pos="left"] { right: auto; left: 22px; }
.pla[data-theme="light"] { --pla-muted: rgba(0,0,0,.55); --pla-border: rgba(0,0,0,.08); --pla-input: rgba(0,0,0,.04); }
.pla *, .pla *::before, .pla *::after { box-sizing: border-box; }
.pla p { margin: 0 0 .55em; } .pla p:last-child { margin-bottom: 0; }
.pla ul { margin: .2em 0 .5em 1.1em; padding: 0; } .pla li { margin: .15em 0; }
.pla a { color: var(--pla-accent); text-decoration: underline; text-underline-offset: 2px; }
.pla-msg--user a { color: inherit; }

/* Launcher */
.pla-launcher {
	display: inline-flex; align-items: center; gap: 10px; border: 0; cursor: pointer;
	background: var(--pla-accent); color: #fff; padding: 12px 18px 12px 14px; border-radius: 999px;
	font: inherit; font-weight: 600; font-size: 14px; letter-spacing: .01em;
	box-shadow: 0 10px 30px rgba(0,0,0,.28), 0 0 0 1px rgba(255,255,255,.06) inset;
	transition: transform .18s ease, box-shadow .18s ease;
}
.pla-launcher:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(0,0,0,.34); }
.pla-launcher-icon { display: inline-flex; }
.pla.pla-open .pla-launcher { display: none; }
@media (max-width: 480px) { .pla-launcher-label { display: none; } .pla-launcher { padding: 14px; } }

/* Proactive nudge */
.pla-proactive {
	position: absolute; bottom: 64px; right: 0; max-width: 280px; cursor: pointer;
	background: var(--pla-primary); color: var(--pla-text); border: 1px solid var(--pla-border);
	padding: 12px 36px 12px 14px; border-radius: 14px; font-size: 14px;
	box-shadow: 0 12px 30px rgba(0,0,0,.28); animation: pla-pop .25s ease;
}
.pla[data-pos="left"] .pla-proactive { right: auto; left: 0; }
.pla-proactive button { position: absolute; top: 6px; right: 8px; border: 0; background: transparent; color: var(--pla-muted); font-size: 18px; cursor: pointer; }

/* Panel */
.pla-panel {
	position: absolute; bottom: 0; right: 0; width: 390px; max-width: calc(100vw - 24px); height: 620px; max-height: calc(100vh - 40px);
	display: none; flex-direction: column; overflow: hidden;
	background: var(--pla-primary); color: var(--pla-text); border-radius: var(--pla-radius);
	border: 1px solid var(--pla-border); box-shadow: 0 30px 80px rgba(0,0,0,.45);
	animation: pla-pop .22s ease;
}
.pla[data-pos="left"] .pla-panel { right: auto; left: 0; }
.pla.pla-open .pla-panel { display: flex; }
.pla-panel--inline { position: static; display: flex; width: 100%; height: 100%; max-height: none; max-width: none; animation: none; }
.pla-inline { width: 100%; }
.pla-inline-root { position: static; }
@media (max-width: 480px) {
	.pla.pla-open { inset: 0; bottom: 0; right: 0; left: 0; }
	.pla.pla-open .pla-panel { width: 100%; height: 100%; max-height: none; max-width: none; border-radius: 0; }
}
@keyframes pla-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

.pla-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--pla-border); background: linear-gradient(180deg, rgba(255,255,255,.04), transparent); }
.pla-avatar { width: 38px; height: 38px; border-radius: 12px; background: var(--pla-accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; letter-spacing: .02em; flex: none; }
.pla-head-text { flex: 1; min-width: 0; }
.pla-title { font-weight: 700; font-size: 15px; letter-spacing: .01em; }
.pla-sub { font-size: 12px; color: var(--pla-muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pla-dot { width: 7px; height: 7px; border-radius: 50%; background: #35c96b; box-shadow: 0 0 0 3px rgba(53,201,107,.18); flex: none; }
.pla-close { border: 0; background: transparent; color: var(--pla-muted); font-size: 26px; line-height: 1; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.pla-close:hover { color: var(--pla-text); background: var(--pla-input); }

.pla-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.pla-msg { display: flex; flex-shrink: 0; }
.pla-msg--user { justify-content: flex-end; }
.pla-bubble { max-width: 84%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; word-wrap: break-word; }
.pla-msg--assistant .pla-bubble { background: var(--pla-bot); border-bottom-left-radius: 6px; }
.pla-msg--user .pla-bubble { background: var(--pla-user); color: #fff; border-bottom-right-radius: 6px; }
.pla[data-theme="light"] .pla-msg--assistant .pla-bubble { color: var(--pla-text); }
.pla-typing { display: inline-flex; gap: 4px; padding: 3px 0; }
.pla-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--pla-muted); animation: pla-blink 1.2s infinite; }
.pla-typing i:nth-child(2) { animation-delay: .2s; } .pla-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes pla-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.pla-starters { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 16px 10px; }
.pla-chip { border: 1px solid var(--pla-border); background: var(--pla-input); color: var(--pla-text); font: inherit; font-size: 13px; padding: 7px 12px; border-radius: 999px; cursor: pointer; transition: border-color .15s; }
.pla-chip:hover { border-color: var(--pla-accent); }

.pla-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 8px; border-top: 1px solid var(--pla-border); }
.pla-input { flex: 1; resize: none; border: 1px solid var(--pla-border); background: var(--pla-input); color: var(--pla-text); font: inherit; font-size: 14.5px; padding: 10px 12px; border-radius: 12px; outline: none; max-height: 120px; }
.pla-input:focus { border-color: var(--pla-accent); }
.pla-input::placeholder { color: var(--pla-muted); }
.pla-send { width: 40px; height: 40px; flex: none; border: 0; border-radius: 12px; background: var(--pla-accent); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pla-send:disabled { opacity: .5; cursor: default; }
.pla-privacy { font-size: 11px; color: var(--pla-muted); text-align: center; padding: 0 12px 10px; }

/* Lead card (compact; hardened against theme form styles) */
.pla-msg--card { justify-content: stretch; }
.pla-card { width: 100%; background: var(--pla-bot); border: 1px solid var(--pla-accent); border-radius: 14px; padding: 10px 12px; animation: pla-pop .25s ease; }
.pla-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 6px; line-height: 1.3; }
.pla-card-x { border: 0; background: transparent; color: var(--pla-muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; margin: 0; width: auto; height: auto; box-shadow: none; }
.pla-card p { font-size: 12px; color: var(--pla-muted); margin: -2px 0 8px; line-height: 1.4; }
.pla-card-form { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0; padding: 0; }
.pla-card-form label { display: block; margin: 0; padding: 0; font-size: 0; line-height: 0; }
.pla-card-form label span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pla-card-form label:nth-child(1), .pla-card-form label:nth-child(2) { grid-column: 1 / -1; }
.pla-card-form input { display: block; width: 100%; height: 36px; min-height: 0; margin: 0; border: 1px solid var(--pla-border); background: var(--pla-input); color: var(--pla-text); font: inherit; font-size: 13.5px; line-height: normal; padding: 0 11px; border-radius: 9px; outline: none; box-shadow: none; -webkit-appearance: none; appearance: none; }
.pla-card-form input::placeholder { color: var(--pla-muted); }
.pla-card-form input:focus { border-color: var(--pla-accent); box-shadow: none; }
.pla-card-err { grid-column: 1 / -1; font-size: 12px; color: #ff6b6b; }
.pla-card-err:empty { display: none; }
.pla-card-btn { grid-column: 1 / -1; display: block; width: 100%; height: 38px; margin: 2px 0 0; border: 0; background: var(--pla-accent); color: #fff; font: inherit; font-weight: 700; font-size: 14px; border-radius: 10px; cursor: pointer; text-transform: none; letter-spacing: 0; box-shadow: none; }
.pla-card-btn:hover { filter: brightness(1.08); }
.pla-card-btn:disabled { opacity: .6; cursor: default; }
.pla-card--done { border-color: rgba(53,201,107,.5); font-size: 14px; padding: 10px 12px; }
