/* Sellsmith widget styles. Scoped under #sellsmith-root. */

#sellsmith-root {
	--ss-brand: #a0561b;
	--ss-on-brand: #ffffff;
	--ss-ink: #1f2430;
	--ss-paper: #ffffff;
	--ss-sand: #eef1f5;
	--ss-line: #e4e7eb;
	--ss-wa: #128a50;
	position: fixed;
	z-index: 99999;
	bottom: 18px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: var(--ss-ink);
}
#sellsmith-root.ss-pos-right { right: 18px; }
#sellsmith-root.ss-pos-left { left: 18px; }

#sellsmith-root *,
#sellsmith-root *::before,
#sellsmith-root *::after { box-sizing: border-box; margin: 0; padding: 0; }

#sellsmith-root button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
#sellsmith-root button:focus-visible,
#sellsmith-root a:focus-visible,
#sellsmith-root input:focus-visible { outline: 3px solid var(--ss-brand); outline-offset: 2px; border-radius: 6px; }

/* launcher */
#sellsmith-root .ss-launcher {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--ss-brand);
	box-shadow: 0 10px 32px rgba(20, 23, 28, .25);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform .22s cubic-bezier(.22,1,.36,1), opacity .22s;
}
#sellsmith-root .ss-launcher:hover { transform: scale(1.06); }
#sellsmith-root .ss-launcher:active { transform: scale(.95); }
#sellsmith-root .ss-launcher.ss-hide { opacity: 0; pointer-events: none; transform: scale(.6); }

/* agent avatar image (Pro: Gravatar or uploaded), shown in place of the mascot */
#sellsmith-root .ss-launcher { overflow: hidden; }
#sellsmith-root .ss-ava-img { border-radius: 50%; object-fit: cover; display: block; }
#sellsmith-root .ss-head-avatar .ss-ava-img { width: 34px; height: 34px; }
#sellsmith-root .ss-launcher .ss-ava-img { width: 100%; height: 100%; }

/* teaser */
#sellsmith-root .ss-teaser {
	position: absolute;
	bottom: 70px;
	background: #fff;
	border: 1px solid var(--ss-line);
	border-radius: 12px;
	padding: 9px 13px;
	font-size: 13px;
	box-shadow: 0 8px 24px rgba(20, 23, 28, .12);
	white-space: nowrap;
	cursor: pointer;
	opacity: 0;
	transform: translateY(8px);
	pointer-events: none;
	transition: all .28s cubic-bezier(.22,1,.36,1);
}
#sellsmith-root.ss-pos-right .ss-teaser { right: 0; }
#sellsmith-root.ss-pos-left .ss-teaser { left: 0; }
#sellsmith-root .ss-teaser.ss-show { opacity: 1; transform: none; pointer-events: auto; }

/* panel */
#sellsmith-root .ss-panel {
	position: absolute;
	bottom: 0;
	width: min(372px, calc(100vw - 24px));
	height: min(580px, calc(100dvh - 40px));
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 14px 44px rgba(20, 23, 28, .22);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	transform: translateY(16px) scale(.97);
	pointer-events: none;
	transition: opacity .26s cubic-bezier(.22,1,.36,1), transform .26s cubic-bezier(.22,1,.36,1);
}
#sellsmith-root.ss-pos-right .ss-panel { right: 0; }
#sellsmith-root.ss-pos-left .ss-panel { left: 0; }
#sellsmith-root .ss-panel.ss-open { opacity: 1; transform: none; pointer-events: auto; }

@media (max-width: 480px) {
	#sellsmith-root .ss-panel {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		height: 100dvh; /* fallback; JS (VisualViewport) refines this for the keyboard */
		max-height: 100dvh;
		border-radius: 0;
	}
}

/* head */
#sellsmith-root .ss-head {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 12px 14px;
	background: var(--ss-brand);
	color: var(--ss-on-brand);
}
#sellsmith-root .ss-head-avatar { display: flex; }
#sellsmith-root .ss-head-who { flex: 1; min-width: 0; }
#sellsmith-root .ss-head-who b { display: block; font-size: 15px; }
#sellsmith-root .ss-head-who small { font-size: 12px; color: rgba(255, 255, 255, .82); }
#sellsmith-root .ss-newchat,
#sellsmith-root .ss-close {
	min-width: 40px;
	min-height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	color: rgba(255, 255, 255, .85);
}
#sellsmith-root .ss-newchat:hover,
#sellsmith-root .ss-close:hover { background: rgba(255, 255, 255, .15); }

