/* CroMost: blok s obaviješću o AI asistentu, [cromost_ai_blok]. */
.cm-ai {
	padding-block: clamp(26px, 4vw, 48px);
	font-family: Arial, Helvetica, sans-serif;
	color: var(--cm-ink, #142b39);
}
.cm-ai-inner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
	gap: clamp(24px, 5vw, 64px);
	align-items: center;
	width: min(calc(100% - var(--cm-gutter, 32px) * 2), var(--cm-width, 1200px));
	margin-inline: auto;
	padding: clamp(24px, 4.5vw, 56px);
	overflow: hidden;
	border: 1px solid #d5dfe3;
	border-radius: 22px;
	background:
		radial-gradient(circle at 100% 0, rgb(255 152 14 / 16%), transparent 42%),
		radial-gradient(circle at 0 100%, rgb(55 127 157 / 12%), transparent 46%),
		#f6f9fa;
}
.cm-ai-badge {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	margin: 0 0 14px;
	padding: 5px 12px 5px 10px;
	border-radius: 999px;
	background: #fff;
	box-shadow: inset 0 0 0 1px #f0c98f;
	color: #a35600;
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.cm-ai-badge span {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--cm-orange, #ff980e);
	box-shadow: 0 0 0 0 rgb(255 152 14 / 55%);
	animation: cm-ai-pulse 2.4s ease-out infinite;
}
.cm-ai h2 {
	margin: 0;
	color: inherit;
	font: 700 clamp(1.8rem, 3.4vw, 2.55rem) / 1.12 Arial, Helvetica, sans-serif;
	letter-spacing: -.03em;
}
.cm-ai-text {
	max-width: 52ch;
	margin: 14px 0 0;
	color: #3f5766;
	font-size: 1.03rem;
	line-height: 1.6;
}
.cm-ai-label {
	margin: 22px 0 8px;
	color: #5a707d;
	font-size: .82rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.cm-ai-questions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.cm-ai-questions a {
	display: inline-block;
	padding: 8px 14px;
	border: 1px solid #cfdbe1;
	border-radius: 999px;
	background: #fff;
	color: var(--cm-ink, #142b39);
	font-size: .9rem;
	text-decoration: none;
	transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.cm-ai-questions a:hover {
	border-color: #f0b25e;
	background: #fff8ee;
	transform: translateY(-1px);
}
.cm-site .cm-ai-button { margin-top: 24px; gap: 8px; }
.cm-ai-note {
	margin: 12px 0 0;
	color: #6a7f8b;
	font-size: .82rem;
}

.cm-ai-window {
	max-width: 420px;
	margin-left: auto;
	overflow: hidden;
	border: 1px solid #d5dfe3;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 30px 60px rgb(20 43 57 / 14%);
	transform: rotate(1.2deg);
}
.cm-ai-window-bar {
	display: flex;
	gap: 11px;
	align-items: center;
	padding: 14px 16px;
	background: var(--cm-petrol, #254456);
	color: #fff;
}
.cm-ai-window-bar strong,
.cm-ai-window-bar small { display: block; }
.cm-ai-window-bar strong { font-size: .95rem; }
.cm-ai-window-bar small { color: #bfe3c9; font-size: .76rem; }
.cm-ai-window-bar small::before {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-right: 5px;
	border-radius: 50%;
	background: #5bd17d;
}
.cm-ai-avatar {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	flex: none;
	border-radius: 11px;
	background: var(--cm-orange, #ff980e);
	color: #1a1b1b;
	font-size: .8rem;
	font-weight: 700;
}
.cm-ai-chat {
	display: grid;
	gap: 10px;
	padding: 18px 16px 20px;
	background: #f8fafb;
}
.cm-ai-bubble {
	max-width: 85%;
	margin: 0;
	padding: 10px 14px;
	font-size: .9rem;
	line-height: 1.45;
	opacity: 0;
	animation: cm-ai-in .5s ease forwards;
}
.cm-ai-bubble-user {
	justify-self: end;
	border-radius: 14px 14px 4px 14px;
	background: var(--cm-petrol, #254456);
	color: #fff;
	animation-delay: .3s;
}
.cm-ai-bubble-bot {
	justify-self: start;
	border-radius: 14px 14px 14px 4px;
	background: #fff;
	box-shadow: inset 0 0 0 1px #dfe7eb;
	color: var(--cm-ink, #142b39);
	animation-delay: 1.4s;
}
.cm-ai-typing {
	display: flex;
	gap: 4px;
	width: fit-content;
	margin: 0;
	padding: 10px 13px;
	border-radius: 14px;
	background: #fff;
	box-shadow: inset 0 0 0 1px #dfe7eb;
	opacity: 0;
	animation: cm-ai-in .4s ease 2.4s forwards;
}
.cm-ai-typing span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #8aa0ac;
	animation: cm-ai-dot 1.2s ease-in-out infinite;
}
.cm-ai-typing span:nth-child(2) { animation-delay: .15s; }
.cm-ai-typing span:nth-child(3) { animation-delay: .3s; }

.cm-ai-hint {
	padding: 10px 14px;
	border: 1px dashed #c56a00;
	background: #fff8ee;
	font-size: .9rem;
}

@keyframes cm-ai-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes cm-ai-dot { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-3px); opacity: 1; } }
@keyframes cm-ai-pulse { 0% { box-shadow: 0 0 0 0 rgb(255 152 14 / 55%); } 80%, 100% { box-shadow: 0 0 0 9px rgb(255 152 14 / 0%); } }

@media (max-width: 860px) {
	.cm-ai-inner { grid-template-columns: 1fr; }
	.cm-ai-window { margin: 0; max-width: none; transform: none; }
}
@media (max-width: 520px) {
	.cm-ai-preview { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.cm-ai-bubble, .cm-ai-typing { opacity: 1; animation: none; }
	.cm-ai-typing span, .cm-ai-badge span { animation: none; }
	.cm-ai-questions a { transition: none; }
}

.cm-ai,
.cm-ai *,
.cm-ai *::before,
.cm-ai *::after { box-sizing: border-box; }
.cm-site .cm-ai .cm-ai-button {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 12px 22px;
	text-decoration: none;
}
