/* Store Chat Assistant */
#sca-root {
	--sca-main: #EE7F31;
	--sca-dark: #123248;
	--sca-bg: #F4F6F9;
	--sca-line: #E6E9EE;
	--sca-muted: #6B7A8C;
	position: fixed;
	bottom: 22px;
	z-index: 999990;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.45;
	color: var(--sca-dark);
	-webkit-font-smoothing: antialiased;
}
#sca-root.sca-pos-right { right: 22px; }
#sca-root.sca-pos-left { left: 22px; }
#sca-root *, #sca-root *::before, #sca-root *::after { box-sizing: border-box; }
#sca-root button { font-family: inherit; cursor: pointer; margin: 0; text-transform: none; letter-spacing: normal; line-height: 1.3; min-height: 0; box-shadow: none; }
#sca-root img { max-width: 100%; display: block; }
#sca-root a { text-decoration: none; }
#sca-root [hidden] { display: none !important; }

/* ---------- launcher ---------- */
.sca-launcher {
	position: relative;
	width: 64px; height: 64px;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: var(--sca-dark) !important;
	box-shadow: 0 10px 30px rgba(18, 50, 72, .35) !important;
	transition: transform .2s ease;
}
.sca-launcher:hover { transform: scale(1.06); }
.sca-launch-ava { position: absolute; inset: 3px; border-radius: 50%; overflow: hidden; border: 2px solid #fff; transition: opacity .2s, transform .2s; }
.sca-launch-ava img { width: 100%; height: 100%; object-fit: cover; }
.sca-launch-x { position: absolute; top: 20px; left: 20px; opacity: 0; transform: rotate(-90deg); transition: opacity .2s, transform .2s; }
.sca-open .sca-launch-ava { opacity: 0; transform: scale(.6); }
.sca-open .sca-launch-x { opacity: 1; transform: none; }
.sca-online { position: absolute; right: 2px; bottom: 3px; width: 15px; height: 15px; border-radius: 50%; background: #22C55E; border: 3px solid #fff; }
.sca-open .sca-online { display: none; }
.sca-pulse { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--sca-main); animation: sca-pulse 2.4s ease-out infinite; }
.sca-open .sca-pulse { display: none; }
@keyframes sca-pulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.45); opacity: 0; } }
.sca-badge { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--sca-main); color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; border: 2px solid #fff; }
.sca-label { position: absolute; bottom: 20px; white-space: nowrap; background: #fff; color: var(--sca-dark); font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 20px; box-shadow: 0 6px 20px rgba(0,0,0,.12); opacity: 0; pointer-events: none; transition: opacity .2s; }
.sca-pos-right .sca-label { right: 76px; }
.sca-pos-left .sca-label { left: 76px; }
.sca-launcher:hover + .sca-label { opacity: 1; }
.sca-open .sca-label { display: none; }

/* ---------- teaser ---------- */
.sca-teaser { position: absolute; bottom: 78px; width: 280px; background: #fff; border-radius: 14px; box-shadow: 0 14px 40px rgba(18,50,72,.18); padding: 14px 16px; opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s; }
.sca-pos-right .sca-teaser { right: 0; }
.sca-pos-left .sca-teaser { left: 0; }
.sca-teaser.sca-show { opacity: 1; transform: none; }
.sca-teaser-in { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding-right: 14px; }
.sca-teaser-ava { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; overflow: hidden; }
.sca-teaser-ava img { width: 100%; height: 100%; object-fit: cover; }
.sca-teaser-in b { display: block; font-size: 12px; color: var(--sca-muted); font-weight: 600; margin-bottom: 2px; }
.sca-teaser-txt { font-size: 14px; font-weight: 600; color: var(--sca-dark); }
.sca-teaser-x { position: absolute; top: 6px; right: 8px; background: none !important; border: 0 !important; padding: 2px 4px !important; color: #A7B1BD !important; font-size: 18px; line-height: 1; }

/* ---------- panel ---------- */
.sca-panel {
	position: absolute;
	bottom: 80px;
	width: 380px;
	height: min(620px, calc(100vh - 120px));
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(18, 50, 72, .25);
	opacity: 0;
	visibility: hidden;
	transform: translateY(16px) scale(.98);
	transform-origin: bottom right;
	transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.sca-pos-right .sca-panel { right: 0; }
.sca-pos-left .sca-panel { left: 0; transform-origin: bottom left; }
.sca-open .sca-panel { opacity: 1; visibility: visible; transform: none; }

.sca-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 16px 18px; background: var(--sca-dark); color: #fff; position: relative; }
.sca-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--sca-main); }
.sca-head-ava { position: relative; flex: 0 0 46px; width: 46px; height: 46px; }
.sca-head-ava img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.9); }
.sca-head-ava i { position: absolute; right: 0; bottom: 1px; width: 12px; height: 12px; border-radius: 50%; background: #22C55E; border: 2px solid var(--sca-dark); }
.sca-head-txt { flex: 1; min-width: 0; }
.sca-head-txt b { display: block; font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sca-head-txt span { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #C9D3DE; margin-top: 2px; }
.sca-dot { width: 7px; height: 7px; border-radius: 50%; background: #22C55E; display: inline-block; }
.sca-close { background: rgba(255,255,255,.08) !important; border: 0 !important; width: 34px; height: 34px; border-radius: 50% !important; padding: 7px !important; display: flex; align-items: center; justify-content: center; }
.sca-close:hover { background: rgba(255,255,255,.18) !important; }

.sca-cartbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 9px 16px; background: #FFF5EE; border-bottom: 1px solid #FBE0CC; font-size: 13px; }
.sca-cartbar a { margin-left: auto; color: var(--sca-main) !important; font-weight: 700; }
.sca-ok { color: #16A34A; font-weight: 700; }

.sca-body { flex: 1; overflow-y: auto; padding: 16px 14px 8px; background: var(--sca-bg); scroll-behavior: smooth; }
.sca-body::-webkit-scrollbar { width: 6px; }
.sca-body::-webkit-scrollbar-thumb { background: #CBD3DC; border-radius: 3px; }

.sca-brand { text-align: center; background: #fff; border: 1px solid var(--sca-line); border-radius: 14px; padding: 14px 12px 12px; margin-bottom: 14px; }
.sca-brand img { max-height: 44px; width: auto; margin: 0 auto 6px; }
.sca-brand strong { display: block; font-size: 17px; margin-bottom: 4px; }
.sca-brand > span { display: block; font-size: 12.5px; color: var(--sca-muted); }
.sca-trust { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sca-trust em { font-style: normal; font-size: 11px; font-weight: 600; background: var(--sca-bg); color: var(--sca-dark); padding: 4px 8px; border-radius: 20px; }

/* ---------- messages ---------- */
.sca-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-bottom: 10px; animation: sca-in .25s ease both; }
@keyframes sca-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sca-mava { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; }
.sca-mava img { width: 100%; height: 100%; object-fit: cover; }
.sca-bubble { max-width: calc(100% - 44px); padding: 10px 14px; border-radius: 16px; word-wrap: break-word; }
.sca-bot .sca-bubble { background: #fff; border: 1px solid var(--sca-line); border-bottom-left-radius: 4px; }
.sca-user { justify-content: flex-end; }
.sca-user .sca-bubble { background: var(--sca-dark); color: #fff; border-bottom-right-radius: 4px; }
.sca-bubble a { color: var(--sca-main) !important; font-weight: 600; }
.sca-bubble b { font-weight: 700; }
.sca-link { display: inline-block; margin-top: 4px; }

.sca-typing { display: flex; gap: 4px; padding: 14px 16px; }
.sca-typing i { width: 7px; height: 7px; border-radius: 50%; background: #A7B1BD; animation: sca-blink 1.2s infinite ease-in-out; }
.sca-typing i:nth-child(2) { animation-delay: .15s; }
.sca-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes sca-blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.sca-chips { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; padding-left: 36px; margin-top: 2px; }
.sca-chip { background: #fff !important; border: 1.5px solid var(--sca-line) !important; color: var(--sca-dark) !important; border-radius: 20px !important; padding: 7px 12px !important; font-size: 13px !important; font-weight: 600 !important; transition: border-color .15s, background .15s; }
.sca-chip:hover { border-color: var(--sca-main) !important; }
.sca-chip.sca-primary { background: var(--sca-main) !important; border-color: var(--sca-main) !important; color: #fff !important; }
.sca-chip.sca-primary:hover { filter: brightness(.95); }

/* ---------- team replies ---------- */
.sca-agent .sca-bubble { background: #fff; border: 1.5px solid var(--sca-main); border-bottom-left-radius: 4px; }
.sca-agent-ava { display: flex; align-items: center; justify-content: center; background: var(--sca-main); color: #fff; font-weight: 800; font-size: 13px; text-transform: uppercase; }
.sca-author { display: block; font-size: 11px; font-weight: 700; color: var(--sca-main); margin-bottom: 2px; }

/* ---------- offer card ---------- */
.sca-card { display: block; }
.sca-card .sca-chips { padding-left: 0; margin-top: 8px; }
.sca-offer { background: var(--sca-dark); color: #fff; border-radius: 16px; padding: 18px; position: relative; overflow: hidden; }
.sca-offer::before { content: ""; position: absolute; right: -40px; top: -40px; width: 130px; height: 130px; border-radius: 50%; background: var(--sca-main); opacity: .14; }
.sca-offer-tag { display: inline-block; background: var(--sca-main); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; padding: 4px 10px; border-radius: 20px; }
.sca-offer h4 { margin: 10px 0 4px; font-size: 21px; font-weight: 800; color: #fff; line-height: 1.2; }
.sca-offer h4 em { font-style: normal; color: var(--sca-main); }
.sca-offer p { margin: 0 0 12px; font-size: 12.5px; color: #C9D3DE; }
.sca-code { display: flex; align-items: center; justify-content: space-between; border: 2px dashed rgba(255,255,255,.4); border-radius: 10px; padding: 8px 8px 8px 14px; margin-bottom: 10px; }
.sca-code span { font-size: 18px; font-weight: 800; letter-spacing: 2px; }
.sca-copy { background: rgba(255,255,255,.12) !important; border: 0 !important; color: #fff !important; font-size: 12px !important; font-weight: 700 !important; padding: 7px 12px !important; border-radius: 6px !important; }
.sca-apply { width: 100%; background: var(--sca-main) !important; border: 0 !important; color: #fff !important; font-size: 14px !important; font-weight: 700 !important; padding: 12px !important; border-radius: 10px !important; }
.sca-apply:disabled { background: #22C55E !important; cursor: default; }

/* ---------- product cards ---------- */
.sca-prods { margin-top: 10px; display: grid; gap: 8px; }
.sca-prod { display: flex; gap: 10px; background: var(--sca-bg); border-radius: 12px; padding: 8px; }
.sca-prod-img { flex: 0 0 62px; width: 62px; height: 62px; border-radius: 8px; overflow: hidden; background: #fff; }
.sca-prod-img img { width: 100%; height: 100%; object-fit: cover; }
.sca-prod-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sca-prod-info > a { color: var(--sca-dark) !important; font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sca-price { font-size: 13px; font-weight: 700; }
.sca-price i { font-style: normal; font-size: 11px; font-weight: 600; margin-left: 4px; }
.sca-in { color: #16A34A; }
.sca-out { color: #DC2626; }
.sca-prod-btns { display: flex; gap: 6px; margin-top: 3px; }
.sca-prod-btns a { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 6px; border: 1.5px solid var(--sca-line); color: var(--sca-dark) !important; background: #fff; }
.sca-prod-btns .sca-add { background: var(--sca-main); border-color: var(--sca-main); color: #fff !important; }

/* ---------- order status card ---------- */
.sca-track { margin: -2px -4px; min-width: 230px; }
.sca-track-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 8px; margin-bottom: 6px; border-bottom: 1px solid var(--sca-line); }
.sca-track-top span { font-weight: 700; }
.sca-track-top b { background: #FFF5EE; color: var(--sca-main); font-size: 12px; padding: 3px 9px; border-radius: 20px; }
.sca-track-row { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 13px; }
.sca-track-row span { color: var(--sca-muted); }
.sca-bubble .sca-track-btn { display: block; text-align: center; margin-top: 10px; background: var(--sca-main); color: #fff !important; font-weight: 700; padding: 10px; border-radius: 8px; }
.sca-track-note { margin: 8px 0 0; font-size: 12.5px; color: var(--sca-muted); }

/* ---------- input ---------- */
.sca-form { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--sca-line); background: #fff; margin: 0; }
.sca-form input { flex: 1; min-width: 0; height: 44px !important; margin: 0 !important; border: 1.5px solid var(--sca-line) !important; border-radius: 22px !important; padding: 0 16px !important; font-size: 15px !important; color: var(--sca-dark) !important; background: var(--sca-bg) !important; box-shadow: none !important; outline: none; }
.sca-form input:focus { border-color: var(--sca-main) !important; background: #fff !important; }
.sca-form button { flex: 0 0 44px; width: 44px; height: 44px; border: 0 !important; border-radius: 50% !important; background: var(--sca-main) !important; color: #fff !important; padding: 0 !important; display: flex; align-items: center; justify-content: center; }
.sca-foot { text-align: center; font-size: 11px; color: var(--sca-muted); padding: 0 0 8px; background: #fff; }

/* ---------- mobile ---------- */
@media (max-width: 600px) {
	#sca-root.sca-pos-right { right: 14px; }
	#sca-root.sca-pos-left { left: 14px; }
	#sca-root { bottom: 18px; }
	.sca-launcher { width: 58px; height: 58px; }
	.sca-launch-x { top: 17px; left: 17px; }
	.sca-open .sca-launcher { display: none; }
	.sca-panel { position: fixed; inset: 0; width: 100%; height: 100%; border-radius: 0; bottom: 0; }
	.sca-teaser { width: calc(100vw - 28px); max-width: 300px; bottom: 70px; }
	.sca-label { display: none; }
}
