/* ============================================================
   Puro Chat — frontin tyylit
   Värit tulevat inline-muuttujina asetuksista (Puro_Chat_Settings::css_variables).
   Kaikki säännöt on rajattu .puro-chat-root -juureen, jotta teema ei vuoda
   sisään eikä chat vuoda ulos.
   ============================================================ */

.puro-chat-root {
	/* Varmuuskopio, jos inline-muuttujia ei jostain syystä tule. */
	--pc-primary: #003E33;
	--pc-deep: #002A22;
	--pc-accent: #B89B6E;
	--pc-surface: #F7F2E8;
	--pc-ink: #001E18;
	--pc-primary-rgb: 0, 62, 51;
	--pc-accent-rgb: 184, 155, 110;
	--pc-font-heading: 'Fraunces', 'Times New Roman', serif;
	--pc-font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

	--pc-white: #FFFFFF;
	--pc-line: rgba(var(--pc-primary-rgb), 0.12);
	--pc-line-strong: rgba(var(--pc-primary-rgb), 0.2);
	--pc-mute: rgba(var(--pc-primary-rgb), 0.62);
	--pc-on-dark: #F1E9D6;
	--pc-on-dark-mute: rgba(241, 233, 214, 0.72);

	--pc-radius: 22px;
	--pc-radius-sm: 14px;
	--pc-ease: cubic-bezier(0.22, 1, 0.36, 1);
	/* Kevyt yliheilahdus avautumiseen — tekee liikkeestä elävän, ei mekaanisen. */
	--pc-spring: cubic-bezier(0.34, 1.4, 0.64, 1);

	/* Kerroksittainen varjo: tiukka kontaktivarjo, pehmeä keskikerros ja
	   laaja ambientti. Yksi iso varjo näyttäisi litteältä. */
	--pc-shadow:
		0 1px 2px rgba(0, 30, 24, 0.09),
		0 12px 24px -12px rgba(0, 30, 24, 0.22),
		0 40px 80px -32px rgba(0, 30, 24, 0.45);

	/* Hienovarainen rakeisuus, joka pehmentää liukuvärit — sama tuntu kuin
	   painetussa materiaalissa. Upotettu SVG, ei ulkoista tiedostoa. */
	--pc-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");

	--pc-gap: 24px;
	--pc-z: 999998;

	/* Kuinka paljon alareunassa on väistettävää (esim. teeman kiinteä
	   CTA-palkki). Skripti kirjoittaa arvon, CSS vain käyttää sitä. */
	--pc-avoid: 0px;

	font-family: var(--pc-font-body);
	font-size: 15px;
	line-height: 1.6;
	color: var(--pc-ink);
	-webkit-font-smoothing: antialiased;
}

.puro-chat-root *,
.puro-chat-root *::before,
.puro-chat-root *::after {
	box-sizing: border-box;
}

.puro-chat-root button {
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	color: inherit;
	margin: 0;
	cursor: pointer;
}

.puro-chat-root :focus-visible {
	outline: 2px solid var(--pc-accent);
	outline-offset: 2px;
}

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

