/* Yelva Chat Pro widget additions. Scoped to .yv-root. */

.yv-root .yv-window { border-radius: var(--yv-radius, 18px); }
.yv-root .yv-user .yv-bubble { background: var(--yv-user-bubble, var(--yv-accent)); color: var(--yv-user-fg, var(--yv-on-accent)); }
.yv-root .yv-bubble { border-radius: calc(var(--yv-radius, 18px) * 0.9); }

.yv-root .yv-pro-avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.yv-root .yv-header .yv-header-text { flex: 1; min-width: 0; }
.yv-root .yv-pro-launcher-img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; display: block; }
.yv-root .yv-launcher.yv-pro-has-image { overflow: hidden; }

/* Starter questions */
.yv-root .yv-pro-starters { display: flex; flex-wrap: wrap; gap: 8px; }
.yv-root .yv-pro-chip {
	margin: 0;
	padding: 7px 13px;
	border: 1px solid var(--yv-border);
	border-radius: 999px;
	background: var(--yv-bg);
	color: var(--yv-link);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	text-align: left;
}
.yv-root .yv-pro-chip:hover { border-color: var(--yv-link); }

/* Add to cart and talk to a person */
.yv-root .yv-pro-cart {
	display: block;
	margin: -2px 0 6px;
	padding: 8px 12px;
	border-radius: 10px;
	background: var(--yv-accent);
	color: var(--yv-on-accent);
	font-weight: 600;
	text-align: center;
	text-decoration: none;
}
.yv-root .yv-pro-cart:hover { filter: brightness(1.08); }
.yv-root .yv-pro-human {
	align-self: flex-start;
	margin: 8px 0 0;
	padding: 7px 14px;
	border: 1px solid var(--yv-border);
	border-radius: 999px;
	background: transparent;
	color: var(--yv-link);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.yv-root .yv-pro-human:hover { border-color: var(--yv-link); }

/* Buttons under an answer: contact buttons and the person button sit in one row */
.yv-root .yv-pro-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.yv-root .yv-pro-actions .yv-contact,
.yv-root .yv-pro-actions .yv-pro-human { margin: 0; align-self: auto; }

/* Close button for panels that have no back link */
.yv-root .yv-pro-panel-x {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--yv-muted);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}
.yv-root .yv-pro-panel-x:hover { background: var(--yv-border); }

/* Green dot beside "Our team is online" */
.yv-root .yv-pro-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #16a34a; vertical-align: middle; }

/* Panels (message form, email gate, bot check) cover the message area */
.yv-root .yv-pro-panel {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 18px;
	overflow-y: auto;
	background: var(--yv-bg);
	color: var(--yv-fg);
}
.yv-root .yv-pro-title { font-size: 1.15em; }
.yv-root .yv-pro-text { color: var(--yv-muted); }
.yv-root .yv-pro-form { display: flex; flex-direction: column; gap: 10px; }
.yv-root .yv-pro-field { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.yv-root .yv-pro-field input,
.yv-root .yv-pro-field textarea {
	width: 100%;
	margin: 0;
	padding: 9px 11px;
	border: 1px solid var(--yv-border);
	border-radius: 10px;
	background: var(--yv-input-bg);
	color: var(--yv-fg);
	font: inherit;
	font-weight: 400;
}
.yv-root .yv-pro-field input:focus-visible,
.yv-root .yv-pro-field textarea:focus-visible { outline: 2px solid var(--yv-accent); outline-offset: 1px; }
.yv-root .yv-pro-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.yv-root .yv-pro-btn {
	padding: 10px 14px;
	border: 0;
	border-radius: 10px;
	background: var(--yv-accent);
	color: var(--yv-on-accent);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.yv-root .yv-pro-btn:disabled { opacity: 0.6; cursor: default; }
.yv-root .yv-pro-link { padding: 4px; border: 0; background: none; color: var(--yv-link); font: inherit; cursor: pointer; text-decoration: underline; }
.yv-root .yv-pro-status { min-height: 1.4em; color: var(--yv-error); }

/* Proactive bubble */
.yv-root .yv-pro-bubble {
	position: absolute;
	bottom: 68px;
	display: flex;
	align-items: flex-start;
	width: max-content;
	max-width: min(280px, calc(100vw - 40px));
	border: 1px solid var(--yv-border);
	border-radius: 14px;
	background: var(--yv-bg);
	color: var(--yv-fg);
	box-shadow: 0 8px 28px rgba(17, 24, 39, 0.22);
	animation: yv-pro-pop 0.2s ease-out;
}
.yv-root.yv-pos-right .yv-pro-bubble { right: 0; }
.yv-root.yv-pos-left .yv-pro-bubble { left: 0; }
.yv-root .yv-pro-bubble-text { flex: 1; margin: 0; padding: 12px 6px 12px 14px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.yv-root .yv-pro-bubble-x { margin: 0; padding: 6px 10px; border: 0; background: none; color: var(--yv-muted); font-size: 18px; line-height: 1; cursor: pointer; }
@keyframes yv-pro-pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 600px) {
	.yv-root.is-open .yv-pro-bubble { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.yv-root .yv-pro-bubble { animation: none; }
}

/* Live human chat */
.yv-root .yv-pro-livebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--yv-border); background: var(--yv-bg); font-size: 0.92em; }
.yv-root .yv-pro-livebar[hidden] { display: none; }
.yv-root .yv-pro-livebar-text { color: var(--yv-muted); }
.yv-root .yv-pro-livebtn { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--yv-accent); background: transparent; color: var(--yv-link); font: inherit; font-weight: 600; cursor: pointer; }
.yv-root .yv-pro-livebtn:hover { background: var(--yv-accent); color: var(--yv-on-accent); }
.yv-root .yv-pro-who { display: block; font-size: 0.8em; color: var(--yv-muted); margin: 0 0 2px 4px; }
.yv-root .yv-pro-sys .yv-bubble { background: transparent; color: var(--yv-muted); font-size: 0.88em; text-align: center; padding-left: 0; padding-right: 0; }
.yv-root .yv-pro-badge { display: inline-block; margin-top: 2px; padding: 1px 8px; border-radius: 999px; background: var(--yv-border); color: var(--yv-fg); font-size: 0.78em; font-weight: 600; }
.yv-root .yv-disclaimer[hidden], .yv-root .yv-notice[hidden] { display: none !important; }
