/* Talento Chat Assistant */

.tc-root {
	--tc-accent: #93DEFF;
	--tc-dark: #323643;
	--tc-grey: #606470;
	--tc-light: #F7F7F7;
	--tc-white: #ffffff;
	--tc-radius: 20px;
	--tc-font: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99998;
	font-family: var(--tc-font);
	line-height: 1.5;
}

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

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

.tc-launcher {
	display: flex;
	align-items: center;
	gap: 10px;
	border: 0;
	cursor: pointer;
	padding: 0 20px 0 16px;
	height: 56px;
	border-radius: 999px;
	background: var(--tc-dark);
	color: var(--tc-white);
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	box-shadow: 0 10px 30px rgba(50, 54, 67, 0.28);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tc-launcher:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 34px rgba(50, 54, 67, 0.34);
}

.tc-launcher:focus-visible {
	outline: 3px solid var(--tc-accent);
	outline-offset: 3px;
}

.tc-launcher svg {
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
	fill: var(--tc-accent);
}

.tc-launcher-label {
	white-space: nowrap;
}

.tc-root.tc-is-open .tc-launcher {
	display: none;
}

.tc-badge {
	position: absolute;
	top: -4px;
	right: -2px;
	min-width: 20px;
	height: 20px;
	border-radius: 999px;
	background: #e8564f;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 0 0 2px #fff;
}

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

.tc-panel {
	display: none;
	width: 370px;
	max-width: calc(100vw - 32px);
	height: 560px;
	max-height: calc(100vh - 120px);
	background: var(--tc-white);
	border-radius: var(--tc-radius);
	box-shadow: 0 24px 60px rgba(50, 54, 67, 0.3);
	overflow: hidden;
	flex-direction: column;
}

.tc-root.tc-is-open .tc-panel {
	display: flex;
	animation: tc-pop 0.22s ease-out;
}

@keyframes tc-pop {
	from { opacity: 0; transform: translateY(12px) scale(0.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
	.tc-root.tc-is-open .tc-panel { animation: none; }
	.tc-launcher { transition: none; }
}

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

.tc-header {
	background: var(--tc-dark);
	color: var(--tc-white);
	padding: 16px 16px 16px 18px;
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 0 0 auto;
}

.tc-avatar {
	width: 40px;
	height: 40px;
	flex: 0 0 40px;
	border-radius: 999px;
	background: var(--tc-accent);
	color: var(--tc-dark);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 16px;
}

.tc-header-text { flex: 1 1 auto; min-width: 0; }

.tc-title {
	font-size: 15px;
	font-weight: 700;
	margin: 0;
	color: var(--tc-white);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tc-subtitle {
	margin: 2px 0 0;
	font-size: 12.5px;
	color: #c9ccd6;
	display: flex;
	align-items: center;
	gap: 6px;
}

.tc-dot {
	width: 7px;
	height: 7px;
	border-radius: 999px;
	background: #4ad07d;
	flex: 0 0 7px;
}

.tc-close {
	background: transparent;
	border: 0;
	color: #c9ccd6;
	cursor: pointer;
	padding: 6px;
	border-radius: 8px;
	line-height: 0;
}

.tc-close:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.tc-close:focus-visible { outline: 2px solid var(--tc-accent); outline-offset: 1px; }
.tc-close svg { width: 18px; height: 18px; fill: currentColor; }

/* Body -------------------------------------------------------------------- */

.tc-body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 18px 16px 8px;
	background: var(--tc-light);
	display: flex;
	flex-direction: column;
	gap: 10px;
	scroll-behavior: smooth;
}

.tc-msg {
	max-width: 84%;
	padding: 10px 14px;
	border-radius: 16px;
	font-size: 14.5px;
	color: var(--tc-dark);
	white-space: pre-wrap;
	word-wrap: break-word;
}

.tc-msg-bot {
	align-self: flex-start;
	background: var(--tc-white);
	border-bottom-left-radius: 6px;
	box-shadow: 0 1px 2px rgba(50, 54, 67, 0.08);
}

.tc-msg-user {
	align-self: flex-end;
	background: var(--tc-accent);
	color: var(--tc-dark);
	font-weight: 600;
	border-bottom-right-radius: 6px;
}

.tc-typing {
	align-self: flex-start;
	background: var(--tc-white);
	border-radius: 16px;
	border-bottom-left-radius: 6px;
	padding: 12px 16px;
	display: flex;
	gap: 4px;
	box-shadow: 0 1px 2px rgba(50, 54, 67, 0.08);
}

.tc-typing span {
	width: 7px;
	height: 7px;
	border-radius: 999px;
	background: #b9bdc7;
	animation: tc-blink 1.1s infinite ease-in-out;
}

.tc-typing span:nth-child(2) { animation-delay: 0.18s; }
.tc-typing span:nth-child(3) { animation-delay: 0.36s; }

@keyframes tc-blink {
	0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
	40% { opacity: 1; transform: translateY(-3px); }
}

/* Choices ----------------------------------------------------------------- */

.tc-choices {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0 0 6px;
	background: transparent;
	flex: 0 0 auto;
	align-self: flex-start;
	max-width: 100%;
}

.tc-choices:empty { display: none; }

.tc-choice {
	border: 1.5px solid var(--tc-dark);
	background: var(--tc-white);
	color: var(--tc-dark);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	padding: 9px 15px;
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.tc-choice:hover { background: var(--tc-dark); color: var(--tc-white); }
.tc-choice:focus-visible { outline: 3px solid var(--tc-accent); outline-offset: 2px; }

.tc-choice-primary {
	background: var(--tc-accent);
	border-color: var(--tc-accent);
}

.tc-choice-primary:hover { background: var(--tc-dark); border-color: var(--tc-dark); }

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

.tc-form {
	display: none;
	align-items: center;
	gap: 8px;
	padding: 12px 14px;
	border-top: 1px solid #e5e7eb;
	background: var(--tc-white);
	flex: 0 0 auto;
}

.tc-form.tc-visible { display: flex; }

.tc-input {
	flex: 1 1 auto;
	min-width: 0;
	border: 1.5px solid #dfe2e8;
	border-radius: 999px;
	padding: 10px 16px;
	font-family: inherit;
	font-size: 15px;
	color: var(--tc-dark);
	background: var(--tc-white);
}

.tc-input:focus {
	outline: none;
	border-color: var(--tc-accent);
	box-shadow: 0 0 0 3px rgba(147, 222, 255, 0.4);
}

.tc-send {
	flex: 0 0 42px;
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 999px;
	background: var(--tc-dark);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tc-send:hover { background: #232631; }
.tc-send:focus-visible { outline: 3px solid var(--tc-accent); outline-offset: 2px; }
.tc-send svg { width: 18px; height: 18px; fill: var(--tc-accent); }

.tc-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

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

.tc-foot {
	padding: 0 16px 12px;
	background: var(--tc-white);
	font-size: 11.5px;
	color: #8b8f99;
	text-align: center;
	flex: 0 0 auto;
}

.tc-error {
	align-self: center;
	background: #fdecea;
	color: #a12622;
	border-radius: 10px;
	padding: 8px 12px;
	font-size: 13px;
	max-width: 90%;
}

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

@media (max-width: 480px) {
	.tc-root { right: 12px; bottom: 12px; left: 12px; }
	.tc-launcher { margin-left: auto; }
	.tc-panel {
		width: 100%;
		height: min(78vh, 560px);
		max-height: calc(100vh - 24px);
	}
	.tc-launcher-label { display: none; }
	.tc-launcher { padding: 0; width: 56px; justify-content: center; }
}