.pc-launcher {
	position: fixed;
	bottom: calc(var(--pc-gap) + var(--pc-avoid));
	right: var(--pc-gap);
	left: auto;
	z-index: var(--pc-z);
	width: 60px;
	height: 60px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: radial-gradient(120% 120% at 30% 20%, #126B58 0%, var(--pc-primary) 55%, var(--pc-deep) 100%);
	background-color: var(--pc-primary);
	color: var(--pc-on-dark);
	box-shadow:
		0 2px 6px rgba(0, 30, 24, 0.28),
		0 14px 30px -10px rgba(0, 30, 24, 0.5),
		inset 0 1px 0 rgba(255, 255, 255, 0.14);
	/* Muunnos kootaan muuttujista, jotta magneettinen veto (--pull), hoverin
	   nosto (--lift) ja painallus (--scale) eivät ylikirjoita toisiaan —
	   transform kun on yksi ainoa ominaisuus.
	   bottom on mukana, jotta kupla liukuu pehmeästi CTA-palkin tieltä. */
	transform:
		translate(var(--pull-x, 0px), calc(var(--pull-y, 0px) + var(--lift, 0px)))
		scale(var(--scale, 1));
	transition: transform 0.3s var(--pc-ease), box-shadow 0.4s var(--pc-ease),
		bottom 0.35s var(--pc-ease);
}

/* Hitaasti hengittävä kultakehä. Kertoo että botti on hereillä ilman
   että mikään vilkkuu tai vaatii huomiota. */
.pc-launcher::before {
	content: '';
	position: absolute;
	inset: -3px;
	border-radius: 50%;
	border: 1px solid rgba(var(--pc-accent-rgb), 0.5);
	opacity: 0;
	transform: scale(0.94);
	animation: pc-aura 5.5s var(--pc-ease) infinite;
	pointer-events: none;
}

@keyframes pc-aura {
	0% { opacity: 0; transform: scale(0.94); }
	35% { opacity: 0.55; }
	100% { opacity: 0; transform: scale(1.22); }
}

.puro-chat-root.is-open .pc-launcher::before {
	animation: none;
	opacity: 0;
}

.puro-chat-root--left .pc-launcher {
	right: auto;
	left: var(--pc-gap);
}

.pc-launcher:hover {
	--lift: -3px;
	--scale: 1.05;
	box-shadow:
		0 4px 10px rgba(0, 30, 24, 0.3),
		0 22px 44px -12px rgba(0, 30, 24, 0.55),
		0 0 0 6px rgba(var(--pc-accent-rgb), 0.15),
		inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.pc-launcher:active {
	--lift: -1px;
	--scale: 0.95;
	transition-duration: 0.12s;
}

/* Kaksi ikonia päällekkäin: vaihtuvat pehmeästi kun paneeli avautuu. */
.pc-launcher__icon {
	grid-area: 1 / 1;
	width: 26px;
	height: 26px;
	transition: opacity 0.3s var(--pc-ease), transform 0.4s var(--pc-ease);
}

.pc-launcher__icon--close {
	opacity: 0;
	transform: rotate(-90deg) scale(0.6);
}

.puro-chat-root.is-open .pc-launcher__icon--chat {
	opacity: 0;
	transform: rotate(90deg) scale(0.6);
}

.puro-chat-root.is-open .pc-launcher__icon--close {
	opacity: 1;
	transform: none;
}

/* Lukematon-merkki, kun muistutus on näytetty eikä chattia ole avattu. */
.pc-launcher__badge {
	position: absolute;
	top: 2px;
	right: 2px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: var(--pc-accent);
	color: var(--pc-deep);
	font-size: 11px;
	font-weight: 600;
	line-height: 18px;
	text-align: center;
	opacity: 0;
	transform: scale(0.4);
	transition: opacity 0.3s var(--pc-ease), transform 0.4s var(--pc-ease);
}

.puro-chat-root.has-unread .pc-launcher__badge {
	opacity: 1;
	transform: none;
}

.puro-chat-root.is-open .pc-launcher__badge {
	opacity: 0;
}

/* ------------------------------------------------------------ Muistutuskupla */

.pc-nudge {
	position: fixed;
	bottom: calc(var(--pc-gap) + 74px + var(--pc-avoid));
	right: var(--pc-gap);
	left: auto;
	z-index: var(--pc-z);
	max-width: 250px;
	padding: 12px 34px 12px 15px;
	border: 1px solid var(--pc-line);
	border-radius: var(--pc-radius-sm);
	background: var(--pc-white);
	color: var(--pc-ink);
	font-size: 14px;
	text-align: left;
	box-shadow: 0 18px 40px -20px rgba(0, 30, 24, 0.4);
	opacity: 0;
	transform: translateY(10px) scale(0.96);
	pointer-events: none;
	transition: opacity 0.4s var(--pc-ease), transform 0.5s var(--pc-ease),
		bottom 0.35s var(--pc-ease);
}

.puro-chat-root--left .pc-nudge {
	right: auto;
	left: var(--pc-gap);
}

.puro-chat-root.has-nudge .pc-nudge {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

.pc-nudge__close {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 22px;
	height: 22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--pc-mute);
	font-size: 15px;
	line-height: 1;
}

.pc-nudge__close:hover {
	background: rgba(var(--pc-primary-rgb), 0.07);
}

/* ------------------------------------------------------------ Paneeli */

.pc-panel {
	position: fixed;
	bottom: calc(var(--pc-gap) + 74px + var(--pc-avoid));
	right: var(--pc-gap);
	left: auto;
	z-index: var(--pc-z);
	display: flex;
	flex-direction: column;
	width: min(400px, calc(100vw - 2 * var(--pc-gap)));
	height: min(620px, calc(100vh - var(--pc-gap) * 2 - 84px - var(--pc-avoid)));
	border-radius: var(--pc-radius);
	background: var(--pc-surface);
	box-shadow: var(--pc-shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
	overflow: hidden;
	opacity: 0;
	/* Avautuu launcherin nurkasta: pieni siirtymä + kutistus, jotta paneeli
	   näyttää kasvavan napista eikä ilmestyvän tyhjästä. */
	transform: translateY(22px) scale(0.9);
	transform-origin: bottom right;
	visibility: hidden;
	transition: opacity 0.28s var(--pc-ease), transform 0.5s var(--pc-spring),
		visibility 0s linear 0.5s;
}

.puro-chat-root--left .pc-panel {
	right: auto;
	left: var(--pc-gap);
	transform-origin: bottom left;
}

.puro-chat-root.is-open .pc-panel {
	opacity: 1;
	transform: none;
	visibility: visible;
	transition-delay: 0s;
}

/* Upotettu versio: ei kelluntaa, ei launcheria. */
.puro-chat-root--inline {
	display: block;
	max-width: 560px;
	margin: 2rem auto;
}

.puro-chat-root--inline .pc-panel {
	position: relative;
	inset: auto;
	width: 100%;
	height: var(--pc-inline-height, 520px);
	opacity: 1;
	transform: none;
	visibility: visible;
	border: 1px solid var(--pc-line);
	box-shadow: 0 24px 60px -34px rgba(0, 30, 24, 0.35);
}

/* ------------------------------------------------------------ Otsikkopalkki */

.pc-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 17px 16px 16px 18px;
	/* Kaksi liukuväriä päällekkäin: hitaasti liikkuva valokeila ylhäällä ja
	   staattinen perusväri alla. Liike on tarkoituksella niin hidas, ettei
	   sitä huomaa katsomatta — se vain tekee pinnasta elävän. */
	background:
		radial-gradient(120% 160% at 15% 0%, rgba(var(--pc-accent-rgb), 0.28) 0%, transparent 55%),
		radial-gradient(90% 140% at 95% 10%, rgba(31, 122, 102, 0.55) 0%, transparent 60%),
		linear-gradient(135deg, #0F5A4B 0%, var(--pc-primary) 48%, var(--pc-deep) 100%);
	background-size: 180% 180%, 180% 180%, 100% 100%;
	background-position: 0% 0%, 100% 0%, 0 0;
	animation: pc-drift 22s ease-in-out infinite alternate;
	background-color: var(--pc-primary);
	color: var(--pc-on-dark);
	position: relative;
	isolation: isolate;
}

@keyframes pc-drift {
	to { background-position: 40% 30%, 60% 40%, 0 0; }
}

/* Rakeisuus tasoittaa liukuvärien vyöhykkeet. */
.pc-header::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image: var(--pc-grain);
	opacity: 0.16;
	mix-blend-mode: overlay;
	pointer-events: none;
}

/* Ohut kultajuova erottaa otsikon keskustelusta. */
.pc-header::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(var(--pc-accent-rgb), 0.55), transparent);
}

