/* JEZZ Chatbot · widget */
.jcc-root {
	--jcc-accent: #5B3DF5;
	--jcc-header-bg: #12122A;
	--jcc-header-text: #FFFFFF;
	--jcc-chat-bg: #F8F8FC;
	--jcc-bot-bubble: #FFFFFF;
	--jcc-bot-text: #12122A;
	--jcc-user-text: #FFFFFF;
	--jcc-radius: 20px;
	--jcc-width: 380px;
	--jcc-height: 620px;
	--jcc-offset-x: 24px;
	--jcc-offset-y: 24px;
	--jcc-launcher: 62px;
	--jcc-z: 99999;
	font-size: 14px;
	line-height: 1.5;
	color: var(--jcc-bot-text);
}
.jcc-root *, .jcc-root *::before, .jcc-root *::after { box-sizing: border-box; }
.jcc-root.jcc-font-system, .jcc-root.jcc-font-system input, .jcc-root.jcc-font-system button, .jcc-root.jcc-font-system textarea { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.jcc-root.jcc-font-inherit input, .jcc-root.jcc-font-inherit button, .jcc-root.jcc-font-inherit textarea { font-family: inherit; }

/* Burbuja flotante */
.jcc-launcher-wrap {
	position: fixed;
	bottom: var(--jcc-offset-y);
	right: var(--jcc-offset-x);
	z-index: var(--jcc-z);
	display: flex;
	align-items: center;
	gap: 10px;
}
.jcc-pos-left .jcc-launcher-wrap { right: auto; left: var(--jcc-offset-x); flex-direction: row-reverse; }
.jcc-root .jcc-launcher {
	width: var(--jcc-launcher);
	height: var(--jcc-launcher);
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--jcc-accent);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 10px 28px rgba(18, 18, 42, .28);
	transition: transform .18s ease;
	overflow: hidden;
}
.jcc-root .jcc-launcher:hover { transform: scale(1.06); }
.jcc-root .jcc-launcher:focus-visible { outline: 3px solid var(--jcc-header-bg); outline-offset: 3px; }
.jcc-launcher img { width: 60%; height: 60%; object-fit: contain; display: block; }
.jcc-launcher svg { width: 46%; height: 46%; }
.jcc-launcher-text {
	background: #fff;
	color: #12122A;
	font-weight: 600;
	font-size: 14px;
	padding: 9px 14px;
	border-radius: 999px;
	box-shadow: 0 6px 20px rgba(18, 18, 42, .16);
	white-space: nowrap;
	cursor: pointer;
}
.jcc-launcher-text:empty { display: none; }
.jcc-root.jcc-is-open .jcc-launcher-text { display: none; }

