.aik-container {
	--aik-primary: #2563eb;
	--aik-bg: #ffffff;
	--aik-text: #1f2933;
	--aik-muted: #6b7280;
	--aik-bot-bg: #f1f5f9;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.aik-container *,
.aik-container *::before,
.aik-container *::after {
	box-sizing: border-box;
}

/* Lebdeč položaj */
.aik-floating {
	position: fixed;
	z-index: 99999;
	bottom: 20px;
}
.aik-floating.aik-bottom-right { right: 20px; }
.aik-floating.aik-bottom-left { left: 20px; }

/* Gumb za odpiranje */
.aik-toggle {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	border: none;
	background: var(--aik-primary);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	margin-left: auto;
}
.aik-toggle:hover {
	transform: scale(1.06);
	box-shadow: 0 8px 26px rgba(0, 0, 0, 0.24);
}

/* Pogovorno okno */
.aik-panel {
	background: var(--aik-bg);
	width: 370px;
	max-width: calc(100vw - 32px);
	height: 540px;
	max-height: calc(100vh - 110px);
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid rgba(0, 0, 0, 0.06);
}
.aik-floating .aik-panel {
	position: absolute;
	bottom: 72px;
	width: 370px;
}
.aik-floating.aik-bottom-right .aik-panel { right: 0; }
.aik-floating.aik-bottom-left .aik-panel { left: 0; }

.aik-inline .aik-panel {
	height: 520px;
	width: 100%;
	max-width: 100%;
}

.aik-panel[hidden] { display: none; }

/* Glava */
.aik-header {
	background: var(--aik-primary);
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
}
.aik-title {
	font-weight: 600;
	font-size: 15px;
}
.aik-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.85;
	padding: 0 4px;
}
.aik-close:hover { opacity: 1; }

/* Sporočila */
.aik-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #fafbfc;
}
.aik-msg {
	display: flex;
}
.aik-msg-user { justify-content: flex-end; }
.aik-msg-bot { justify-content: flex-start; }

.aik-bubble {
	max-width: 82%;
	padding: 10px 13px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.45;
	word-wrap: break-word;
	white-space: normal;
}
.aik-msg-user .aik-bubble {
	background: var(--aik-primary);
	color: #fff;
	border-bottom-right-radius: 4px;
}
.aik-msg-bot .aik-bubble {
	background: var(--aik-bot-bg);
	color: var(--aik-text);
	border-bottom-left-radius: 4px;
}
.aik-bubble a {
	color: inherit;
	text-decoration: underline;
	word-break: break-all;
}

/* Pisanje (typing) */
.aik-dots {
	display: inline-flex;
	gap: 4px;
	align-items: center;
}
.aik-dots span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--aik-muted);
	display: inline-block;
	animation: aik-blink 1.2s infinite ease-in-out both;
}
.aik-dots span:nth-child(2) { animation-delay: 0.2s; }
.aik-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes aik-blink {
	0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
	40% { opacity: 1; transform: translateY(-3px); }
}

/* Vnos */
.aik-input {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid rgba(0, 0, 0, 0.07);
	background: var(--aik-bg);
	flex-shrink: 0;
}
.aik-text {
	flex: 1;
	resize: none;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	padding: 9px 12px;
	font-size: 14px;
	font-family: inherit;
	line-height: 1.4;
	max-height: 120px;
	outline: none;
	color: var(--aik-text);
}
.aik-text:focus {
	border-color: var(--aik-primary);
}
.aik-send {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	border: none;
	background: var(--aik-primary);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.aik-send:disabled {
	opacity: 0.55;
	cursor: default;
}

/* Mobilno */
@media (max-width: 480px) {
	.aik-floating .aik-panel {
		width: calc(100vw - 24px);
		height: calc(100vh - 100px);
		bottom: 74px;
	}
	.aik-floating.aik-bottom-left .aik-panel,
	.aik-floating.aik-bottom-right .aik-panel {
		right: 0;
		left: auto;
	}
}
