.saf-launcher {
	position: fixed;
	left: 16px;
	bottom: 20px;
	z-index: 99990;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 18px;
	border: 0;
	border-radius: 999px;
	background: #2f5d34;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
	cursor: pointer;
	transition: transform .15s ease;
}
.saf-launcher:hover { transform: translateY(-2px); background: #264d2b; color: #fff; }
.saf-launcher-icon { font-size: 18px; }
.saf-launcher.saf-hidden { display: none; }

.saf-panel {
	position: fixed;
	left: 16px;
	bottom: 20px;
	z-index: 99991;
	display: flex;
	flex-direction: column;
	width: 380px;
	max-width: calc(100vw - 32px);
	height: 600px;
	max-height: calc(100vh - 40px);
	background: #fff;
	color: #222;
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
	overflow: hidden;
	font-size: 14px;
	line-height: 1.45;
}
.saf-panel[hidden] { display: none; }

.saf-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	background: #2f5d34;
	color: #fff;
}
.saf-title { font-weight: 700; font-size: 16px; }
.saf-sub { font-size: 12px; opacity: .85; }
.saf-close {
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 26px;
	line-height: 1;
	padding: 0 4px;
	min-height: 0;
	cursor: pointer;
}

.saf-body {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	background: #f6f7f2;
}
.saf-msg {
	max-width: 88%;
	margin: 0 0 10px;
	padding: 9px 12px;
	border-radius: 14px;
	white-space: pre-wrap;
	word-wrap: break-word;
}
.saf-user { margin-left: auto; background: #2f5d34; color: #fff; border-bottom-right-radius: 4px; }
.saf-bot { background: #fff; border: 1px solid #e3e6dc; border-bottom-left-radius: 4px; }
.saf-warn { background: #fff4e5; border-color: #f0b35a; }
.saf-typing { color: #888; letter-spacing: 2px; }

.saf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.saf-chip {
	padding: 6px 12px;
	min-height: 0;
	border: 1px solid #2f5d34;
	border-radius: 999px;
	background: #fff;
	color: #2f5d34;
	font-size: 13px;
	font-weight: 500;
	text-transform: none;
	cursor: pointer;
}
.saf-chip:hover { background: #2f5d34; color: #fff; }

.saf-cards { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.saf-card {
	display: flex;
	gap: 10px;
	padding: 10px;
	background: #fff;
	border: 1px solid #e3e6dc;
	border-radius: 12px;
}
.saf-card-img { flex: 0 0 72px; }
.saf-card-img img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; display: block; }
.saf-card-info { flex: 1; min-width: 0; }
.saf-card-name { display: block; color: #222; font-weight: 600; text-decoration: none; }
.saf-card-name:hover { color: #2f5d34; }
.saf-card-price { margin: 2px 0; color: #2f5d34; font-weight: 600; }
.saf-card-price del { color: #999; font-weight: 400; margin-right: 4px; }
.saf-card-price ins { text-decoration: none; }
.saf-card-reason { color: #555; font-size: 13px; margin-bottom: 6px; }
.saf-card-btn {
	display: inline-block;
	padding: 6px 14px;
	min-height: 0;
	border: 0;
	border-radius: 8px;
	background: #000;
	color: #fff !important;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	text-transform: none;
	text-decoration: none;
	cursor: pointer;
}
.saf-card-btn:disabled { opacity: .7; cursor: default; }
.saf-card-cart { margin-left: 10px; font-size: 13px; color: #2f5d34; font-weight: 600; }

.saf-note {
	padding: 6px 14px;
	font-size: 11px;
	color: #777;
	background: #fff;
	border-top: 1px solid #eee;
}

.saf-form {
	display: flex;
	gap: 8px;
	padding: 10px 12px 12px;
	background: #fff;
	margin: 0;
}
.saf-input {
	flex: 1;
	resize: none;
	min-height: 42px;
	max-height: 100px;
	padding: 10px 12px;
	border: 1px solid #ccd2c4;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.4;
}
.saf-input:focus { outline: none; border-color: #2f5d34; }
.saf-send {
	padding: 0 18px;
	min-height: 42px;
	border: 0;
	border-radius: 10px;
	background: #2f5d34;
	color: #fff;
	font-weight: 600;
	text-transform: none;
	cursor: pointer;
}
.saf-send:disabled { opacity: .6; }

/* Keep clear of Woodmart's sticky mobile toolbar */
@media (max-width: 1024px) {
	.sticky-toolbar-on .saf-launcher { bottom: 72px; }
}
@media (max-width: 600px) {
	.saf-launcher { padding: 11px 14px; font-size: 14px; }
	.saf-panel {
		left: 0;
		bottom: 0;
		width: 100vw;
		max-width: 100vw;
		height: 100%;
		max-height: 100%;
		border-radius: 0;
	}
	.saf-input { font-size: 16px; } /* prevents iOS zoom on focus */
}

/* The theme and the site's Additional CSS restyle every <button> (position, display,
   width:fit-content, max-width:120px). Re-assert the widget's own layout. */
body button.saf-launcher {
	position: fixed !important;
	display: flex !important;
	width: auto !important;
	max-width: none !important;
	height: auto !important;
}
body button.saf-launcher.saf-hidden { display: none !important; }
body .saf-panel button,
body .saf-panel .saf-card-btn {
	max-width: none !important;
	width: auto !important;
}
body .saf-panel .saf-close { display: block !important; }
body .saf-panel .saf-send { display: block !important; flex: 0 0 auto; }

/* Theme button colours/typography are applied with !important, so restate ours. */
body button.saf-launcher,
body button.saf-launcher:hover,
body button.saf-launcher:focus {
	background: #2f5d34 !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 999px !important;
	padding: 12px 18px !important;
	font-size: 15px !important;
	text-transform: none !important;
	line-height: 1 !important;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .25) !important;
}
body button.saf-launcher:hover { background: #264d2b !important; }
body .saf-panel .saf-close,
body .saf-panel .saf-close:hover {
	background: transparent !important;
	color: #fff !important;
	border: 0 !important;
	box-shadow: none !important;
	font-size: 26px !important;
	padding: 0 4px !important;
}
body .saf-panel .saf-chip {
	background: #fff !important;
	color: #2f5d34 !important;
	border: 1px solid #2f5d34 !important;
	border-radius: 999px !important;
	padding: 6px 12px !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	text-transform: none !important;
	line-height: 1.3 !important;
	min-height: 0 !important;
	box-shadow: none !important;
}
body .saf-panel .saf-chip:hover { background: #2f5d34 !important; color: #fff !important; }
body .saf-panel .saf-send {
	background: #2f5d34 !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 10px !important;
	padding: 0 18px !important;
	min-height: 42px !important;
	font-size: 14px !important;
	text-transform: none !important;
	box-shadow: none !important;
}
body .saf-panel button.saf-card-btn {
	background: #000 !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 8px !important;
	padding: 6px 14px !important;
	font-size: 13px !important;
	text-transform: none !important;
	line-height: 1.4 !important;
	min-height: 0 !important;
}

/* Stay above other floating widgets (e.g. the video popup) */
body .saf-panel { z-index: 2147483000 !important; }
body button.saf-launcher { z-index: 2147482999 !important; }
