/**
 * RS Gonzales Convert — widget styles.
 * RSG brand: Montserrat/DM Sans stack, green accent, dark header gradient. Scoped under
 * .rsgc-root so it never bleeds into the host theme. Colours come from CSS vars set inline
 * by the JS (per-site accent/branding).
 */

.rsgc-root {
	--rsgc-accent: #2C7A4B;
	--rsgc-ink: #fff;
	--rsgc-header-bg: linear-gradient(135deg, #000 0%, #4A4A4A 100%);
	--rsgc-radius: 16px;
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 2147483000;
	font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.45;
}

/* Launcher --------------------------------------------------------------- */
.rsgc-launcher {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 0;
	cursor: pointer;
	padding: 12px 18px;
	border-radius: 999px;
	background: var(--rsgc-accent);
	color: var(--rsgc-ink);
	font-weight: 600;
	font-size: 15px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
	transition: transform .15s ease, box-shadow .15s ease;
}
.rsgc-launcher:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(0, 0, 0, .28); }
.rsgc-launcher--hidden { display: none; }

/* Panel ------------------------------------------------------------------ */
.rsgc-panel {
	width: 380px;
	max-width: calc(100vw - 32px);
	height: 560px;
	max-height: calc(100vh - 120px);
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: var(--rsgc-radius);
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
	animation: rsgc-in .18s ease-out;
}
@keyframes rsgc-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.rsgc-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px;
	background: var(--rsgc-header-bg);
	color: #fff;
}
.rsgc-header-txt { flex: 1; display: flex; flex-direction: column; font-family: "Montserrat", sans-serif; }
.rsgc-header-txt strong { font-size: 15px; }
.rsgc-header-txt small { font-size: 12px; opacity: .75; }
.rsgc-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.rsgc-avatar--mono {
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--rsgc-accent); color: var(--rsgc-ink);
	font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 18px;
}
.rsgc-close { margin-left: auto; background: transparent; border: 0; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; opacity: .8; }
.rsgc-close:hover { opacity: 1; }

/* Body / messages -------------------------------------------------------- */
.rsgc-body { flex: 1; overflow-y: auto; padding: 16px; background: #f6f7f8; display: flex; flex-direction: column; gap: 4px; }
.rsgc-greet-video { width: 100%; border-radius: 12px; margin-bottom: 8px; }

.rsgc-msg { display: flex; margin: 4px 0; }
.rsgc-msg--user { justify-content: flex-end; }
.rsgc-bubble {
	max-width: 82%;
	padding: 10px 14px;
	border-radius: 14px;
	background: #fff;
	color: #1a1a1a;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
	word-wrap: break-word;
}
.rsgc-msg--user .rsgc-bubble { background: var(--rsgc-accent); color: var(--rsgc-ink); }

.rsgc-choices { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.rsgc-choice {
	text-align: left;
	padding: 11px 14px;
	border: 1px solid var(--rsgc-accent);
	background: #fff;
	color: var(--rsgc-accent);
	border-radius: 12px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: background .12s ease, color .12s ease;
}
.rsgc-choice:hover { background: var(--rsgc-accent); color: var(--rsgc-ink); }

/* Typing indicator */
.rsgc-typing .rsgc-bubble { display: inline-flex; gap: 4px; }
.rsgc-typing span { width: 7px; height: 7px; border-radius: 50%; background: #b8bec4; animation: rsgc-blink 1.2s infinite both; }
.rsgc-typing span:nth-child(2) { animation-delay: .2s; }
.rsgc-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes rsgc-blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

/* Footer / input --------------------------------------------------------- */
.rsgc-footer { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid #e7e9ec; background: #fff; }
.rsgc-input {
	flex: 1; resize: none; border: 1px solid #d7dbe0; border-radius: 12px;
	padding: 10px 12px; font: inherit; max-height: 96px; outline: none;
}
.rsgc-input:focus { border-color: var(--rsgc-accent); }
.rsgc-send {
	flex: 0 0 auto; width: 40px; height: 40px; border: 0; border-radius: 50%;
	background: var(--rsgc-accent); color: var(--rsgc-ink); cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
}
.rsgc-send:disabled { opacity: .5; cursor: default; }
.rsgc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

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

@media (prefers-reduced-motion: reduce) {
	.rsgc-panel { animation: none; }
	.rsgc-launcher { transition: none; }
	.rsgc-typing span { animation: none; }
}
