/* TECTA Dakservice Chatbot — frontend styles */

#tecta-chatbot-root {
	--tecta-primary: #194C7B;
	--tecta-button: #F7C284;
	--tecta-accent: #1FB3B7;
	--tecta-dark-accent: #00797C;
	--tecta-white: #FFFFFF;
	position: fixed;
	z-index: 999999;
	bottom: 0;
	right: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Floating launcher button ---------- */
.tecta-launcher {
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 62px;
	height: 62px;
	border-radius: 50%;
	background: var(--tecta-primary);
	box-shadow: 0 8px 24px rgba(25, 76, 123, 0.35);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tecta-launcher:hover {
	transform: translateY(-2px) scale(1.04);
	box-shadow: 0 10px 28px rgba(25, 76, 123, 0.45);
}
.tecta-launcher svg {
	width: 28px;
	height: 28px;
	fill: #fff;
}
.tecta-launcher .tecta-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--tecta-accent);
	border: 2px solid #fff;
}

/* ---------- Chat window ---------- */
.tecta-window {
	position: fixed;
	bottom: 100px;
	right: 24px;
	width: 380px;
	max-width: calc(100vw - 24px);
	height: 600px;
	max-height: calc(100vh - 130px);
	background: var(--tecta-white);
	border-radius: 16px;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	transform: translateY(16px) scale(0.98);
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.tecta-window.tecta-open {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

/* ---------- Header ---------- */
.tecta-header {
	background: var(--tecta-primary);
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}
.tecta-header img.tecta-logo {
	width: 38px;
	height: 38px;
	border-radius: 8px;
	object-fit: cover;
	background: #fff;
	flex-shrink: 0;
}
.tecta-header .tecta-header-text {
	flex: 1;
	min-width: 0;
}
.tecta-header .tecta-header-title {
	font-weight: 600;
	font-size: 15px;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.tecta-header .tecta-header-subtitle {
	font-size: 12px;
	opacity: 0.85;
	display: flex;
	align-items: center;
	gap: 5px;
}
.tecta-header .tecta-status-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--tecta-accent);
	display: inline-block;
}
.tecta-close {
	background: rgba(255, 255, 255, 0.14);
	border: none;
	color: #fff;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 16px;
	line-height: 1;
}
.tecta-close:hover {
	background: rgba(255, 255, 255, 0.24);
}

/* ---------- Messages ---------- */
.tecta-body {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #F4F7FA;
}
.tecta-msg-row {
	display: flex;
}
.tecta-msg-row.tecta-bot {
	justify-content: flex-start;
}
.tecta-msg-row.tecta-user {
	justify-content: flex-end;
}
.tecta-bubble {
	max-width: 82%;
	padding: 10px 14px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.45;
	white-space: pre-wrap;
	word-wrap: break-word;
}
.tecta-bot .tecta-bubble {
	background: #fff;
	color: #1b1b1b;
	border: 1px solid #E4E9EF;
	border-bottom-left-radius: 4px;
}
.tecta-user .tecta-bubble {
	background: var(--tecta-dark-accent);
	color: #fff;
	border-bottom-right-radius: 4px;
}

.tecta-typing {
	display: inline-flex;
	gap: 4px;
	padding: 12px 14px;
	background: #fff;
	border: 1px solid #E4E9EF;
	border-radius: 14px;
	border-bottom-left-radius: 4px;
	width: fit-content;
}
.tecta-typing span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #b7c0cb;
	animation: tecta-bounce 1.2s infinite ease-in-out;
}
.tecta-typing span:nth-child(2) { animation-delay: 0.15s; }
.tecta-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes tecta-bounce {
	0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
	30% { transform: translateY(-4px); opacity: 1; }
}

/* ---------- Quick reply buttons ---------- */
.tecta-quick-replies {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 2px;
	padding-left: 2px;
}
.tecta-quick-btn {
	background: var(--tecta-button);
	color: #1b1b1b;
	border: none;
	border-radius: 20px;
	padding: 8px 14px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: filter 0.15s ease, transform 0.15s ease;
}
.tecta-quick-btn:hover {
	filter: brightness(0.95);
	transform: translateY(-1px);
}
.tecta-quick-btn.tecta-outline {
	background: transparent;
	border: 1.5px solid var(--tecta-accent);
	color: var(--tecta-dark-accent);
}

/* ---------- Footer / input ---------- */
.tecta-footer {
	border-top: 1px solid #E4E9EF;
	padding: 10px;
	display: flex;
	gap: 8px;
	align-items: center;
	flex-shrink: 0;
	background: #fff;
}
.tecta-input {
	flex: 1;
	border: 1px solid #dbe2ea;
	border-radius: 22px;
	padding: 10px 16px;
	font-size: 14px;
	outline: none;
	background: #F4F7FA;
}
.tecta-input:focus {
	border-color: var(--tecta-accent);
}
.tecta-send {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--tecta-primary);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.tecta-send svg {
	width: 18px;
	height: 18px;
	fill: #fff;
}
.tecta-send:disabled {
	opacity: 0.5;
	cursor: default;
}
.tecta-powered {
	text-align: center;
	font-size: 11px;
	color: #9aa5b1;
	padding: 4px 0 8px;
	background: #fff;
}

/* ---------- Quote form ---------- */
.tecta-form-wrap {
	padding: 4px 2px 10px;
	background: #fff;
	border: 1px solid #E4E9EF;
	border-radius: 12px;
	max-width: 92%;
}
.tecta-form-wrap .tecta-form-title {
	font-weight: 600;
	font-size: 13px;
	padding: 10px 14px 4px;
	color: var(--tecta-primary);
}
.tecta-form-field {
	padding: 6px 14px;
}
.tecta-form-field label {
	display: block;
	font-size: 12px;
	color: #566373;
	margin-bottom: 4px;
	font-weight: 600;
}
.tecta-form-field input[type="text"],
.tecta-form-field input[type="email"],
.tecta-form-field input[type="tel"],
.tecta-form-field select,
.tecta-form-field textarea {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #dbe2ea;
	border-radius: 8px;
	padding: 8px 10px;
	font-size: 13px;
	background: #F9FBFC;
	font-family: inherit;
}
.tecta-form-field textarea {
	resize: vertical;
	min-height: 60px;
}
.tecta-form-field input[type="file"] {
	font-size: 12px;
}
.tecta-form-actions {
	padding: 10px 14px 4px;
	display: flex;
	gap: 8px;
}
.tecta-form-submit {
	background: var(--tecta-button);
	border: none;
	border-radius: 20px;
	padding: 9px 18px;
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
	color: #1b1b1b;
}
.tecta-form-error {
	color: #c0392b;
	font-size: 12px;
	padding: 0 14px 8px;
}

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
	.tecta-window {
		right: 8px;
		left: 8px;
		bottom: 92px;
		width: auto;
		max-width: none;
		height: auto;
		max-height: calc(100vh - 116px);
	}
	.tecta-launcher {
		right: 16px;
		bottom: 16px;
	}
}

.tecta-hidden {
	display: none !important;
}
