/* ==========================================================================
   OFOSAO — TopGlim-style support chat
   Bottom-left translucent activator + near-full-height bottom panel.
   ========================================================================== */

.ofosao-help {
	position: fixed;
	left: 20px;
	bottom: 24px;
	z-index: 9998;
	font-family: inherit;
}

/* Small translucent white pill, matching TopGlim's activator. */
.ofosao-help__bubble {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	min-width: 150px;
	height: 50px;
	padding: 0 20px;
	border: 0;
	border-radius: 16px;
	background: rgba(255, 255, 255, .7);
	color: #121212;
	font-size: 16px;
	line-height: 1;
	font-weight: 500;
	cursor: pointer;
	box-shadow:
		0 0 0 1px rgba(0, 0, 0, .08),
		0 2px 2px -1px rgba(0, 0, 0, .05),
		0 4px 8px -2px rgba(0, 0, 0, .05),
		0 5px 16px -2.5px rgba(0, 0, 0, .08);
	transition: background .18s ease, transform .18s ease;
}
.ofosao-help__bubble:hover { background: rgba(255, 255, 255, .88); transform: translateY(-1px); }
.ofosao-help__bubble svg { width: 20px; height: 20px; flex: 0 0 auto; }

/* Near-full-height translucent bottom sheet, 4px inset like TopGlim. */
.ofosao-help__panel {
	position: fixed;
	left: 4px;
	right: 4px;
	bottom: 4px;
	width: auto;
	height: min(675px, calc(100vh - 165px));
	max-height: calc(100vh - 165px);
	overflow: hidden;
	display: none;
	flex-direction: column;
	border: 0;
	border-radius: 16px;
	background: rgba(255, 255, 255, .9);
	-webkit-backdrop-filter: blur(24px) saturate(.6);
	backdrop-filter: blur(24px) saturate(.6);
	color: #121212;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
.ofosao-help.is-open .ofosao-help__panel { display: flex; }

/* Top bar: black Sign in pill on the left, circular minimize on the right. */
.ofosao-help__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex: 0 0 auto;
	padding: 16px 16px 4px;
	background: transparent;
}
.ofosao-help__signin {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 0 18px;
	border-radius: 999px;
	background: #121212;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
}
.ofosao-help__signin:hover { background: #000; color: #fff; }
.ofosao-help__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	flex: 0 0 auto;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #4a4a4a;
	font-size: 22px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .06);
}
.ofosao-help__close:hover { color: #121212; background: #fff; }

.ofosao-help__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 8px 18px 0;
	background: transparent;
}

/* Greeting is plain large text, not a chat bubble. */
.ofosao-help__intro p {
	max-width: 320px;
	margin: 24px 0 0;
	color: #121212;
	font-size: 15.5px;
	line-height: 1.55;
	letter-spacing: -.01em;
}

