/* ── El Cronista: chatbot de historia ── */

.cc-bot-fab {
	position: fixed;
	bottom: 22px;
	right: 22px;
	width: 58px;
	height: 58px;
	border: none;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--cc-orange), #ff9e2c);
	color: var(--cc-white);
	cursor: pointer;
	box-shadow: 0 10px 26px rgba(255, 140, 0, 0.45);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1100;
	transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.cc-bot-fab:hover {
	transform: translateY(-3px) scale(1.05);
	background: var(--cc-teal);
	box-shadow: 0 12px 30px rgba(0, 75, 73, 0.4);
}

.cc-bot-fab__icon svg {
	width: 26px;
	height: 26px;
}

.cc-bot-fab.is-open {
	background: var(--cc-teal);
}

.cc-bot {
	position: fixed;
	bottom: 92px;
	right: 22px;
	width: min(380px, calc(100vw - 32px));
	height: min(560px, calc(100vh - 120px));
	display: flex;
	flex-direction: column;
	background: var(--cc-cream);
	border: 1px solid rgba(0, 75, 73, 0.18);
	border-radius: 18px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
	overflow: hidden;
	z-index: 1099;
}

.cc-bot__head {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.8rem 1rem;
	background: linear-gradient(135deg, var(--cc-teal), #003634);
	color: var(--cc-cream);
	flex-shrink: 0;
}

.cc-bot__avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	object-fit: contain;
	background: var(--cc-cream);
	padding: 3px;
}

.cc-bot__id {
	flex: 1;
	line-height: 1.2;
}

.cc-bot__id strong {
	display: block;
	font-family: "Bebas Neue", sans-serif;
	font-size: 1.2rem;
	letter-spacing: 0.06em;
	color: var(--cc-orange);
}

.cc-bot__id span {
	font-size: 0.72rem;
	opacity: 0.8;
}

.cc-bot__close,
.cc-bot__reset {
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: var(--cc-cream);
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease;
}

.cc-bot__close {
	font-size: 1.3rem;
}

.cc-bot__close:hover,
.cc-bot__reset:hover {
	background: rgba(255, 140, 0, 0.5);
}

.cc-bot__messages {
	flex: 1;
	overflow-y: auto;
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	scrollbar-width: thin;
}

.cc-bot__msg {
	max-width: 85%;
	padding: 0.65rem 0.85rem;
	border-radius: 14px;
	font-size: 0.9rem;
	line-height: 1.5;
}

.cc-bot__msg.is-bot {
	align-self: flex-start;
	background: var(--cc-white);
	border: 1px solid rgba(0, 75, 73, 0.12);
	border-bottom-left-radius: 4px;
	color: var(--cc-ink);
	box-shadow: var(--cc-shadow-soft);
}

.cc-bot__msg.is-bot strong {
	color: var(--cc-teal);
}

.cc-bot__msg.is-user {
	align-self: flex-end;
	background: var(--cc-teal);
	color: var(--cc-white);
	border-bottom-right-radius: 4px;
}

.cc-bot__typing {
	display: flex;
	gap: 4px;
	padding: 0 1rem 0.5rem;
	flex-shrink: 0;
}

.cc-bot__typing span {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--cc-orange);
	animation: cc-bot-dot 1s ease infinite;
}

.cc-bot__typing span:nth-child(2) {
	animation-delay: 0.15s;
}

.cc-bot__typing span:nth-child(3) {
	animation-delay: 0.3s;
}

@keyframes cc-bot-dot {
	0%,
	100% {
		transform: translateY(0);
		opacity: 0.5;
	}

	50% {
		transform: translateY(-5px);
		opacity: 1;
	}
}

.cc-bot__quick {
	display: flex;
	gap: 0.4rem;
	padding: 0.5rem 1rem;
	overflow-x: auto;
	flex-shrink: 0;
	scrollbar-width: none;
}

.cc-bot__quick button {
	flex-shrink: 0;
	padding: 0.35rem 0.8rem;
	border: 1px solid rgba(0, 75, 73, 0.25);
	border-radius: 999px;
	background: var(--cc-white);
	color: var(--cc-teal);
	font-family: "Oswald", sans-serif;
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.cc-bot__quick button:hover {
	background: var(--cc-orange);
	border-color: var(--cc-orange);
	color: var(--cc-white);
}

.cc-bot__input {
	display: flex;
	gap: 0.5rem;
	padding: 0.7rem 1rem 0.9rem;
	background: var(--cc-white);
	border-top: 1px solid rgba(0, 75, 73, 0.1);
	flex-shrink: 0;
}

.cc-bot__input input {
	flex: 1;
	padding: 0.6rem 0.9rem;
	border: 1px solid rgba(0, 75, 73, 0.2);
	border-radius: 999px;
	font-size: 0.9rem;
	background: var(--cc-cream);
	color: var(--cc-ink);
}

.cc-bot__input input:focus {
	outline: 2px solid rgba(255, 140, 0, 0.5);
	border-color: var(--cc-orange);
}

.cc-bot__send {
	width: 42px;
	height: 42px;
	border: none;
	border-radius: 50%;
	background: var(--cc-orange);
	color: var(--cc-white);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, transform 0.2s ease;
}

.cc-bot__send:hover {
	background: var(--cc-teal);
	transform: scale(1.06);
}

.cc-bot__send svg {
	width: 18px;
	height: 18px;
}

@media (max-width: 500px) {
	.cc-bot {
		right: 12px;
		bottom: 84px;
	}

	.cc-bot-fab {
		right: 14px;
		bottom: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cc-bot__typing span {
		animation: none;
	}
}