.pc-avatar {
	position: relative;
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	overflow: hidden;
	background:
		radial-gradient(120% 120% at 30% 20%, rgba(var(--pc-accent-rgb), 0.42), rgba(var(--pc-accent-rgb), 0.12));
	box-shadow:
		inset 0 0 0 1px rgba(var(--pc-accent-rgb), 0.6),
		0 2px 8px rgba(0, 20, 16, 0.35);
	color: var(--pc-on-dark);
	font-family: var(--pc-font-heading);
	font-size: 18px;
	line-height: 1;
	z-index: 1;
}

.pc-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pc-head-text {
	min-width: 0;
	flex: 1 1 auto;
}

.pc-title {
	margin: 0;
	font-family: var(--pc-font-heading);
	font-size: 17px;
	font-weight: 500;
	letter-spacing: -0.01em;
	line-height: 1.2;
	color: var(--pc-on-dark);
}

.pc-subtitle {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 2px 0 0;
	font-size: 12.5px;
	color: var(--pc-on-dark-mute);
	min-width: 0;
}

/* Pitkä alaotsikko katkeaa kolmella pisteellä eikä riko palkkia. */
.pc-subtitle > span:last-child {
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.pc-dot {
	flex: 0 0 auto;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #6FCF97;
	box-shadow: 0 0 0 0 rgba(111, 207, 151, 0.6);
	animation: pc-pulse 2.6s var(--pc-ease) infinite;
}

@keyframes pc-pulse {
	0% { box-shadow: 0 0 0 0 rgba(111, 207, 151, 0.55); }
	70% { box-shadow: 0 0 0 7px rgba(111, 207, 151, 0); }
	100% { box-shadow: 0 0 0 0 rgba(111, 207, 151, 0); }
}

.pc-icon-btn {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--pc-on-dark-mute);
	transition: background 0.25s var(--pc-ease), color 0.25s var(--pc-ease), transform 0.25s var(--pc-ease);
}

