/* === AI Site Chatbot - Responsive & Polished Edition by Websitetoday === */

#aisc-bubble {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 9999;
	font-family: "Poppins", sans-serif;
}

/* === Chatknop (floating button) === */
#aisc-chat-icon {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: linear-gradient(135deg, #134475, #1b5eb7);
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
	transition: all 0.25s ease;
}
#aisc-chat-icon:hover {
	transform: scale(1.07);
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
	background: linear-gradient(135deg, #0f3767, #134475);
}
#aisc-chat-icon svg {
	width: 30px;
	height: 30px;
	fill: #ffffff;
}

/* === Chatvenster === */
#aisc-chat-window {
	display: flex;
	flex-direction: column;
	position: absolute;
	bottom: 80px;
	right: 0;
	width: 340px;
	max-height: 520px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
	overflow: hidden;
	font-size: 14px;
	color: #222;
	opacity: 0;
	transform: translateY(20px);
	pointer-events: none;
	transition: all 0.25s ease;
}
#aisc-chat-window.active {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

/* === Header === */
#aisc-header {
	background: linear-gradient(135deg, #134475, #1b5eb7);
	color: #fff;
	padding: 12px 16px;
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
}
#aisc-header .aisc-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #134475;
	font-weight: 700;
	font-size: 16px;
	box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
	transform: rotateX(10deg);
}
#aisc-header .aisc-title {
	font-weight: 700;
	font-size: 16px;
	margin-bottom: 2px;
}
#aisc-header .aisc-subtitle {
	font-size: 12px;
	opacity: 0.95;
	font-style: italic;
}
#aisc-close {
	position: absolute;
	right: 12px;
	top: 8px;
	background: none;
	border: none;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: transform 0.2s;
}
#aisc-close:hover {
	transform: scale(1.1);
}

/* === Berichtenlijst === */
#aisc-messages {
	padding: 10px;
	flex: 1;
	overflow-y: auto;
	background: #fafafa;
	scroll-behavior: smooth;
}
.message {
	margin-bottom: 10px;
	padding: 8px 12px;
	border-radius: 8px;
	max-width: 80%;
	line-height: 1.5;
	word-break: break-word;
}
.message.user {
	background: #134475;
	color: #fff;
	margin-left: auto;
}
.message.bot {
	background: #f1f1f1;
	color: #222;
	margin-right: auto;
}

/* === Typ-indicator (Rickerd is aan het typen...) === */
.message.typing {
	display: flex;
	align-items: center;
	background: #f1f1f1;
	color: #222 !important;
	padding: 8px 12px;
	border-radius: 8px;
	width: fit-content;
	max-width: 80%;
	margin: 6px 0;
}

.typing-wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
}

.typing-text {
	font-size: 13px;
	color: #444 !important;
	font-style: italic;
}

.typing-dots {
	display: flex;
	gap: 4px;
	margin-left: 3px;
}

.typing-dots .dot {
	width: 7px;
	height: 7px;
	background: #134475;
	border-radius: 50%;
	animation: typingDots 1.2s infinite ease-in-out;
	opacity: 0.6;
}
.typing-dots .dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dots .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDots {
	0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
	40% { transform: scale(1); opacity: 1; }
}

/* === Inputveld === */
#aisc-input {
	display: flex;
	align-items: center;
	padding: 8px;
	border-top: 1px solid #ddd;
	background: #f8f8f8;
}
#aisc-user-input {
	flex: 1;
	border: 1px solid #ccc;
	border-radius: 6px;
	padding: 6px 10px;
	font-size: 14px;
	outline: none;
}
#aisc-user-input:focus {
	border-color: #134475;
	box-shadow: 0 0 0 2px rgba(19,68,117,0.1);
}
#aisc-send {
	background: #134475;
	color: #fff;
	border: none;
	border-radius: 6px;
	width: 38px;
	height: 32px;
	margin-left: 6px;
	cursor: pointer;
	font-size: 14px;
	transition: background .2s;
}
#aisc-send:hover {
	background: #0f3767;
}

/* === Contactsectie === */
#aisc-contact {
	border-top: 1px solid #eee;
	padding: 10px;
	text-align: center;
	background: #fafafa;
	display: flex;
	justify-content: center;
	gap: 10px;
}
.aisc-contact-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 7px 14px;
	font-size: 13px;
	border-radius: 20px;
	text-decoration: none;
	color: #fff;
	font-weight: 600;
	box-shadow: 0 2px 6px rgba(0,0,0,0.1);
	transition: all .2s;
}
.aisc-contact-btn.wa {
	background: #25D366; /* WhatsApp */
}
.aisc-contact-btn.tel {
	background: #134475; /* Bel ons */
}
.aisc-contact-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* === Scrollbar voor berichten === */
#aisc-messages::-webkit-scrollbar {
	width: 6px;
}
#aisc-messages::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 3px;
}

/* === Mobiele optimalisatie (visibility blijft via .active!) === */
@media (max-width: 768px) {
	/* Standaard (niet-fullscreen) mobiele layout */
	#aisc-chat-window {
		bottom: 88px;
		right: 8px;
		width: calc(100vw - 16px);
		max-height: calc(100vh - 120px);
		border-radius: 14px;
	}

	/* Fullscreen-modus op mobiel – alleen afmetingen/posities, niet zichtbaarheid */
	#aisc-chat-window.fullscreen {
		position: fixed;
		inset: 0;              /* top:0; right:0; bottom:0; left:0; */
		width: 100%;
		height: 100vh;
		max-height: none;
		border-radius: 0;
		box-shadow: none;
	}

	/* Extra verfijning voor bediening en leesbaarheid */
	#aisc-header {
		padding: 14px;
	}
	#aisc-header .aisc-avatar {
		width: 40px;
		height: 40px;
		font-size: 18px;
	}
	#aisc-messages {
		padding: 14px;
	}
	.message {
		font-size: 15px;
		max-width: 92%;
	}
	#aisc-input {
		padding: 10px;
	}
	#aisc-user-input {
		font-size: 15px;
		padding: 10px;
	}
	.aisc-contact-btn {
		padding: 10px 18px;
		font-size: 14px;
		border-radius: 24px;
	}
}

/* === Hele kleine telefoons === */
@media (max-width: 420px) {
	#aisc-header .aisc-title { font-size: 15px; }
	#aisc-header .aisc-subtitle { font-size: 11px; }
	#aisc-user-input { font-size: 14px; }
}

/* Body-scroll lock wanneer chat fullscreen is op mobiel */
body.aisc-lockscroll {
	overflow: hidden;
	touch-action: none;
}
