/* Cuidea Chatbot Familias */
.ccb-root {
	--ccb-color: #2a9d8f;
	--ccb-bg: #f4f8f7;
	--ccb-text: #22303a;
	--ccb-h: 640px;
	display: flex; flex-direction: column;
	height: var(--ccb-h); max-height: 100%;
	background: #fff; color: var(--ccb-text);
	border-radius: 18px; overflow: hidden;
	box-shadow: 0 10px 40px rgba(20, 50, 46, .14);
	font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	text-align: left;
}
.ccb-embed { max-width: 720px; margin: 0 auto; border: 1px solid #e3ebe9; }
.ccb-root *, .ccb-root *::before, .ccb-root *::after { box-sizing: border-box; }

.ccb-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--ccb-color); color: #fff; }
.ccb-av { position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.ccb-av i { position: absolute; right: 1px; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: #5ee07a; border: 2px solid var(--ccb-color); }
.ccb-head__t { flex: 1; line-height: 1.25; }
.ccb-head__t strong { display: block; font-size: 16px; }
.ccb-head__t small { opacity: .85; font-size: 12.5px; }
.ccb-restart { background: rgba(255,255,255,.18); border: 0; color: #fff; width: 34px; height: 34px; border-radius: 50%; font-size: 17px; cursor: pointer; }
.ccb-restart:hover { background: rgba(255,255,255,.3); }
.ccb-progress { height: 4px; background: #e3ebe9; }
.ccb-progress span { display: block; height: 100%; width: 0; background: var(--ccb-color); transition: width .4s ease; }

.ccb-log { flex: 1; overflow-y: auto; padding: 16px; background: var(--ccb-bg); display: flex; flex-direction: column; gap: 8px; scroll-behavior: smooth; }
.ccb-msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; animation: ccb-in .25s ease; overflow-wrap: anywhere; }
.ccb-msg--bot { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.ccb-userwrap { align-self: flex-end; display: flex; flex-direction: column; align-items: flex-end; max-width: 85%; }
.ccb-msg--user { max-width: 100%; background: var(--ccb-color); color: #fff; border-bottom-right-radius: 4px; }
.ccb-undo { background: none; border: 0; color: #7a8a92; font-size: 12px; padding: 3px 4px 0; cursor: pointer; }
.ccb-undo:hover { color: var(--ccb-color); text-decoration: underline; }
.ccb-typing { display: flex; gap: 4px; padding: 14px 16px; }
.ccb-typing i { width: 7px; height: 7px; border-radius: 50%; background: #b5c4c1; animation: ccb-dot 1s infinite; }
.ccb-typing i:nth-child(2) { animation-delay: .15s; }
.ccb-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ccb-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes ccb-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.ccb-input { padding: 12px 14px 14px; background: #fff; border-top: 1px solid #e8eeec; max-height: 55%; overflow-y: auto; }
.ccb-input:empty { display: none; }
.ccb-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.ccb-opt { border: 1.5px solid var(--ccb-color); background: #fff; color: var(--ccb-color); border-radius: 22px; padding: 9px 15px; font: inherit; font-weight: 600; cursor: pointer; transition: all .15s; line-height: 1.2; }
.ccb-opt:hover { background: var(--ccb-color); color: #fff; }
.ccb-opt--sm { padding: 7px 12px; font-size: 14px; }
.ccb-chip[aria-pressed="true"] { background: var(--ccb-color); color: #fff; }
.ccb-chip[aria-pressed="true"]::after { content: " ✓"; }
.ccb-opts--sug { margin-bottom: 10px; }
.ccb-text { display: flex; gap: 8px; }
.ccb-text input, .ccb-lead input[type=text], .ccb-lead input[type=tel], .ccb-lead input[type=email] {
	flex: 1; width: 100%; border: 1.5px solid #d4dfdc; border-radius: 24px; padding: 11px 16px; font: inherit; color: inherit; background: #fff; margin: 0;
}
.ccb-text input:focus, .ccb-lead input:focus { outline: none; border-color: var(--ccb-color); }
.ccb-send { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: var(--ccb-color); color: #fff !important; border-radius: 24px; padding: 11px 18px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none !important; min-width: 46px; }
.ccb-send:hover { filter: brightness(.92); }
.ccb-send:disabled { opacity: .6; cursor: wait; }
.ccb-send--wide { width: 100%; margin-top: 10px; }
.ccb-skip { background: none; border: 0; color: #7a8a92; font: inherit; font-size: 13.5px; padding: 8px 4px 0; cursor: pointer; text-decoration: underline; }
.ccb-err { color: #c0392b; font-size: 13.5px; min-height: 0; margin-top: 4px; }
.ccb-err:empty { display: none; }
.ccb-lead { display: flex; flex-direction: column; gap: 8px; }
.ccb-check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: #55656d; line-height: 1.35; }
.ccb-check input { margin-top: 2px; accent-color: var(--ccb-color); flex: none; }
.ccb-check a { color: var(--ccb-color); }
.ccb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.ccb-cards { display: flex; flex-direction: column; gap: 8px; margin: 4px 0; }
.ccb-card { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 14px; padding: 10px 12px; text-decoration: none !important; color: inherit !important; box-shadow: 0 1px 3px rgba(0,0,0,.07); animation: ccb-in .3s ease; }
.ccb-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,.1); }
.ccb-card__av img, .ccb-card__av span { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; display: flex; align-items: center; justify-content: center; background: #e3f2ef; color: var(--ccb-color); font-weight: 700; font-size: 19px; }
.ccb-card__b { flex: 1; min-width: 0; }
.ccb-card__b strong { display: block; }
.ccb-card__b small { color: #7a8a92; font-size: 12.5px; }
.ccb-card__tags em { display: inline-block; font-style: normal; font-size: 11.5px; background: #eef4f2; border-radius: 10px; padding: 1px 8px; margin: 3px 4px 0 0; }
.ccb-card__tags em.ok { background: #e3f5e8; color: #2e7d46; }
.ccb-card__score { text-align: center; font-weight: 800; font-size: 18px; color: var(--ccb-color); line-height: 1; }
.ccb-card__score small { display: block; font-size: 10.5px; font-weight: 500; color: #7a8a92; }
.ccb-cta { display: flex; gap: 8px; }
.ccb-cta .ccb-send { flex: 1; }
.ccb-wa { background: #25d366; }

/* Burbuja flotante */
.ccb-float { position: fixed; bottom: 20px; z-index: 99990; font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.ccb-float--left { left: 20px; }
.ccb-float--right { right: 20px; }
.ccb-float__btn { display: flex; align-items: center; gap: 10px; border: 0; background: var(--ccb-color, #2a9d8f); color: #fff; border-radius: 30px; padding: 8px 18px 8px 8px; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.2); animation: ccb-in .4s ease; }
.ccb-float__av { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.ccb-float.is-open .ccb-float__btn { display: none; }
.ccb-float__panel { position: relative; width: 380px; height: min(640px, calc(100vh - 40px)); }
.ccb-float__panel[hidden] { display: none; }
.ccb-float__panel .ccb-root { --ccb-h: 100%; height: 100%; }
.ccb-float__close { position: absolute; top: 12px; right: 56px; z-index: 2; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
@media (max-width: 520px) {
	.ccb-float__txt { display: none; }
	.ccb-float__btn { padding: 8px; }
	.ccb-float.is-open { inset: 0; }
	.ccb-float__panel { width: 100vw; height: 100dvh; }
	.ccb-float__panel .ccb-root { border-radius: 0; }
	.ccb-root.ccb-embed { --ccb-h: 82vh; border-radius: 14px; }
	.ccb-msg, .ccb-userwrap { max-width: 92%; }
}
.ccb-userwrap .ccb-msg--user { width: fit-content; max-width: 100%; overflow-wrap: anywhere; word-break: normal; }
.ccb-userwrap { min-width: 0; }
/* Foto de la asistente */
.ccb-av img, .ccb-float__av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.ccb-av { overflow: visible; }
.ccb-float__av { overflow: hidden; border: 2px solid rgba(255,255,255,.6); }
.ccb-float__btn .ccb-float__av { width: 42px; height: 42px; }
.ccb-mini { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #7a8a92; margin-top: 4px; }
.ccb-mini img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