.pc-icon-btn:hover {
	background: rgba(255, 255, 255, 0.12);
	color: var(--pc-on-dark);
	transform: rotate(90deg);
}

.pc-icon-btn--restart:hover {
	transform: rotate(-180deg);
}

.pc-icon-btn svg {
	width: 17px;
	height: 17px;
}

/* ------------------------------------------------------------ Viestialue */

.pc-log {
	flex: 1 1 auto;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 20px 18px 8px;
	scroll-behavior: smooth;
	display: flex;
	flex-direction: column;
	gap: 10px;
	/* Viestit häivähtävät otsikon alle sen sijaan että katkeaisivat viivaan. */
	-webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 20px);
	mask-image: linear-gradient(to bottom, transparent 0, #000 20px);
}

.pc-log::-webkit-scrollbar {
	width: 8px;
}

.pc-log::-webkit-scrollbar-thumb {
	background: rgba(var(--pc-primary-rgb), 0.16);
	border-radius: 4px;
	border: 2px solid transparent;
	background-clip: padding-box;
}

.pc-log::-webkit-scrollbar-thumb:hover {
	background: rgba(var(--pc-primary-rgb), 0.28);
	background-clip: padding-box;
}

.pc-msg {
	display: flex;
	max-width: 100%;
	animation: pc-in 0.38s var(--pc-ease) both;
}

@keyframes pc-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}

.pc-msg--user {
	justify-content: flex-end;
}

.pc-bubble {
	max-width: 84%;
	padding: 11px 15px;
	border-radius: var(--pc-radius-sm);
	font-size: 14.5px;
	line-height: 1.58;
	word-wrap: break-word;
	overflow-wrap: anywhere;
}

.pc-msg--bot .pc-bubble {
	background: linear-gradient(180deg, #FFFFFF 0%, #FDFBF6 100%);
	border: 1px solid var(--pc-line);
	border-bottom-left-radius: 6px;
	color: var(--pc-ink);
	box-shadow:
		0 1px 1px rgba(0, 30, 24, 0.04),
		0 8px 18px -12px rgba(0, 30, 24, 0.3);
}

.pc-msg--user .pc-bubble {
	background: linear-gradient(160deg, #0F5A4B 0%, var(--pc-primary) 60%, var(--pc-deep) 100%);
	border-bottom-right-radius: 6px;
	color: var(--pc-on-dark);
	box-shadow:
		0 1px 1px rgba(0, 30, 24, 0.1),
		0 10px 20px -12px rgba(0, 30, 24, 0.5);
}

.pc-bubble p {
	margin: 0 0 0.6em;
}

.pc-bubble p:last-child {
	margin-bottom: 0;
}

.pc-bubble ul,
.pc-bubble ol {
	margin: 0.4em 0;
	padding-left: 1.2em;
}

.pc-bubble a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-color: rgba(var(--pc-accent-rgb), 0.8);
	text-decoration-thickness: 1.5px;
}

.pc-bubble a:hover {
	text-decoration-color: currentColor;
}

/* ------------------------------------------------------------ Pikavalinnat */

.pc-quick {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin: -2px 0 4px;
	/* Animaatio on napeissa yksitellen, ei kääreessä. */
}

.pc-quick__btn {
	position: relative;
	overflow: hidden;
	padding: 8px 14px;
	border: 1px solid var(--pc-line-strong);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.65);
	color: var(--pc-primary);
	font-size: 13.5px;
	font-weight: 500;
	isolation: isolate;
	transition: border-color 0.3s var(--pc-ease), color 0.3s var(--pc-ease),
		transform 0.35s var(--pc-spring), box-shadow 0.3s var(--pc-ease);
	/* Napit tulevat porrastetusti, vasemmalta oikealle. */
	animation: pc-pop 0.42s var(--pc-spring) both;
	animation-delay: calc(var(--i, 0) * 55ms);
}

