/* Brosis Dijital Asistan — sohbet arayüzü */

#brosis-chat-launcher {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 99998;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 20px;
	border: 0;
	border-radius: 999px;
	background: #1b4f9c;
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
	transition: transform 0.18s ease, background 0.18s ease;
}

#brosis-chat-launcher:hover {
	background: #16407f;
	transform: translateY(-2px);
}

#brosis-chat-launcher svg {
	width: 20px;
	height: 20px;
	flex: none;
}

#brosis-chat-launcher[hidden] {
	display: none;
}

#brosis-chat-panel {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	width: 380px;
	max-width: calc(100vw - 32px);
	height: 560px;
	max-height: calc(100vh - 48px);
	border-radius: 16px;
	background: #fff;
	color: #1c1c1c;
	font-family: inherit;
	font-size: 15px;
	overflow: hidden;
	box-shadow: 0 12px 48px rgba(0, 0, 0, 0.32);
}

#brosis-chat-panel[hidden] {
	display: none;
}

.brosis-chat-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 18px;
	background: #1b4f9c;
	color: #fff;
}

.brosis-chat-header strong {
	display: block;
	font-size: 15px;
	line-height: 1.3;
}

.brosis-chat-header span {
	display: block;
	font-size: 12.5px;
	opacity: 0.85;
	margin-top: 2px;
}

.brosis-chat-close {
	flex: none;
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
	font-size: 19px;
	line-height: 1;
	cursor: pointer;
}

.brosis-chat-close:hover {
	background: rgba(255, 255, 255, 0.28);
}

.brosis-chat-log {
	flex: 1;
	overflow-y: auto;
	padding: 18px;
	background: #f6f7f9;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.brosis-chat-msg {
	max-width: 85%;
	padding: 11px 14px;
	border-radius: 14px;
	line-height: 1.5;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.brosis-chat-msg-bot {
	align-self: flex-start;
	background: #fff;
	border: 1px solid #e3e6ea;
	border-bottom-left-radius: 4px;
}

.brosis-chat-msg-user {
	align-self: flex-end;
	background: #1b4f9c;
	color: #fff;
	border-bottom-right-radius: 4px;
}

.brosis-chat-msg-error {
	align-self: stretch;
	max-width: 100%;
	background: #fdecec;
	border: 1px solid #f3c2c2;
	color: #8a1f1f;
	font-size: 14px;
}

.brosis-chat-typing {
	align-self: flex-start;
	display: flex;
	gap: 5px;
	padding: 14px;
	background: #fff;
	border: 1px solid #e3e6ea;
	border-radius: 14px;
	border-bottom-left-radius: 4px;
}

.brosis-chat-typing i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #9aa3ad;
	animation: brosis-chat-bounce 1.3s infinite ease-in-out;
}

.brosis-chat-typing i:nth-child(2) { animation-delay: 0.18s; }
.brosis-chat-typing i:nth-child(3) { animation-delay: 0.36s; }

@keyframes brosis-chat-bounce {
	0%, 70%, 100% { transform: translateY(0); opacity: 0.45; }
	35%           { transform: translateY(-5px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.brosis-chat-typing i { animation: none; }
	#brosis-chat-launcher { transition: none; }
}

.brosis-chat-form {
	display: flex;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid #e3e6ea;
	background: #fff;
}

.brosis-chat-form textarea {
	flex: 1;
	resize: none;
	min-height: 42px;
	max-height: 110px;
	padding: 11px 12px;
	border: 1px solid #d4d8de;
	border-radius: 10px;
	font-family: inherit;
	font-size: 14.5px;
	line-height: 1.4;
	color: #1c1c1c;
	background: #fff;
}

.brosis-chat-form textarea:focus {
	outline: 2px solid #1b4f9c;
	outline-offset: -1px;
	border-color: #1b4f9c;
}

.brosis-chat-send {
	flex: none;
	width: 42px;
	height: 42px;
	align-self: flex-end;
	border: 0;
	border-radius: 10px;
	background: #1b4f9c;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.brosis-chat-send:disabled {
	background: #a8b3c1;
	cursor: not-allowed;
}

.brosis-chat-send svg {
	width: 18px;
	height: 18px;
}

.brosis-chat-note {
	padding: 0 14px 11px;
	background: #fff;
	color: #6b7480;
	font-size: 11.5px;
	line-height: 1.4;
	text-align: center;
}

@media (max-width: 480px) {
	#brosis-chat-panel {
		right: 0;
		bottom: 0;
		width: 100%;
		max-width: 100%;
		height: 100%;
		max-height: 100%;
		border-radius: 0;
	}

	#brosis-chat-launcher {
		right: 16px;
		bottom: 16px;
		padding: 13px 17px;
		font-size: 14px;
	}
}
