/* BulkOutlets Chat — storefront widget (matches the store's olive/navy palette) */

.bchat-bubble {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99990;
	width: 58px;
	height: 58px;
	border: none;
	border-radius: 50%;
	background: #4c5d3a; /* olive accent */
	color: #fff;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(11, 15, 26, .28);
	display: grid;
	place-items: center;
	transition: transform .15s ease, background .15s ease;
}
.bchat-bubble:hover { transform: translateY(-2px); background: #3e4c33; }
.bchat-bubble--open svg { transform: rotate(90deg); }

.bchat-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 10px;
	background: #0b0f1a; /* navy-black band */
	color: #b9cd90;      /* sage */
	font: 700 11px/20px ui-monospace, SFMono-Regular, Menlo, monospace;
	text-align: center;
}

.bchat-panel {
	position: fixed;
	right: 20px;
	bottom: 90px;
	z-index: 99991;
	width: 340px;
	max-height: min(560px, calc(100vh - 120px));
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid rgba(42, 51, 44, .12);
	border-radius: 14px;
	box-shadow: 0 18px 50px rgba(11, 15, 26, .22);
	overflow: hidden;
}
.bchat-panel[hidden] { display: none; }

.bchat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 14px 16px;
	background: #0b0f1a; /* navy band */
	color: #fff;
}
.bchat-head__brand { display: block; font: 700 15px/1.2 -apple-system, "Segoe UI", Roboto, sans-serif; color: #fff; }
.bchat-head__sub { display: block; font: 400 12px/1.4 -apple-system, "Segoe UI", Roboto, sans-serif; color: #b9cd90; }
.bchat-head__x {
	background: none; border: none; color: #9aa79f;
	font-size: 15px; cursor: pointer; line-height: 1; padding: 4px;
}
.bchat-head__x:hover { color: #fff; }

/* The gate (name + email) */
.bchat-gate { padding: 18px 16px 20px; }
.bchat-gate__hi { margin: 0 0 4px; font: 700 17px/1.3 -apple-system, "Segoe UI", Roboto, sans-serif; color: #2a332c; }
.bchat-gate__sub { margin: 0 0 14px; font: 400 13px/1.5 -apple-system, "Segoe UI", Roboto, sans-serif; color: rgba(42, 51, 44, .65); }
.bchat-field {
	position: relative;
	margin-bottom: 10px;
}
.bchat-field input {
	width: 100%;
	box-sizing: border-box;
	padding: 13px 12px 5px;
	border: 1px solid rgba(42, 51, 44, .25);
	border-radius: 8px;
	font: 400 14px/1.4 -apple-system, "Segoe UI", Roboto, sans-serif;
	color: #2a332c;
	background: #fff;
	outline: none;
}
.bchat-field input:focus { border-color: #4c5d3a; box-shadow: 0 0 0 2px rgba(76, 93, 58, .15); }
.bchat-field label {
	position: absolute;
	left: 12px;
	top: 15px;
	font: 400 14px/1 -apple-system, "Segoe UI", Roboto, sans-serif;
	color: rgba(42, 51, 44, .45);
	pointer-events: none;
	transition: all .12s ease;
}
.bchat-field input:focus + label,
.bchat-field input:not(:placeholder-shown) + label {
	top: 5px;
	font-size: 10.5px;
	color: #4c5d3a;
}
.bchat-cta {
	width: 100%;
	margin-top: 4px;
	padding: 12px 16px;
	border: none;
	border-radius: 8px;
	background: #4c5d3a;
	color: #fff;
	font: 600 14px/1 -apple-system, "Segoe UI", Roboto, sans-serif;
	cursor: pointer;
}
.bchat-cta:hover { background: #3e4c33; }

/* The conversation */
.bchat-view { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.bchat-msgs {
	flex: 1;
	min-height: 260px;
	max-height: 380px;
	overflow-y: auto;
	padding: 14px 14px 6px;
	background: #e6ebe2; /* warm Olive Fog panel */
}
.bchat-msg {
	max-width: 85%;
	margin-bottom: 8px;
	padding: 9px 12px;
	border-radius: 12px;
	font: 400 13.5px/1.45 -apple-system, "Segoe UI", Roboto, sans-serif;
	white-space: pre-wrap;
	word-break: break-word;
}
.bchat-msg--me { margin-left: auto; background: #4c5d3a; color: #fff; border-bottom-right-radius: 4px; }
.bchat-msg--them { margin-right: auto; background: #fff; color: #2a332c; border: 1px solid rgba(42, 51, 44, .1); border-bottom-left-radius: 4px; }
.bchat-msg--auto.bchat-msg--them::before {
	content: 'Customer support';
	display: block;
	margin-bottom: 3px;
	font: 600 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
	color: #4c5d3a;
}

.bchat-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 8px 14px 2px;
	background: #e6ebe2;
}
.bchat-chips[hidden] { display: none; }
.bchat-chip {
	padding: 6px 11px;
	border: 1px solid #4c5d3a;
	border-radius: 999px;
	background: #fff;
	color: #4c5d3a;
	font: 500 12px/1 -apple-system, "Segoe UI", Roboto, sans-serif;
	cursor: pointer;
}
.bchat-chip:hover { background: #4c5d3a; color: #fff; }

.bchat-composer {
	display: flex;
	gap: 8px;
	padding: 10px 14px 14px;
	background: #e6ebe2;
	border-top: 1px solid rgba(42, 51, 44, .08);
}
.bchat-composer input {
	flex: 1;
	min-width: 0;
	padding: 10px 12px;
	border: 1px solid rgba(42, 51, 44, .22);
	border-radius: 999px;
	font: 400 14px/1.4 -apple-system, "Segoe UI", Roboto, sans-serif;
	color: #2a332c;
	background: #fff;
	outline: none;
}
.bchat-composer input:focus { border-color: #4c5d3a; }
.bchat-composer button {
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	border: none;
	border-radius: 50%;
	background: #4c5d3a;
	color: #fff;
	cursor: pointer;
	display: grid;
	place-items: center;
}
.bchat-composer button:hover { background: #3e4c33; }

/* Mobile: full-width bottom sheet */
@media (max-width: 480px) {
	.bchat-bubble { right: 14px; bottom: 14px; }
	.bchat-panel {
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		max-height: calc(100vh - 70px);
		border-radius: 14px 14px 0 0;
	}
	.bchat-msgs { max-height: calc(100vh - 250px); min-height: 300px; }
}

@media (prefers-reduced-motion: reduce) {
	.bchat-bubble, .bchat-bubble svg, .bchat-field label { transition: none; }
}