/* Täyttö pyyhkäisee napin läpi hoverilla — ei pelkkä värin vaihto. */
.pc-quick__btn::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(120deg, var(--pc-primary), #0F5A4B);
	transform: translateX(-101%);
	transition: transform 0.42s var(--pc-ease);
}

.pc-quick__btn:hover {
	border-color: transparent;
	color: var(--pc-on-dark);
	transform: translateY(-2px);
	box-shadow: 0 10px 20px -12px rgba(0, 30, 24, 0.7);
}

.pc-quick__btn:hover::before {
	transform: none;
}

@keyframes pc-pop {
	from { opacity: 0; transform: translateY(6px) scale(0.96); }
	to { opacity: 1; transform: none; }
}

.pc-quick__btn:disabled {
	opacity: 0.45;
	pointer-events: none;
}

/* ------------------------------------------------------------ Kirjoittaa-indikaattori */

.pc-typing {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 13px 16px;
	border: 1px solid var(--pc-line);
	border-radius: var(--pc-radius-sm);
	border-bottom-left-radius: 5px;
	background: var(--pc-white);
}

.pc-typing span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: rgba(var(--pc-primary-rgb), 0.42);
	animation: pc-bounce 1.25s var(--pc-ease) infinite;
}

.pc-typing span:nth-child(2) { animation-delay: 0.16s; }
.pc-typing span:nth-child(3) { animation-delay: 0.32s; }

@keyframes pc-bounce {
	0%, 60%, 100% { transform: none; opacity: 0.45; }
	30% { transform: translateY(-4px); opacity: 1; }
}

/* ------------------------------------------------------------ Sanojen paljastus

   Botin vastaus on DOMissa kokonaisena heti — ruudunlukija saa sen yhtenä
   viestinä — mutta sanat tulevat näkyviin porrastetusti. Näin vastaus
   tuntuu kirjoitetulta ilman että sisältö on oikeasti viivästetty. */

.pc-w {
	display: inline-block;
	opacity: 0;
	filter: blur(5px);
	transform: translateY(4px);
	animation: pc-word 0.45s var(--pc-ease) forwards;
	animation-delay: calc(var(--i, 0) * 26ms);
	will-change: opacity, filter, transform;
}

@keyframes pc-word {
	to {
		opacity: 1;
		filter: blur(0);
		transform: none;
	}
}

/* ------------------------------------------------------------ Suostumuskortti */

.pc-consent {
	margin: 2px 0 6px;
	padding: 14px 15px;
	border: 1px solid var(--pc-line);
	border-left: 3px solid var(--pc-accent);
	border-radius: var(--pc-radius-sm);
	background: var(--pc-white);
	animation: pc-in 0.4s var(--pc-ease) both;
}

.pc-consent__label {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	font-size: 13.5px;
	line-height: 1.5;
	cursor: pointer;
}

.pc-consent__label a {
	color: var(--pc-primary);
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-color: rgba(var(--pc-accent-rgb), 0.8);
}

.pc-consent__label input {
	flex: 0 0 auto;
	margin: 3px 0 0;
	width: 16px;
	height: 16px;
	accent-color: var(--pc-primary);
}

.pc-consent__actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 12px;
}

.pc-btn {
	padding: 9px 20px;
	border: 0;
	border-radius: 999px;
	background: var(--pc-primary);
	color: var(--pc-on-dark);
	font-size: 14px;
	font-weight: 500;
	transition: background 0.25s var(--pc-ease), transform 0.25s var(--pc-ease), box-shadow 0.3s var(--pc-ease);
}

.pc-btn:hover {
	background: var(--pc-deep);
	transform: translateY(-1px);
	box-shadow: 0 10px 22px -12px rgba(0, 30, 24, 0.7);
}

.pc-btn[disabled] {
	opacity: 0.5;
	pointer-events: none;
}

.pc-error {
	margin: 4px 0 0;
	color: #B3261E;
	font-size: 13px;
}

/* ------------------------------------------------------------ Syöterivi */

.pc-form {
	flex: 0 0 auto;
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 12px 14px;
	background: var(--pc-surface);
	border-top: 1px solid var(--pc-line);
}

