/* ===== YUMAK ASİSTAN — Chatbot Widget ===== */
#yumak-chatbot{
	--cb-navy:#152E74;
	--cb-orange:#e95f10;
	--cb-orange-d:#cf520b;
	--cb-line:#e3e6ec;
	--cb-bg:#f5f6f8;
	font-family:'Poppins', system-ui, sans-serif;
}
#yumak-chatbot *{box-sizing:border-box;}

/* ---- Launcher ---- */
.cb-launcher{
	position:fixed; right:24px; bottom:24px; z-index:99990;
	width:60px; height:60px; border-radius:50%;
	background:var(--cb-orange); color:#fff; border:none; cursor:pointer;
	box-shadow:0 8px 28px rgba(233,95,16,0.45);
	display:flex; align-items:center; justify-content:center;
	transition:transform .2s ease, background .2s ease;
}
.cb-launcher:hover{background:var(--cb-orange-d); transform:translateY(-2px);}

/* Tek yayılan nabız halkası (kapalıyken) — yalnızca transform+opacity
   animasyonu, compositor katmanında çalışır (layout/paint tetiklemez). */
.cb-launcher::before{
	content:''; position:absolute; inset:0; border-radius:50%;
	background:var(--cb-orange); z-index:-1;
	will-change:transform, opacity;
	animation:cb-pulse 2.8s cubic-bezier(.4,0,.2,1) infinite;
}
@keyframes cb-pulse{
	0%{transform:scale(1); opacity:.5;}
	70%,100%{transform:scale(2); opacity:0;}
}

.cb-launcher .cb-ic-close{display:none;}

/* Panel açıkken halkayı durdur */
#yumak-chatbot.cb-open .cb-launcher::before{display:none; animation:none;}
#yumak-chatbot.cb-open .cb-launcher .cb-ic-chat{display:none;}
#yumak-chatbot.cb-open .cb-launcher .cb-ic-close{display:block;}

/* Hareket azaltma tercihi olanlar için kapat */
@media (prefers-reduced-motion: reduce){
	.cb-launcher::before{display:none; animation:none;}
}

/* ---- Panel ---- */
.cb-panel{
	position:fixed; right:24px; bottom:96px; z-index:99991;
	width:380px; max-width:calc(100vw - 32px);
	height:560px; max-height:calc(100vh - 130px);
	background:#fff; border-radius:16px; overflow:hidden;
	display:flex; flex-direction:column;
	box-shadow:0 18px 60px rgba(21,46,116,0.28);
	animation:cb-pop .22s ease;
}
@keyframes cb-pop{from{opacity:0; transform:translateY(14px) scale(.98);} to{opacity:1; transform:none;}}

