/* =====================================================
   Chat informativo - Información para pacientes
   Búsqueda local sobre el contenido de formacion/
   ===================================================== */

.patient-chat {
	background: linear-gradient(135deg, #f7faf2 0%, #ffffff 100%);
	border: 1px solid #e6eadf;
	border-radius: 20px;
	padding: 28px;
	margin: 0 0 48px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.05);
}

.patient-chat__header {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 18px;
}

.patient-chat__icon {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: linear-gradient(135deg, #aed688, #9bc76e);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	flex-shrink: 0;
}

.patient-chat__title {
	font-size: 1.1rem;
	font-weight: 700;
	color: #253237;
	margin: 0 0 2px;
}

.patient-chat__subtitle {
	font-size: 0.88rem;
	color: #5c6b73;
	margin: 0;
}

.patient-chat .chat-log {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-height: 420px;
	overflow-y: auto;
	padding: 14px;
	background: #ffffff;
	border-radius: 14px;
	margin-bottom: 14px;
	border: 1px solid #eef1ef;
	scroll-behavior: smooth;
}

.chat-msg {
	padding: 12px 16px;
	border-radius: 16px;
	max-width: 90%;
	font-size: 0.95rem;
	line-height: 1.55;
	animation: chatFadeIn 0.25s ease both;
}
@keyframes chatFadeIn {
	from { opacity: 0; transform: translateY(4px); }
	to { opacity: 1; transform: translateY(0); }
}

.chat-msg-user {
	align-self: flex-end;
	background: linear-gradient(135deg, #aed688, #9bc76e);
	color: #ffffff;
	border-bottom-right-radius: 4px;
}

.chat-msg-bot {
	align-self: flex-start;
	background: #f4f8ee;
	color: #253237;
	border-bottom-left-radius: 4px;
	max-width: 95%;
}

.chat-msg p {
	margin: 0 0 8px;
}
.chat-msg p:last-child { margin-bottom: 0; }

.chat-result {
	background: #ffffff;
	border: 1px solid #e6eadf;
	border-radius: 10px;
	padding: 12px 14px;
	margin-top: 10px;
}
.chat-result:first-of-type { margin-top: 12px; }

.chat-result__heading {
	color: #5a8f2e;
	display: block;
	font-size: 0.88rem;
	font-weight: 700;
	margin: 0 0 4px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.chat-result__text {
	font-size: 0.92rem;
	color: #4a5459;
	margin: 0 0 8px;
	line-height: 1.55;
}

.chat-link {
	color: #5a8f2e;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
}
.chat-link:hover { text-decoration: underline; }

.chat-btn {
	display: inline-block;
	margin-top: 12px;
	padding: 10px 22px;
	background: linear-gradient(135deg, #aed688, #9bc76e);
	color: #ffffff;
	border-radius: 25px;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.88rem;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.chat-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(174, 214, 136, 0.35);
	color: #ffffff;
}

.patient-chat__form {
	display: flex;
	gap: 8px;
}

.patient-chat__form input {
	flex: 1;
	padding: 13px 18px;
	border: 1px solid #cfe2b2;
	border-radius: 28px;
	font-size: 0.95rem;
	font-family: inherit;
	background: #ffffff;
	color: #253237;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.patient-chat__form input:focus {
	outline: none;
	border-color: #5a8f2e;
	box-shadow: 0 0 0 3px rgba(174, 214, 136, 0.25);
}

.patient-chat__form button {
	padding: 13px 26px;
	background: linear-gradient(135deg, #aed688, #9bc76e);
	color: #ffffff;
	border: none;
	border-radius: 28px;
	font-weight: 600;
	cursor: pointer;
	font-size: 0.95rem;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.patient-chat__form button:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(174, 214, 136, 0.35);
}

.patient-chat__suggestions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 12px;
}

.patient-chat__suggestion {
	background: #ffffff;
	border: 1px solid #cfe2b2;
	color: #5a8f2e;
	padding: 7px 14px;
	border-radius: 18px;
	font-size: 0.82rem;
	cursor: pointer;
	font-family: inherit;
	transition: all 0.2s ease;
}
.patient-chat__suggestion:hover {
	background: #aed688;
	color: #ffffff;
	border-color: #aed688;
}

.patient-chat__disclaimer {
	font-size: 0.75rem;
	color: #8a9196;
	margin: 10px 0 0;
	line-height: 1.5;
}

@media (max-width: 640px) {
	.patient-chat { padding: 18px; border-radius: 16px; }
	.patient-chat__form { flex-direction: column; }
	.patient-chat__form button { width: 100%; }
	.patient-chat .chat-log { max-height: 340px; }
	.chat-msg { max-width: 100%; }
}