.pc-input {
	flex: 1 1 auto;
	min-height: 44px;
	max-height: 120px;
	padding: 11px 15px;
	border: 1px solid var(--pc-line-strong);
	border-radius: 22px;
	background: var(--pc-white);
	color: var(--pc-ink);
	font-family: inherit;
	font-size: 14.5px;
	line-height: 1.45;
	resize: none;
	overflow-y: auto;
	/* Vierityspalkki piiloon: kenttä kasvaa itse korkeutta 120 pikseliin asti,
	   joten palkki vain rikkoisi pyöristetyn muodon. */
	scrollbar-width: none;
	transition: border-color 0.25s var(--pc-ease), box-shadow 0.25s var(--pc-ease);
}

.pc-input::-webkit-scrollbar {
	width: 0;
	height: 0;
}

.pc-input::placeholder {
	color: var(--pc-mute);
}

.pc-input:focus {
	outline: none;
	border-color: rgba(var(--pc-accent-rgb), 0.75);
	box-shadow: 0 0 0 3px rgba(var(--pc-accent-rgb), 0.16);
}

.pc-send {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--pc-primary);
	color: var(--pc-on-dark);
	transition: background 0.25s var(--pc-ease), transform 0.3s var(--pc-ease), opacity 0.25s var(--pc-ease);
}

.pc-send svg {
	width: 18px;
	height: 18px;
	transform: translateX(1px);
}

.pc-send {
	background: linear-gradient(160deg, #0F5A4B, var(--pc-primary) 60%, var(--pc-deep));
	box-shadow: 0 6px 14px -8px rgba(0, 30, 24, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.pc-send:hover {
	transform: scale(1.07);
	box-shadow: 0 10px 20px -8px rgba(0, 30, 24, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.pc-send:active {
	transform: scale(0.94);
	transition-duration: 0.1s;
}

.pc-send[disabled] {
	opacity: 0.35;
	pointer-events: none;
}

/* Piilokenttä roboteille — ei näy, ei lue ruudunlukija. */
.pc-hp {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.pc-footer {
	flex: 0 0 auto;
	padding: 0 16px 10px;
	background: var(--pc-surface);
	font-size: 11.5px;
	color: var(--pc-mute);
	text-align: center;
}

.pc-footer a {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid rgba(var(--pc-primary-rgb), 0.2);
}

.pc-footer a:hover {
	color: var(--pc-primary);
}

.pc-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

/* ------------------------------------------------------------ Mobiili */

@media (max-width: 560px) {
	.puro-chat-root:not(.puro-chat-root--inline) .pc-panel {
		inset: 0;
		width: 100%;
		height: 100%;
		height: 100dvh;
		max-height: none;
		border-radius: 0;
		transform-origin: bottom center;
	}

	.puro-chat-root:not(.puro-chat-root--inline) .pc-header {
		padding-top: max(16px, env(safe-area-inset-top));
	}

	.puro-chat-root:not(.puro-chat-root--inline) .pc-footer {
		padding-bottom: max(10px, env(safe-area-inset-bottom));
	}

	.pc-launcher {
		width: 56px;
		height: 56px;
		bottom: calc(max(16px, env(safe-area-inset-bottom)) + var(--pc-avoid));
		right: 16px;
	}

	.puro-chat-root--left .pc-launcher {
		left: 16px;
		right: auto;
	}

	.pc-nudge {
		bottom: calc(max(16px, env(safe-area-inset-bottom)) + 68px + var(--pc-avoid));
		right: 16px;
		max-width: min(250px, calc(100vw - 32px));
	}

	.puro-chat-root--left .pc-nudge {
		left: 16px;
		right: auto;
	}

	/* Avattu paneeli peittää ruudun — launcher pois tieltä. */
	.puro-chat-root.is-open:not(.puro-chat-root--inline) .pc-launcher {
		opacity: 0;
		pointer-events: none;
	}

	.puro-chat-root--inline {
		margin: 1.5rem 0;
	}
}

/* ------------------------------------------------------------ Saavutettavuus */

@media (prefers-reduced-motion: reduce) {
	.puro-chat-root *,
	.puro-chat-root *::before,
	.puro-chat-root *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		animation-delay: 0ms !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}

	.pc-panel {
		transform: none;
	}

	/* Sanat suoraan näkyviin — ei sumennusta eikä porrastusta. */
	.pc-w {
		opacity: 1;
		filter: none;
		transform: none;
		animation: none;
	}

	.pc-launcher::before {
		display: none;
	}
}

@media print {
	.puro-chat-root {
		display: none !important;
	}
}