.cb-header{
	background:linear-gradient(135deg, var(--cb-navy), #1d3d91);
	color:#fff; padding:16px 18px;
	display:flex; align-items:center; justify-content:space-between;
}
.cb-header-info{display:flex; align-items:center; gap:12px;}
.cb-avatar{
	width:40px; height:40px; border-radius:50%;
	background:var(--cb-orange); color:#fff;
	display:flex; align-items:center; justify-content:center;
	font-weight:700; font-size:18px;
}
.cb-title{font-size:16px; font-weight:600; line-height:1.2;}
.cb-subtitle{font-size:12px; opacity:.85; display:flex; align-items:center; gap:6px; margin-top:2px;}
.cb-dot{width:7px; height:7px; border-radius:50%; background:#41d77a; display:inline-block;}
.cb-close{background:none; border:none; color:#fff; cursor:pointer; opacity:.85; padding:4px;}
.cb-close:hover{opacity:1;}

/* ---- Body ---- */
.cb-body{
	flex:1; overflow-y:auto; padding:18px 16px;
	background:var(--cb-bg); display:flex; flex-direction:column; gap:10px;
}
.cb-msg{display:flex; max-width:85%;}
.cb-msg-bot{align-self:flex-start;}
.cb-msg-user{align-self:flex-end;}
.cb-bubble{
	padding:10px 14px; border-radius:14px; font-size:14px; line-height:1.5;
	word-break:break-word;
}
.cb-msg-bot .cb-bubble{background:#fff; color:#26334d; border:1px solid var(--cb-line); border-bottom-left-radius:4px;}
.cb-msg-user .cb-bubble{background:var(--cb-navy); color:#fff; border-bottom-right-radius:4px;}

/* typing */
.cb-typing .cb-bubble{display:flex; gap:4px; align-items:center;}
.cb-typing .cb-bubble span{width:7px; height:7px; border-radius:50%; background:#b6c0d2; animation:cb-blink 1.2s infinite;}
.cb-typing .cb-bubble span:nth-child(2){animation-delay:.2s;}
.cb-typing .cb-bubble span:nth-child(3){animation-delay:.4s;}
@keyframes cb-blink{0%,60%,100%{opacity:.3;} 30%{opacity:1;}}

/* chips */
.cb-chips{display:flex; flex-wrap:wrap; gap:8px; margin:2px 0 4px;}
.cb-chip{
	background:#fff; border:1px solid var(--cb-orange); color:var(--cb-orange);
	font-family:'Poppins',sans-serif; font-size:13px; font-weight:500;
	padding:8px 14px; border-radius:20px; cursor:pointer;
	transition:all .15s ease;
}
.cb-chip:hover{background:var(--cb-orange); color:#fff;}

/* links */
.cb-links{display:flex; flex-wrap:wrap; gap:8px;}
.cb-link{
	display:inline-flex; align-items:center; gap:6px;
	background:#fff; border:1px solid var(--cb-line); color:var(--cb-navy);
	font-size:13px; font-weight:500; padding:8px 14px; border-radius:8px; text-decoration:none;
	transition:border-color .15s ease;
}
.cb-link:hover{border-color:var(--cb-navy);}
.cb-link-wa{background:#25d366; color:#fff; border-color:#25d366;}
.cb-link-wa:hover{background:#1ebe5a; color:#fff;}

/* finder card */
.cb-finder{
	background:#fff; border:1px solid var(--cb-line); border-radius:12px;
	padding:12px; display:flex; flex-direction:column; gap:8px;
}
.cb-select{
	width:100%; appearance:none; -webkit-appearance:none;
	background:#fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23152E74' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 12px center;
	border:1px solid #d7dbe4; border-radius:8px; padding:11px 36px 11px 14px;
	font-family:'Poppins',sans-serif; font-size:14px; color:var(--cb-navy); cursor:pointer;
}
.cb-select:focus{outline:none; border-color:var(--cb-orange); box-shadow:0 0 0 3px rgba(233,95,16,.12);}
.cb-select:disabled{background-color:#f1f2f5; color:#aab1c0; cursor:not-allowed;}
.cb-finder-go{
	background:var(--cb-orange); color:#fff; border:none; border-radius:8px;
	padding:11px 16px; font-family:'Poppins',sans-serif; font-weight:600; font-size:14px; cursor:pointer;
	transition:background .18s ease, opacity .18s ease;
}
.cb-finder-go:hover:not(:disabled){background:var(--cb-orange-d);}
.cb-finder-go:disabled{opacity:.5; cursor:not-allowed;}

/* product results */
.cb-products{display:flex; flex-direction:column; gap:8px;}
.cb-product{
	display:flex; align-items:center; gap:10px;
	background:#fff; border:1px solid var(--cb-line); border-radius:10px;
	padding:8px; text-decoration:none; color:inherit; transition:border-color .15s ease, box-shadow .15s ease;
}
.cb-product:hover{border-color:#cfd5e2; box-shadow:0 4px 14px rgba(21,46,116,.08);}
.cb-product-img{width:48px; height:48px; flex:none; border-radius:8px; overflow:hidden; background:var(--cb-bg); display:flex; align-items:center; justify-content:center;}
.cb-product-img img{width:100%; height:100%; object-fit:contain;}
.cb-product-info{flex:1; min-width:0;}
.cb-product-name{font-size:13px; font-weight:600; color:var(--cb-navy); line-height:1.3; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;}
.cb-product-code{font-size:12px; color:var(--cb-orange); font-weight:600; margin-top:2px;}
.cb-product-old{font-size:11px; color:#8a93a6;}
.cb-product-go{font-size:12px; font-weight:600; color:var(--cb-orange); flex:none; white-space:nowrap;}

/* input */
.cb-input{
	display:flex; align-items:center; gap:8px; padding:12px;
	border-top:1px solid var(--cb-line); background:#fff;
}
.cb-input input{
	flex:1; border:1px solid #d7dbe4; border-radius:22px;
	padding:11px 16px; font-family:'Poppins',sans-serif; font-size:14px; color:#26334d; outline:none;
	transition:border-color .15s ease;
}
.cb-input input:focus{border-color:var(--cb-orange);}
.cb-input button{
	width:42px; height:42px; flex:none; border:none; border-radius:50%;
	background:var(--cb-orange); color:#fff; cursor:pointer;
	display:flex; align-items:center; justify-content:center;
	transition:background .18s ease;
}
.cb-input button:hover{background:var(--cb-orange-d);}

/* mobil */
@media (max-width:480px){
	.cb-panel{
		right:0; left:0; bottom:0; width:100%; max-width:100%;
		height:80vh; max-height:80vh; border-radius:16px 16px 0 0;
	}
	.cb-launcher{right:16px; bottom:16px;}
}