/* Ventana */
.jcc-panel {
	position: fixed;
	bottom: calc(var(--jcc-offset-y) + var(--jcc-launcher) + 14px);
	right: var(--jcc-offset-x);
	z-index: var(--jcc-z);
	width: var(--jcc-width);
	max-width: calc(100vw - 32px);
	height: var(--jcc-height);
	max-height: calc(100vh - var(--jcc-offset-y) - var(--jcc-launcher) - 40px);
	background: var(--jcc-chat-bg);
	border-radius: var(--jcc-radius);
	box-shadow: 0 24px 60px rgba(18, 18, 42, .24);
	display: none;
	flex-direction: column;
	overflow: hidden;
}
.jcc-pos-left .jcc-panel { right: auto; left: var(--jcc-offset-x); }
.jcc-panel.jcc-open { display: flex; animation: jcc-in .22s ease; }
@keyframes jcc-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Cabecera */
.jcc-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 10px 14px 16px;
	background: var(--jcc-header-bg);
	color: var(--jcc-header-text);
	flex: none;
}
.jcc-avatar {
	width: 42px;
	height: 42px;
	flex: none;
	border-radius: 50%;
	background: var(--jcc-accent);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.jcc-avatar.jcc-shape-rounded { border-radius: 10px; }
.jcc-avatar.jcc-shape-square { border-radius: 0; }
.jcc-avatar.jcc-shape-none { background: transparent; border-radius: 0; }
.jcc-avatar.jcc-has-img { background: #fff; }
.jcc-avatar.jcc-has-img.jcc-shape-none { background: transparent; }
.jcc-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jcc-avatar.jcc-shape-none img { object-fit: contain; }
.jcc-avatar svg { width: 48%; height: 48%; color: #fff; }
.jcc-head-text { flex: 1; min-width: 0; }
.jcc-title { font-weight: 700; font-size: 15px; line-height: 1.25; color: var(--jcc-header-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jcc-subtitle { display: flex; align-items: center; gap: 6px; font-size: 12px; opacity: .82; color: var(--jcc-header-text); }
.jcc-subtitle:has(span[data-p]:empty), .jcc-subtitle.jcc-empty { display: none; }
.jcc-dot { width: 8px; height: 8px; border-radius: 50%; background: #3DDC97; flex: none; }
.jcc-badge-test { background: #d63638; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .8px; padding: 3px 7px; border-radius: 999px; flex: none; }
.jcc-root .jcc-icon-btn {
	width: 40px;
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--jcc-header-text);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	opacity: .85;
	box-shadow: none;
}
.jcc-root .jcc-icon-btn:hover { opacity: 1; background: rgba(255, 255, 255, .1); }
.jcc-root .jcc-icon-btn:focus-visible { outline: 2px solid var(--jcc-header-text); }
.jcc-icon-btn svg { width: 18px; height: 18px; }

/* Mensajes */
.jcc-messages {
	flex: 1;
	overflow-y: auto;
	padding: 18px 14px 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: var(--jcc-chat-bg);
	scroll-behavior: smooth;
}
.jcc-msg {
	max-width: 86%;
	padding: 10px 14px;
	font-size: 14px;
	line-height: 1.5;
	word-wrap: break-word;
	overflow-wrap: anywhere;
}
.jcc-msg p { margin: 0 0 6px; }
.jcc-msg p:last-child { margin: 0; }
.jcc-bot {
	align-self: flex-start;
	background: var(--jcc-bot-bubble);
	color: var(--jcc-bot-text);
	border: 1px solid rgba(18, 18, 42, .08);
	border-radius: 4px 16px 16px 16px;
}
.jcc-user {
	align-self: flex-end;
	background: var(--jcc-accent);
	color: var(--jcc-user-text);
	border-radius: 16px 4px 16px 16px;
}
.jcc-msg a { color: inherit; text-decoration: underline; }
.jcc-options { display: flex; flex-wrap: wrap; gap: 8px; }
.jcc-options:empty { display: none; }
.jcc-root .jcc-opt {
	min-height: 36px;
	margin: 0;
	padding: 7px 14px;
	border: 1.5px solid var(--jcc-accent);
	border-radius: 999px;
	background: #fff;
	color: var(--jcc-accent);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	box-shadow: none;
	transition: background .15s, color .15s;
}
.jcc-root .jcc-opt:hover, .jcc-root .jcc-opt:focus-visible { background: var(--jcc-accent); color: #fff; outline: none; }
.jcc-root .jcc-opt.jcc-opt-contact { border-style: dashed; }
.jcc-typing { align-self: flex-start; display: flex; gap: 4px; padding: 14px; background: var(--jcc-bot-bubble); border: 1px solid rgba(18, 18, 42, .08); border-radius: 4px 16px 16px 16px; }
.jcc-typing span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .35; animation: jcc-blink 1.2s infinite; }
.jcc-typing span:nth-child(2) { animation-delay: .2s; }
.jcc-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes jcc-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: .9; } }

/* Formulario CF7 dentro del chat */
.jcc-form-tpl[hidden] { display: none !important; }
.jcc-formbox {
	background: #fff;
	border: 1px solid rgba(18, 18, 42, .1);
	border-radius: 14px;
	padding: 14px;
	color: #12122A;
	font-size: 13px;
}
.jcc-formbox p { margin: 0 0 10px; }
.jcc-formbox label { display: block; font-weight: 600; font-size: 12px; }
.jcc-formbox input[type="text"], .jcc-formbox input[type="email"], .jcc-formbox input[type="tel"], .jcc-formbox input[type="url"], .jcc-formbox input[type="number"], .jcc-formbox input[type="date"], .jcc-formbox select, .jcc-formbox textarea {
	width: 100% !important;
	max-width: 100%;
	margin-top: 4px;
	padding: 9px 11px;
	border: 1px solid #D5D5E2;
	border-radius: 8px;
	background: #fff;
	color: #12122A;
	font-size: 14px;
	line-height: 1.4;
	box-shadow: none;
}
.jcc-formbox textarea { min-height: 80px; max-height: 160px; }
.jcc-formbox input:focus, .jcc-formbox select:focus, .jcc-formbox textarea:focus { outline: 2px solid var(--jcc-accent); outline-offset: 0; border-color: transparent; }
.jcc-formbox .wpcf7-list-item { margin: 0; }
.jcc-formbox .wpcf7-acceptance label, .jcc-formbox .wpcf7-checkbox label { font-weight: 400; display: flex; gap: 6px; align-items: flex-start; }
.jcc-formbox input[type="submit"], .jcc-formbox button[type="submit"] {
	width: 100%;
	min-height: 44px;
	padding: 10px 16px;
	border: 0;
	border-radius: 10px;
	background: var(--jcc-header-bg);
	color: var(--jcc-header-text);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}
.jcc-formbox .wpcf7-spinner { display: block; margin: 8px auto 0; }
.jcc-formbox .wpcf7-response-output { margin: 10px 0 0 !important; padding: 8px 10px !important; border-radius: 8px; font-size: 12px; }

/* Pie */
.jcc-footer { background: #fff; border-top: 1px solid rgba(18, 18, 42, .07); flex: none; }
.jcc-input-row { display: flex; gap: 8px; padding: 10px 12px 6px; }
.jcc-root .jcc-input {
	flex: 1;
	min-width: 0;
	height: 44px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid #D5D5E2;
	border-radius: 12px;
	background: #fff;
	color: #12122A;
	font-size: 14px;
	box-shadow: none;
}
.jcc-root .jcc-input:focus { outline: 2px solid var(--jcc-accent); outline-offset: 0; border-color: transparent; }
.jcc-root .jcc-send {
	width: 44px;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0;
	flex: none;
	border: 0;
	border-radius: 12px;
	background: var(--jcc-accent);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: none;
}
.jcc-root .jcc-send:disabled { opacity: .5; cursor: default; }
.jcc-footer-links { display: flex; justify-content: center; padding: 0 12px 2px; }
.jcc-root .jcc-contact-link {
	margin: 0;
	padding: 4px 6px;
	border: 0;
	background: transparent;
	color: var(--jcc-accent);
	font-size: 12px;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
	box-shadow: none;
	min-height: 0;
}
.jcc-disclaimer { text-align: center; font-size: 11px; color: #6A6A82; padding: 2px 12px 9px; }
.jcc-disclaimer:empty { display: none; }

/* Móvil: pantalla completa */
@media (max-width: 480px) {
	.jcc-root:not(.jcc-preview) .jcc-panel {
		inset: 0;
		width: 100%;
		max-width: 100%;
		height: 100%;
		max-height: 100%;
		border-radius: 0;
	}
	.jcc-root.jcc-is-open:not(.jcc-preview) .jcc-launcher-wrap { display: none; }
	.jcc-root .jcc-input { font-size: 16px; }
}

/* Vista previa en el panel de administración */
.jcc-root.jcc-preview { position: relative; height: 100%; }
.jcc-preview .jcc-panel { position: absolute; bottom: calc(var(--jcc-launcher) + 14px); right: 0; max-height: none; height: min(var(--jcc-height), 560px); max-width: 100%; }
.jcc-preview .jcc-launcher-wrap { position: absolute; bottom: 0; right: 0; }
.jcc-preview.jcc-pos-left .jcc-panel { right: auto; left: 0; }
.jcc-preview.jcc-pos-left .jcc-launcher-wrap { right: auto; left: 0; }
.jcc-root .jcc-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
