/* Yapay zeka sohbet asistanı */
.sohbet-btn,
.sohbet-karsilama,
.sohbet-panel {
	--s-gold: #c9a96e;
	--s-gold-light: #e8d5b0;
	--s-bg: #0f0f0f;
	--s-card: #161616;
	--s-line: rgba(201, 169, 110, 0.22);
	--s-text: #ece6dc;
	--s-muted: #8f8a82;
	--s-online: #3ecf75;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- Açma butonu ---- */
.sohbet-btn {
	position: fixed;
	right: 30px;
	bottom: 100px;
	z-index: 1000;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: linear-gradient(135deg, #c9a96e 0%, #e8d5b0 55%, #c9a96e 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(232, 213, 176, 0.35) inset;
	transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.2s ease;
}

.sohbet-btn:hover {
	transform: translateY(-2px) scale(1.04);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(232, 213, 176, 0.5) inset;
}

.sohbet-btn svg {
	width: 26px;
	height: 26px;
	fill: #0a0a0a;
}

.sohbet-btn.gizli {
	opacity: 0;
	pointer-events: none;
	transform: scale(0.8);
}

.sohbet-rozet {
	position: absolute;
	top: -2px;
	right: -2px;
	min-width: 20px;
	height: 20px;
	border-radius: 10px;
	background: #e5484d;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
	border: 2px solid #0a0a0a;
	transform: scale(0);
	transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sohbet-btn.bildirim .sohbet-rozet {
	transform: scale(1);
}

/* ---- Ortak: kimlik ve avatar ---- */
.sohbet-kimlik {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.sohbet-kimlik strong {
	display: block;
	color: var(--s-text);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.2px;
}

.sohbet-cevrimici {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--s-muted);
	font-size: 12px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sohbet-cevrimici::before {
	content: '';
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--s-online);
	box-shadow: 0 0 0 3px rgba(62, 207, 117, 0.15);
	flex-shrink: 0;
}

.sohbet-avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: radial-gradient(circle at 30% 25%, #2a241a 0%, #0a0a0a 75%);
	border: 1px solid rgba(201, 169, 110, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	overflow: hidden;
	color: var(--s-gold);
	font: 700 16px 'Playfair Display', serif;
	letter-spacing: -0.5px;
}

.sohbet-avatar.kucuk {
	width: 28px;
	height: 28px;
	font-size: 12px;
}

/* ---- "Yazıyor" noktaları ---- */
.sohbet-yaziyor {
	display: inline-flex;
	gap: 4px;
	padding: 4px 0;
}

.sohbet-yaziyor i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--s-gold);
	opacity: 0.35;
	animation: sohbet-nokta 1.2s infinite ease-in-out;
}

.sohbet-yaziyor i:nth-child(2) {
	animation-delay: 0.15s;
}

.sohbet-yaziyor i:nth-child(3) {
	animation-delay: 0.3s;
}

@keyframes sohbet-nokta {
	0%,
	60%,
	100% {
		opacity: 0.35;
		transform: translateY(0);
	}
	30% {
		opacity: 1;
		transform: translateY(-3px);
	}
}

/* ---- Hızlı sorular ---- */
.sohbet-hizli {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.sohbet-cip {
	padding: 7px 12px;
	border-radius: 999px;
	border: 1px solid rgba(201, 169, 110, 0.45);
	background: transparent;
	color: var(--s-gold-light);
	font: 500 12.5px 'Inter', sans-serif;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.sohbet-cip:hover {
	background: var(--s-gold);
	color: #0a0a0a;
}

/* ---- Karşılama kartı ---- */
.sohbet-karsilama {
	position: fixed;
	right: 30px;
	bottom: 172px;
	z-index: 1000;
	width: 310px;
	max-width: calc(100vw - 32px);
	padding: 14px 16px 16px;
	background: var(--s-card);
	border: 1px solid var(--s-line);
	border-radius: 16px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
	cursor: pointer;
	opacity: 0;
	transform: translateY(12px) scale(0.98);
	transform-origin: bottom right;
	pointer-events: none;
	transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Butona doğru bakan ok */
.sohbet-karsilama::after {
	content: '';
	position: absolute;
	right: 22px;
	bottom: -7px;
	width: 12px;
	height: 12px;
	background: var(--s-card);
	border-right: 1px solid var(--s-line);
	border-bottom: 1px solid var(--s-line);
	transform: rotate(45deg);
}

.sohbet-karsilama.gorunur {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

.sohbet-karsilama-ust {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	padding-bottom: 12px;
	margin-bottom: 12px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sohbet-karsilama-kapat {
	background: none;
	border: 0;
	color: var(--s-muted);
	font-size: 22px;
	line-height: 1;
	padding: 0 2px;
	cursor: pointer;
	transition: color 0.2s ease;
}

.sohbet-karsilama-kapat:hover {
	color: var(--s-text);
}

.sohbet-karsilama-metin {
	color: var(--s-text);
	font-size: 15px;
	line-height: 1.5;
}

.sohbet-karsilama .sohbet-hizli {
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	transition: max-height 0.4s ease, opacity 0.4s ease, margin 0.4s ease;
}

.sohbet-karsilama.tam .sohbet-hizli {
	max-height: 140px;
	opacity: 1;
	margin-top: 12px;
}

/* ---- Sohbet penceresi ---- */
.sohbet-panel {
	position: fixed;
	right: 30px;
	bottom: 30px;
	z-index: 1001;
	width: 380px;
	max-width: calc(100vw - 24px);
	height: 600px;
	max-height: calc(100dvh - 60px);
	display: flex;
	flex-direction: column;
	background: var(--s-bg);
	border: 1px solid var(--s-line);
	border-radius: 18px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7);
	overflow: hidden;
	opacity: 0;
	transform: translateY(16px) scale(0.98);
	transform-origin: bottom right;
	pointer-events: none;
	visibility: hidden;
	transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.3s;
}

.sohbet-panel.acik {
	opacity: 1;
	transform: none;
	pointer-events: auto;
	visibility: visible;
}

.sohbet-ust {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 16px 16px 14px;
	background: linear-gradient(180deg, #1c1a16 0%, #141414 100%);
	border-bottom: 1px solid var(--s-line);
}

.sohbet-kapat {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.05);
	border: 0;
	color: #cfcfcf;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	flex-shrink: 0;
	transition: background 0.2s ease;
}

.sohbet-kapat:hover {
	background: rgba(255, 255, 255, 0.12);
}

.sohbet-mesajlar {
	flex: 1;
	overflow-y: auto;
	padding: 18px 14px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	overscroll-behavior: contain;
}

.sohbet-satir {
	display: flex;
	align-items: flex-end;
	gap: 8px;
}

.sohbet-satir.kullanici {
	justify-content: flex-end;
}

.sohbet-mesaj {
	max-width: 80%;
	padding: 10px 14px;
	border-radius: 16px;
	font-size: 14px;
	line-height: 1.55;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.sohbet-satir.asistan .sohbet-mesaj {
	background: #1c1c1c;
	color: var(--s-text);
	border: 1px solid rgba(255, 255, 255, 0.05);
	border-bottom-left-radius: 4px;
}

.sohbet-satir.kullanici .sohbet-mesaj {
	background: linear-gradient(135deg, #c9a96e 0%, #d9bf8e 100%);
	color: #0a0a0a;
	border-bottom-right-radius: 4px;
}

.sohbet-mesaj a {
	color: var(--s-gold);
	font-weight: 600;
}

.sohbet-hizli-panel {
	padding-left: 36px;
}

.sohbet-form {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid var(--s-line);
	background: #131313;
}

.sohbet-form input {
	flex: 1;
	min-width: 0;
	padding: 12px 16px;
	border-radius: 999px;
	border: 1px solid rgba(201, 169, 110, 0.25);
	background: #0a0a0a;
	color: var(--s-text);
	font-size: 16px;
	outline: none;
	transition: border-color 0.2s ease;
}

.sohbet-form input::placeholder {
	color: #6f6a63;
}

.sohbet-form input:focus {
	border-color: var(--s-gold);
}

.sohbet-form button {
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	border: 0;
	border-radius: 50%;
	background: var(--s-gold);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.sohbet-form button:hover {
	transform: scale(1.05);
}

.sohbet-form button svg {
	width: 20px;
	height: 20px;
	fill: #0a0a0a;
}

.sohbet-form button:disabled {
	opacity: 0.45;
	cursor: default;
	transform: none;
}

.sohbet-not {
	padding: 0 16px 10px;
	background: #131313;
	color: #6f6a63;
	font-size: 11px;
	text-align: center;
}

@media (max-width: 768px) {
	.sohbet-btn {
		right: 16px;
		bottom: 96px;
		width: 54px;
		height: 54px;
	}

	.sohbet-karsilama {
		right: 16px;
		bottom: 164px;
		width: 290px;
	}

	.sohbet-panel {
		right: 0;
		left: 0;
		bottom: 0;
		width: 100%;
		max-width: 100%;
		height: 88dvh;
		max-height: 88dvh;
		border-radius: 18px 18px 0 0;
		border-bottom: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sohbet-btn,
	.sohbet-karsilama,
	.sohbet-panel,
	.sohbet-yaziyor i {
		transition: none;
		animation: none;
	}
}
