/* Flores Coffee Chatbot — sağ alt sohbet balonu */

#fcc-widget {
	--fcc-accent: #3a9bd8;
	--fcc-accent-dark: #2c7cb0;
	--fcc-bg: #ffffff;
	--fcc-user-bg: #3a9bd8;
	--fcc-bot-bg: #eef4f8;
	--fcc-text: #2b2b2b;
	position: fixed;
	bottom: 96px; /* WhatsApp butonunun üstünde kalması için yukarı alındı */
	right: 22px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	box-sizing: border-box;
}
#fcc-widget *,
#fcc-widget *::before,
#fcc-widget *::after {
	box-sizing: border-box;
}

/* Açma/kapama balonu */
#fcc-toggle {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--fcc-accent);
	border: none;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, background 0.2s ease;
	color: #fff;
	padding: 0;
}
#fcc-toggle:hover {
	transform: scale(1.06);
	background: var(--fcc-accent-dark);
}
#fcc-toggle svg {
	width: 30px;
	height: 30px;
	fill: #fff;
}

/* Sohbet penceresi */
#fcc-panel {
	position: absolute;
	bottom: 76px;
	right: 0;
	width: 360px;
	max-width: calc(100vw - 44px);
	height: 520px;
	max-height: calc(100vh - 190px);
	background: var(--fcc-bg);
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	transform: translateY(12px) scale(0.98);
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}
#fcc-widget.fcc-open #fcc-panel {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

/* Başlık */
#fcc-header {
	background: var(--fcc-accent);
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}
#fcc-header .fcc-cup {
	font-size: 20px;
	line-height: 1;
}
#fcc-header .fcc-title {
	font-weight: 600;
	font-size: 15px;
	flex: 1;
}
#fcc-header .fcc-status {
	font-size: 11px;
	opacity: 0.85;
	display: block;
	font-weight: 400;
}
#fcc-close {
	background: transparent;
	border: none;
	color: #fff;
	cursor: pointer;
	font-size: 22px;
	line-height: 1;
	opacity: 0.85;
	padding: 0 4px;
}
#fcc-close:hover { opacity: 1; }

/* Mesaj alanı */
#fcc-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #fbf8f5;
}
.fcc-msg {
	max-width: 82%;
	padding: 10px 13px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.45;
	color: var(--fcc-text);
	word-wrap: break-word;
	white-space: pre-wrap;
}
.fcc-msg a {
	color: var(--fcc-accent-dark);
	text-decoration: underline;
}
.fcc-msg.fcc-bot {
	background: var(--fcc-bot-bg);
	align-self: flex-start;
	border-bottom-left-radius: 4px;
}
.fcc-msg.fcc-user {
	background: var(--fcc-user-bg);
	color: #fff;
	align-self: flex-end;
	border-bottom-right-radius: 4px;
}

/* Yazıyor animasyonu */
.fcc-typing {
	display: inline-flex;
	gap: 4px;
	align-items: center;
}
.fcc-typing span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #b7a894;
	animation: fcc-bounce 1.2s infinite ease-in-out;
}
.fcc-typing span:nth-child(2) { animation-delay: 0.15s; }
.fcc-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes fcc-bounce {
	0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
	30% { transform: translateY(-5px); opacity: 1; }
}

/* Giriş alanı */
#fcc-input-row {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid #eee;
	background: #fff;
	flex-shrink: 0;
}
#fcc-input {
	flex: 1;
	resize: none;
	border: 1px solid #ddd;
	border-radius: 12px;
	padding: 9px 12px;
	font-size: 14px;
	font-family: inherit;
	max-height: 100px;
	line-height: 1.4;
	outline: none;
	color: var(--fcc-text);
}
#fcc-input:focus {
	border-color: var(--fcc-accent);
}
#fcc-send {
	background: var(--fcc-accent);
	border: none;
	border-radius: 12px;
	width: 40px;
	height: 40px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background 0.2s ease;
}
#fcc-send:hover { background: var(--fcc-accent-dark); }
#fcc-send:disabled { opacity: 0.5; cursor: default; }
#fcc-send svg { width: 20px; height: 20px; fill: #fff; }

#fcc-footer {
	text-align: center;
	font-size: 10px;
	color: #b0a494;
	padding: 4px 0 8px;
	background: #fff;
}

/* Mobil */
@media (max-width: 480px) {
	#fcc-widget { bottom: 84px; right: 16px; }
	#fcc-panel {
		width: calc(100vw - 24px);
		height: calc(100vh - 170px);
		right: -6px;
	}
}
