/* LFG Chatbot IA — estilos del widget. Todo va dentro de #lfgcb-root para no chocar con Divi. */
#lfgcb-root {
	--lfgcb-bg: #F4F3F0;
	--lfgcb-ink: #1A1A18;
	--lfgcb-accent: #B3271A;
	--lfgcb-line: rgba(26, 26, 24, .12);
	--lfgcb-line: color-mix(in srgb, var(--lfgcb-ink) 12%, transparent);
	--lfgcb-soft: rgba(26, 26, 24, .6);
	--lfgcb-soft: color-mix(in srgb, var(--lfgcb-ink) 60%, transparent);
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 2147483000;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	color: var(--lfgcb-ink);
	-webkit-font-smoothing: antialiased;
}
#lfgcb-root *, #lfgcb-root *::before, #lfgcb-root *::after { box-sizing: border-box; }
#lfgcb-root button, #lfgcb-root input, #lfgcb-root textarea {
	font-family: inherit; font-size: inherit; line-height: inherit; color: inherit;
	margin: 0; letter-spacing: normal; text-transform: none; box-shadow: none;
}
#lfgcb-root button { cursor: pointer; background: none; border: 0; padding: 0; }
#lfgcb-root p { margin: 0 0 .5em; padding: 0; font-size: inherit; line-height: inherit; color: inherit; }
#lfgcb-root p:last-child { margin-bottom: 0; }
#lfgcb-root a { color: var(--lfgcb-accent); }
#lfgcb-root :focus-visible { outline: 2px solid var(--lfgcb-accent); outline-offset: 2px; }

/* Botón flotante */
#lfgcb-root .lfgcb-launcher {
	width: 60px; height: 60px; border-radius: 50%;
	background: var(--lfgcb-accent); color: var(--lfgcb-bg);
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 10px 30px rgba(26, 26, 24, .25);
	transition: transform .2s ease, background-color .2s ease;
	margin-left: auto;
}
#lfgcb-root .lfgcb-launcher:hover { transform: scale(1.06); }
#lfgcb-root.lfgcb-open .lfgcb-launcher { background: var(--lfgcb-ink); }

/* Aviso inicial */
#lfgcb-root .lfgcb-teaser {
	position: absolute; right: 0; bottom: 74px; width: 250px;
	background: #fff; color: var(--lfgcb-ink);
	border: 1px solid var(--lfgcb-line); border-radius: 12px;
	padding: 12px 34px 12px 14px; font-size: 14px; font-weight: 300;
	box-shadow: 0 12px 30px rgba(26, 26, 24, .14);
	opacity: 0; transform: translateY(6px); pointer-events: none;
	transition: opacity .3s ease, transform .3s ease; cursor: pointer;
}
#lfgcb-root .lfgcb-teaser.lfgcb-show { opacity: 1; transform: none; pointer-events: auto; }
#lfgcb-root .lfgcb-teaser-x {
	position: absolute; top: 4px; right: 8px; font-size: 18px; line-height: 1; color: var(--lfgcb-soft); padding: 4px;
}

/* Panel */
#lfgcb-root .lfgcb-panel {
	position: absolute; right: 0; bottom: 76px;
	width: 380px; height: min(640px, calc(100vh - 120px));
	display: flex; flex-direction: column;
	background: var(--lfgcb-bg);
	border: 1px solid var(--lfgcb-line); border-radius: 16px; overflow: hidden;
	box-shadow: 0 24px 60px rgba(26, 26, 24, .22);
	opacity: 0; transform: translateY(12px) scale(.98); transform-origin: bottom right;
	visibility: hidden; pointer-events: none;
	transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
}
#lfgcb-root.lfgcb-open .lfgcb-panel {
	opacity: 1; transform: none; visibility: visible; pointer-events: auto;
	transition: opacity .22s ease, transform .22s ease, visibility 0s;
}

#lfgcb-root .lfgcb-header {
	display: flex; align-items: flex-start; gap: 8px;
	padding: 16px 12px 14px 20px;
	background: var(--lfgcb-ink); color: var(--lfgcb-bg);
}
#lfgcb-root .lfgcb-head-text { flex: 1; min-width: 0; }
#lfgcb-root .lfgcb-kicker {
	display: flex; align-items: center; gap: 7px;
	font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .75;
}
#lfgcb-root .lfgcb-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #3fae6a; box-shadow: 0 0 0 3px rgba(63, 174, 106, .25); }
#lfgcb-root .lfgcb-title { font-size: 22px; font-weight: 200; letter-spacing: -.01em; line-height: 1.2; margin: 4px 0 8px; }
#lfgcb-root .lfgcb-human {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 12px; padding: 5px 11px 5px 9px; border-radius: 999px;
	border: 1px solid rgba(244, 243, 240, .3); color: var(--lfgcb-bg);
	transition: border-color .2s, background-color .2s;
}
#lfgcb-root .lfgcb-human:hover { border-color: var(--lfgcb-accent); background: var(--lfgcb-accent); }
#lfgcb-root .lfgcb-close { color: var(--lfgcb-bg); padding: 6px; opacity: .8; display: flex; }
#lfgcb-root .lfgcb-close:hover { opacity: 1; }

