/* SPVTC · Chat ENOC  — v1.2.0 (fotos + PDF) */

.enoc-fab,
.enoc-panel,
.enoc-panel * { box-sizing: border-box; }

/* ---- Burbuja flotante ---- */
.enoc-fab {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 99998;
	display: flex;
	align-items: center;
	gap: 10px;
	background: #004088;
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 14px 20px 14px 16px;
	font: 600 15px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	cursor: pointer;
	box-shadow: 0 10px 30px rgba(0, 64, 136, .35);
	transition: transform .15s ease, box-shadow .15s ease;
}
.enoc-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(0, 64, 136, .45); }
.enoc-fab svg { width: 22px; height: 22px; flex: 0 0 auto; }
.enoc-fab .enoc-fab__txt { white-space: nowrap; }

/* ---- Panel de chat ---- */
.enoc-panel {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 99999;
	width: 384px;
	max-width: calc(100vw - 20px);
	height: min(588px, calc(100vh - 32px));
	background: #fff;
	border-radius: 18px;
	overflow: hidden;
	display: none;
	flex-direction: column;
	box-shadow: 0 24px 70px rgba(2, 12, 27, .38);
	font: 400 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	color: #17202a;
}
.enoc-panel.enoc-abierto { display: flex; }

.enoc-head {
	background: linear-gradient(135deg, #004088, #0060c0);
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 0 0 auto;
}
.enoc-head__avatar {
	width: 40px; height: 40px; border-radius: 50%;
	background: rgba(255, 255, 255, .16);
	display: flex; align-items: center; justify-content: center;
	flex: 0 0 auto;
}
.enoc-head__avatar svg { width: 22px; height: 22px; }
.enoc-head__meta { flex: 1 1 auto; min-width: 0; }
.enoc-head__t  { font-weight: 700; font-size: 15px; line-height: 1.2; }
.enoc-head__s  { font-size: 12px; opacity: .85; margin-top: 2px; }
.enoc-head__x  {
	background: transparent; border: 0; color: #fff; font-size: 24px; line-height: 1;
	cursor: pointer; padding: 4px 6px; border-radius: 8px; opacity: .85;
}
.enoc-head__x:hover { opacity: 1; background: rgba(255, 255, 255, .14); }

.enoc-log {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 16px;
	background: #f5f7fa;
	display: flex;
	flex-direction: column;
	gap: 12px;
	scroll-behavior: smooth;
}
.enoc-msg { max-width: 84%; padding: 10px 13px; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; }
.enoc-msg--bot {
	align-self: flex-start;
	background: #fff;
	border: 1px solid #e4e9f0;
	border-bottom-left-radius: 4px;
}
.enoc-msg--yo {
	align-self: flex-end;
	background: #004088;
	color: #fff;
	border-bottom-right-radius: 4px;
}
.enoc-msg--err { align-self: center; background: #fdecec; color: #9b1c1c; font-size: 13px; max-width: 100%; }
.enoc-msg a { color: inherit; font-weight: 700; }
.enoc-msg--err a { color: #7f1d1d; text-decoration: underline; }

/* ---- Foto dentro de un mensaje ---- */
.enoc-msg__foto {
	display: block;
	max-width: 100%;
	max-height: 260px;
	width: auto;
	border-radius: 10px;
	margin-bottom: 6px;
	background: #fff;
}
.enoc-msg__t { white-space: pre-wrap; word-wrap: break-word; }

/* ---- Foto preparada para enviar ---- */
.enoc-adj {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	background: #f0f5fa;
	border-top: 1px solid #e0e8f2;
}
.enoc-adj[hidden] { display: none; }
.enoc-adj__minis { flex: 0 0 auto; display: flex; gap: 4px; }
.enoc-adj__minis img {
	width: 46px; height: 46px; object-fit: cover;
	border-radius: 8px; border: 1px solid #d3dbe4; background: #fff;
	display: block;
}
.enoc-adj__txt { flex: 1 1 auto; font-size: 12.5px; color: #4a5b6d; line-height: 1.3; }
.enoc-adj__x {
	flex: 0 0 auto;
	background: transparent; border: 0; color: #6b7c8f;
	font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 8px;
}
.enoc-adj__x:hover { background: #e2ebf5; color: #9b1c1c; }

.enoc-typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: #fff; border: 1px solid #e4e9f0; border-radius: 14px; border-bottom-left-radius: 4px; }
.enoc-typing i { width: 7px; height: 7px; border-radius: 50%; background: #9fb3c8; display: block; animation: enoc-blink 1.2s infinite both; }
.enoc-typing i:nth-child(2) { animation-delay: .2s; }
.enoc-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes enoc-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.enoc-aviso {
	flex: 0 0 auto;
	background: #eef4fb;
	color: #4a5b6d;
	font-size: 11.5px;
	line-height: 1.35;
	padding: 8px 14px;
	border-top: 1px solid #e0e8f2;
}

.enoc-form { flex: 0 0 auto; display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; background: #fff; border-top: 1px solid #e4e9f0; }
.enoc-form textarea {
	flex: 1 1 auto;
	resize: none;
	height: 46px;
	max-height: 120px;
	padding: 12px 12px;
	border: 1px solid #d3dbe4;
	border-radius: 12px;
	font: inherit;
	font-size: 15px;
	color: #17202a;
	outline: none;
}
.enoc-form textarea:focus { border-color: #004088; }
.enoc-send {
	flex: 0 0 auto;
	width: 46px; height: 46px;
	border: 0; border-radius: 12px;
	background: #004088; color: #fff; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
}
.enoc-send:hover { background: #0058ab; }
.enoc-send:disabled { opacity: .5; cursor: default; }
.enoc-send svg { width: 20px; height: 20px; }

/* ---- Botón de adjuntar foto ---- */
.enoc-clip {
	flex: 0 0 auto;
	width: 46px; height: 46px;
	border: 1px solid #d3dbe4; border-radius: 12px;
	background: #fff; color: #004088; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
}
.enoc-clip:hover { background: #eef4fb; border-color: #004088; }
.enoc-clip:disabled { opacity: .5; cursor: default; }
.enoc-clip svg { width: 21px; height: 21px; }

.enoc-embed { min-height: 420px; }

@media (max-width: 520px) {
	.enoc-panel { right: 10px; bottom: 10px; left: 10px; width: auto; height: calc(100vh - 20px); max-width: none; }
	.enoc-fab .enoc-fab__txt { display: none; }
	.enoc-fab { padding: 15px; border-radius: 50%; }
	.enoc-form { gap: 6px; }
	.enoc-clip, .enoc-send { width: 42px; height: 42px; }
	.enoc-form textarea { height: 42px; }
}
