/* Outer Envy assistant widget. Brand colours come from the theme's custom properties when present. */
.oe-ast {
	--oe-ast-blue: var(--oe-accent, #1a7ec4);
	--oe-ast-navy: var(--oe-navy, #0b2438);
	--oe-ast-bottom: 16px;
	font-family: var(--oe-body, system-ui, sans-serif);
	font-size: 15px;
	line-height: 1.45;
}
.oe-ast .screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap; }

.oe-ast__launcher {
	position: fixed;
	right: 16px;
	bottom: calc(var(--oe-ast-bottom) + env(safe-area-inset-bottom, 0px));
	z-index: 9990;
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 0;
	border-radius: 14px;
	background: var(--oe-ast-blue);
	color: #fff;
	box-shadow: 0 6px 18px rgba(11, 36, 56, .28);
	cursor: pointer;
	opacity: 0;
	transition: opacity .18s ease, transform .18s ease;
}
.oe-ast.is-ready .oe-ast__launcher { opacity: 1; }
.oe-ast__launcher:hover { background: var(--oe-accent2, #135f95); }
.oe-ast__launcher:focus-visible { outline: 3px solid var(--oe-ast-navy); outline-offset: 3px; }
.oe-ast__close-icon { display: none; }
.oe-ast.is-open .oe-ast__icon { display: none; }
.oe-ast.is-open .oe-ast__close-icon { display: block; }
/* Stepping aside for a buy button: not visible, not clickable, not focusable. */
.oe-ast.is-tucked .oe-ast__launcher { opacity: 0; visibility: hidden; transform: scale(.85); pointer-events: none; }

.oe-ast__panel {
	position: fixed;
	right: 16px;
	bottom: calc(var(--oe-ast-bottom) + 68px + env(safe-area-inset-bottom, 0px));
	z-index: 9991;
	display: flex;
	flex-direction: column;
	width: min(380px, calc(100vw - 32px));
	max-height: min(580px, calc(100vh - 140px));
	max-height: min(580px, calc(100dvh - 140px));
	background: #fff;
	color: var(--oe-ink, #0f2130);
	border-radius: 16px;
	box-shadow: 0 18px 48px rgba(11, 36, 56, .28);
	overflow: hidden;
}
.oe-ast__panel[hidden] { display: none; }

.oe-ast__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 12px 16px; background: var(--oe-ast-navy); color: #fff; }
.oe-ast__title { margin: 0; font-family: var(--oe-display, inherit); font-size: 20px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: #fff; line-height: 1.1; }
.oe-ast__title:focus { outline: none; }
.oe-ast__title:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.oe-ast__x { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.oe-ast__x:hover, .oe-ast__x:focus-visible { background: rgba(255, 255, 255, .14); outline: none; }

.oe-ast__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 14px 6px; }
.oe-ast__log { display: flex; flex-direction: column; gap: 8px; }
.oe-ast__msg { max-width: 88%; margin: 0; padding: 9px 12px; border-radius: 12px; overflow-wrap: anywhere; }
.oe-ast__msg--bot { align-self: flex-start; background: var(--oe-soft, #f4f6f7); border-bottom-left-radius: 4px; }
.oe-ast__msg--you { align-self: flex-end; background: var(--oe-ast-blue); color: #fff; border-bottom-right-radius: 4px; }
.oe-ast__msg a { color: inherit; text-decoration: underline; }
.oe-ast__msg--bot a { color: var(--oe-accent2, #135f95); }
.oe-ast__msg--typing { color: var(--oe-slate2, #7c8a97); letter-spacing: .2em; }

.oe-ast__picks { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; padding: 0; list-style: none; }
.oe-ast__picks li { margin: 0; }
.oe-ast__pick {
	display: inline-block;
	padding: 7px 11px;
	border: 1px solid var(--oe-line, #e2e7ea);
	border-radius: 999px;
	background: #fff;
	color: var(--oe-ast-navy);
	font: inherit;
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}
.oe-ast__pick:hover, .oe-ast__pick:focus-visible { border-color: var(--oe-ast-blue); color: var(--oe-ast-blue); outline: none; box-shadow: 0 0 0 2px rgba(26, 126, 196, .25); }
.oe-ast__human { margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--oe-soft, #f4f6f7); }
.oe-ast__human[hidden] { display: none; }
.oe-ast__human p { margin: 0; }

.oe-ast__form { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--oe-line, #e2e7ea); }
.oe-ast__input { flex: 1 1 auto; min-width: 0; padding: 10px 12px; border: 1px solid var(--oe-line, #e2e7ea); border-radius: 10px; font: inherit; font-size: 16px; color: inherit; background: #fff; }
.oe-ast__input:focus { border-color: var(--oe-ast-blue); outline: 2px solid rgba(26, 126, 196, .25); }
.oe-ast__send { padding: 10px 14px; border: 0; border-radius: 10px; background: var(--oe-ast-navy); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.oe-ast__send:disabled, .oe-ast__input:disabled { opacity: .6; cursor: default; }

/* Phones: the panel becomes a sheet and the launcher steps back while it is open. */
@media (max-width: 600px) {
	.oe-ast__launcher { right: 12px; width: 52px; height: 52px; }
	.oe-ast__panel {
		left: 8px;
		right: 8px;
		bottom: calc(8px + env(safe-area-inset-bottom, 0px));
		width: auto;
		max-height: calc(100vh - 16px);
		max-height: calc(100dvh - 16px);
	}
	.oe-ast.is-open .oe-ast__launcher { visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
	.oe-ast__launcher { transition: none; }
}
@media print {
	.oe-ast { display: none; }
}