/* Mensajes */
#lfgcb-root .lfgcb-messages {
	flex: 1; overflow-y: auto; overscroll-behavior: contain;
	padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 10px;
}
#lfgcb-root .lfgcb-msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: 15px; font-weight: 300; word-wrap: break-word; }
#lfgcb-root .lfgcb-bot { align-self: flex-start; background: #fff; border: 1px solid var(--lfgcb-line); border-bottom-left-radius: 4px; }
#lfgcb-root .lfgcb-user { align-self: flex-end; background: var(--lfgcb-ink); color: var(--lfgcb-bg); border-bottom-right-radius: 4px; white-space: pre-wrap; }
#lfgcb-root .lfgcb-msg strong { font-weight: 600; }
#lfgcb-root .lfgcb-msg ul { margin: .3em 0 .5em; padding-left: 1.1em; list-style: disc; }
#lfgcb-root .lfgcb-msg li { margin: 0 0 .2em; padding: 0; }
#lfgcb-root .lfgcb-links { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--lfgcb-line); }
#lfgcb-root .lfgcb-link { font-size: 14px; font-weight: 400; text-decoration: none; color: var(--lfgcb-accent); }
#lfgcb-root .lfgcb-link::before { content: "→ "; }
#lfgcb-root .lfgcb-link:hover { text-decoration: underline; }

#lfgcb-root .lfgcb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
#lfgcb-root .lfgcb-chip {
	font-size: 13px; font-weight: 300; padding: 7px 12px; border-radius: 999px;
	border: 1px solid var(--lfgcb-line); background: transparent; text-align: left;
	transition: border-color .2s, color .2s;
}
#lfgcb-root .lfgcb-chip:hover { border-color: var(--lfgcb-accent); color: var(--lfgcb-accent); }

#lfgcb-root .lfgcb-typing { display: flex; gap: 4px; padding: 14px 16px; }
#lfgcb-root .lfgcb-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--lfgcb-soft); animation: lfgcb-blink 1.2s infinite ease-in-out; }
#lfgcb-root .lfgcb-typing i:nth-child(2) { animation-delay: .15s; }
#lfgcb-root .lfgcb-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes lfgcb-blink { 0%, 80%, 100% { opacity: .25; transform: none; } 40% { opacity: 1; transform: translateY(-2px); } }

/* Caja de escritura */
#lfgcb-root .lfgcb-composer {
	display: flex; align-items: flex-end; gap: 8px; margin: 0;
	padding: 10px 12px 10px 16px; border-top: 1px solid var(--lfgcb-line); background: var(--lfgcb-bg);
}
#lfgcb-root .lfgcb-input {
	flex: 1; resize: none; border: 0; background: transparent; outline: none;
	padding: 8px 0; max-height: 120px; font-size: 16px; font-weight: 300; min-height: 0; height: auto; width: auto;
}
#lfgcb-root .lfgcb-input::placeholder { color: var(--lfgcb-soft); }
#lfgcb-root .lfgcb-send {
	width: 40px; height: 40px; flex: none; border-radius: 50%;
	background: var(--lfgcb-accent); color: var(--lfgcb-bg);
	display: flex; align-items: center; justify-content: center; transition: opacity .2s;
}
#lfgcb-root .lfgcb-send:disabled { opacity: .45; cursor: default; }
#lfgcb-root .lfgcb-foot { font-size: 11px; color: var(--lfgcb-soft); padding: 0 16px 10px; line-height: 1.35; }

/* Formulario */
#lfgcb-root .lfgcb-form {
	align-self: stretch; background: #fff; border: 1px solid var(--lfgcb-line); border-top: 3px solid var(--lfgcb-accent);
	border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; margin: 2px 0 6px;
}
#lfgcb-root .lfgcb-form-title { font-size: 18px; font-weight: 200; }
#lfgcb-root .lfgcb-form-sub { font-size: 13px; font-weight: 300; color: var(--lfgcb-soft); margin-top: -6px; }
#lfgcb-root .lfgcb-field { display: flex; flex-direction: column; gap: 3px; margin: 0; font-size: 12px; color: var(--lfgcb-soft); }
#lfgcb-root .lfgcb-field input, #lfgcb-root .lfgcb-field textarea {
	width: 100%; border: 1px solid var(--lfgcb-line); border-radius: 8px; background: var(--lfgcb-bg);
	padding: 8px 11px; font-size: 16px; font-weight: 300; color: var(--lfgcb-ink); outline: none; height: auto; resize: vertical;
}
#lfgcb-root .lfgcb-field input:focus, #lfgcb-root .lfgcb-field textarea:focus { border-color: var(--lfgcb-ink); }
#lfgcb-root .lfgcb-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; font-weight: 300; margin: 0; }
#lfgcb-root .lfgcb-consent input { margin-top: 3px; accent-color: var(--lfgcb-accent); width: auto; height: auto; }
#lfgcb-root .lfgcb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
#lfgcb-root .lfgcb-form-error { font-size: 13px; color: var(--lfgcb-accent); min-height: 0; }
#lfgcb-root .lfgcb-form-error:empty { display: none; }
#lfgcb-root .lfgcb-submit {
	background: var(--lfgcb-accent); color: #fff; border-radius: 999px; padding: 11px 18px;
	font-size: 14px; font-weight: 400; letter-spacing: .02em; transition: background-color .2s;
}
#lfgcb-root .lfgcb-submit:hover { background: var(--lfgcb-ink); }
#lfgcb-root .lfgcb-submit:disabled { opacity: .6; cursor: default; }

/* Móvil: el chat ocupa la pantalla */
@media (max-width: 600px) {
	#lfgcb-root { right: 16px; bottom: 16px; }
	#lfgcb-root .lfgcb-panel {
		position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh;
		border-radius: 0; border: 0; bottom: 0; right: 0;
	}
	#lfgcb-root.lfgcb-open .lfgcb-launcher { display: none; }
	#lfgcb-root .lfgcb-msg { max-width: 92%; }
}

@media (prefers-reduced-motion: reduce) {
	#lfgcb-root *, #lfgcb-root .lfgcb-panel { transition: none !important; animation: none !important; }
}
@media print { #lfgcb-root { display: none !important; } }