/* Centered product card, matching TopGlim's featured product block. */
.ofosao-help__product {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 160px;
	margin: 32px auto 0;
	padding: 10px;
	border-radius: 12px;
	background: #fff;
	color: inherit;
	text-decoration: none;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
}
.ofosao-help__product:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, .08); }
.ofosao-help__product img {
	display: block;
	width: 140px;
	height: 140px;
	border-radius: 8px;
	object-fit: cover;
}
.ofosao-help__product-copy { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 2px; text-align: center; }
.ofosao-help__product-copy strong { color: #121212; font-size: 12px; font-weight: 500; line-height: 1.35; }
.ofosao-help__product-copy span { color: #8a1e63; font-size: 12px; font-weight: 600; }

.ofosao-help__thread { display: grid; gap: 8px; margin: 14px 0 10px; }
.ofosao-help__thread:empty { display: none; }
.ofosao-help__thread p {
	max-width: 88%;
	margin: 0;
	padding: 9px 12px;
	border-radius: 12px;
	font-size: 12.5px;
	line-height: 1.5;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}
.ofosao-help__thread .is-user { justify-self: end; border-bottom-right-radius: 4px; background: #121212; color: #fff; }
.ofosao-help__thread .is-agent { justify-self: start; border-bottom-left-radius: 4px; background: rgba(255, 255, 255, .9); color: #121212; box-shadow: 0 1px 4px rgba(0, 0, 0, .04); }
.ofosao-help__panel.is-chatting .ofosao-help__product { display: none; }

.ofosao-help__form {
	flex: 0 0 auto;
	padding: 8px 18px 14px;
	border: 0;
	background: transparent;
}
.ofosao-help__email { margin: 0 0 8px; }
.ofosao-help__email input {
	box-sizing: border-box;
	width: 100%;
	height: 32px;
	padding: 0 12px;
	border: 1px solid rgba(0, 0, 0, .1);
	border-radius: 10px;
	background: rgba(255, 255, 255, .75);
	color: #121212;
	font-family: inherit;
	font-size: 12px;
	outline: none;
}
.ofosao-help__email input:focus { border-color: rgba(0, 0, 0, .3); background: #fff; }
.ofosao-help__disclaimer {
	margin: 0 2px 10px;
	color: rgba(18, 18, 18, .55);
	font-size: 10.5px;
	line-height: 1.45;
}
.ofosao-help__disclaimer a { color: rgba(18, 18, 18, .7); text-decoration: underline; }

.ofosao-help__suggestions { margin-bottom: 10px; }
.ofosao-help__quick {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	overflow-x: auto;
	margin: 0 -18px;
	padding: 0 18px 4px;
	scrollbar-width: none;
}
.ofosao-help__quick::-webkit-scrollbar { display: none; }
.ofosao-help__quick button {
	flex: 0 0 auto;
	padding: 0 16px;
	height: 40px;
	border: 1px solid rgba(0, 0, 0, .14);
	border-radius: 999px;
	background: rgba(255, 255, 255, .9);
	color: #121212;
	font-family: inherit;
	font-size: 13.5px;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
}
.ofosao-help__quick button:hover { background: #fff; border-color: rgba(0, 0, 0, .3); }

.ofosao-help__composer-row { display: flex; align-items: flex-end; gap: 8px; }
.ofosao-help__composer-row textarea {
	box-sizing: border-box;
	flex: 1 1 auto;
	width: 100%;
	min-height: 52px;
	max-height: 96px;
	padding: 15px 16px;
	border: 1px solid rgba(0, 0, 0, .28);
	border-radius: 16px;
	background: #fff;
	color: #121212;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.4;
	resize: none;
	outline: none;
}
.ofosao-help__composer-row textarea:focus { border-color: #121212; }
.ofosao-help__send {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	flex: 0 0 auto;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #121212;
	color: #fff;
	cursor: pointer;
}
.ofosao-help__send:hover { background: #000; }
.ofosao-help__send[disabled] { opacity: .55; cursor: default; }
.ofosao-help__send svg { width: 18px; height: 18px; }

.ofosao-help__msg { display: none; margin: 8px 0 0; font-size: 11.5px; line-height: 1.45; }
.ofosao-help__msg.is-ok { display: block; color: #1f7a3d; }
.ofosao-help__msg.is-err { display: block; color: #b3261e; }

.ofosao-help__links { display: flex; gap: 14px; margin-top: 8px; }
.ofosao-help__links a { color: rgba(18, 18, 18, .55); font-size: 10.5px; text-decoration: none; }
.ofosao-help__links a:hover { color: #121212; }

/* Mobile: leave the same 120px bottom offset TopGlim uses for the activator. */
@media screen and (max-width: 600px) {
	.ofosao-help { left: 20px; bottom: 120px; }
	.ofosao-help__bubble { min-width: 150px; height: 50px; padding: 0 18px; font-size: 16px; }
	.ofosao-help__panel {
		left: 4px;
		right: 4px;
		bottom: 4px;
		width: auto;
		height: min(675px, calc(100vh - 165px));
		max-height: calc(100vh - 165px);
		border-radius: 16px;
	}
	.ofosao-help__head { padding: 16px 16px 4px; }
	.ofosao-help__body { padding: 8px 18px 0; }
	.ofosao-help__form { padding: 8px 18px 14px; }
	.ofosao-help__product { width: 160px; }
	.ofosao-help__product img { width: 140px; height: 140px; }
}

/* Desktop: keep a compact floating card on the left, still translucent. */
@media screen and (min-width: 768px) {
	.ofosao-help { left: 20px; bottom: 24px; }
	.ofosao-help__panel {
		left: 20px;
		right: auto;
		bottom: 24px;
		width: 380px;
		height: min(620px, calc(100vh - 48px));
		max-height: calc(100vh - 48px);
		border-radius: 18px;
		background: rgba(255, 255, 255, .95);
		-webkit-backdrop-filter: blur(24px) saturate(.65);
		backdrop-filter: blur(24px) saturate(.65);
	}
	.ofosao-help__body { padding: 4px 20px 0; }
	.ofosao-help__intro p { margin-top: 18px; font-size: 15px; }
	.ofosao-help__product { margin-top: 22px; }
	.ofosao-help__form { padding: 8px 20px 14px; }
	.ofosao-help__quick { margin: 0 -20px; padding: 0 20px 4px; }
}