/* log */
#sellsmith-root .ss-log {
	flex: 1;
	overflow-y: auto;
	padding: 14px 12px;
	display: flex;
	flex-direction: column;
	gap: 9px;
	background: var(--ss-paper);
}
#sellsmith-root .ss-msg {
	max-width: 85%;
	padding: 9px 12px;
	border-radius: 13px;
	white-space: pre-line;
	word-wrap: break-word;
	animation: ss-pop .26s cubic-bezier(.22,1,.36,1);
}
@keyframes ss-pop { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
#sellsmith-root .ss-ai { background: var(--ss-sand); border-bottom-left-radius: 5px; align-self: flex-start; }
#sellsmith-root .ss-user { background: var(--ss-brand); color: var(--ss-on-brand); border-bottom-right-radius: 5px; align-self: flex-end; }

#sellsmith-root .ss-typing {
	display: inline-flex;
	gap: 5px;
	padding: 12px 14px;
	background: var(--ss-sand);
	border-radius: 13px;
	border-bottom-left-radius: 5px;
	align-self: flex-start;
}
#sellsmith-root .ss-typing i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #b8bdc4;
	animation: ss-blink 1s infinite;
}
#sellsmith-root .ss-typing i:nth-child(2) { animation-delay: .18s; }
#sellsmith-root .ss-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes ss-blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

/* whatsapp fallback button */
#sellsmith-root .ss-wa {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	align-self: stretch;
	min-height: 48px;
	border-radius: 12px;
	background: var(--ss-wa);
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
	animation: ss-pop .26s cubic-bezier(.22,1,.36,1);
}
#sellsmith-root .ss-wa:hover { background: #0e6f40; color: #fff; }

/* consent */
#sellsmith-root .ss-consent {
	background: #fff;
	border: 1px solid var(--ss-line);
	border-radius: 12px;
	padding: 14px;
	font-size: 13px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
#sellsmith-root .ss-consent-ok {
	min-height: 44px;
	border-radius: 10px;
	background: var(--ss-brand);
	color: #fff;
	font-weight: 600;
}

/* soft email ask (turned on by Sellsmith Pro) */
#sellsmith-root .ss-email-ask {
	background: var(--ss-sand);
	border-radius: 13px;
	border-bottom-left-radius: 5px;
	padding: 11px 13px;
	align-self: flex-start;
	max-width: 92%;
	display: flex;
	flex-direction: column;
	gap: 9px;
	animation: ss-pop .26s cubic-bezier(.22, 1, .36, 1);
}
#sellsmith-root .ss-email-ask-text { font-size: 14px; }
#sellsmith-root .ss-email-row { display: flex; gap: 6px; }
#sellsmith-root .ss-email-row .ss-input { min-height: 40px; }
#sellsmith-root .ss-email-send {
	min-height: 40px;
	padding: 0 14px;
	border-radius: 10px;
	background: var(--ss-brand);
	color: #fff;
	font-weight: 600;
	white-space: nowrap;
}
#sellsmith-root .ss-email-send:disabled { opacity: .55; cursor: default; }
#sellsmith-root .ss-email-skip {
	align-self: flex-start;
	background: none;
	font-size: 12px;
	color: #8b9099;
	text-decoration: underline;
}

/* input bar */
#sellsmith-root .ss-bar {
	display: flex;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid var(--ss-line);
	background: #fff;
}
#sellsmith-root .ss-input {
	flex: 1;
	min-height: 44px;
	border: 1px solid var(--ss-line);
	border-radius: 10px;
	padding: 0 13px;
	font: inherit;
	font-size: 14px;
	background: var(--ss-paper);
	color: var(--ss-ink);
}
#sellsmith-root .ss-input:focus { outline: 2px solid var(--ss-brand); border-color: var(--ss-brand); }
#sellsmith-root .ss-send {
	min-width: 44px;
	min-height: 44px;
	border-radius: 10px;
	background: var(--ss-brand);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}
#sellsmith-root .ss-send:disabled { opacity: .55; cursor: default; }

/* message ticks (message mode) */
#sellsmith-root .ss-tick { font-size: 10px; margin-left: 6px; opacity: .75; white-space: nowrap; }
#sellsmith-root .ss-tick-seen { opacity: 1; color: #9fe0ff; }

/* credit */
#sellsmith-root .ss-credit {
	text-align: center;
	font-size: 11px;
	color: #8b9099;
	padding: 0 0 7px;
	background: #fff;
}
#sellsmith-root .ss-credit a { color: var(--ss-brand); text-decoration: none; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
	#sellsmith-root * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* product cards */
#sellsmith-root .ss-cards {
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-self: stretch;
	animation: ss-pop .26s cubic-bezier(.22,1,.36,1);
}
#sellsmith-root .ss-card {
	display: flex;
	align-items: center;
	gap: 11px;
	background: #fff;
	border: 1px solid var(--ss-line);
	border-radius: 12px;
	padding: 9px 11px;
	min-height: 62px;
	text-decoration: none;
	color: var(--ss-ink);
	transition: border-color .15s;
}
#sellsmith-root .ss-card:hover { border-color: var(--ss-brand); color: var(--ss-ink); }
#sellsmith-root .ss-card-thumb {
	width: 44px;
	height: 44px;
	flex: none;
	border-radius: 9px;
	background: var(--ss-sand);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}
#sellsmith-root .ss-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
#sellsmith-root .ss-card-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}
#sellsmith-root .ss-card-info b {
	font-size: 13.5px;
	font-weight: 650;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
#sellsmith-root .ss-card-meta {
	font-size: 13px;
	color: var(--ss-brand);
	font-weight: 700;
}
