/* 1010Assist public guided-service concierge. */
.tenten-assist {
	--assist-red: #c9222b;
	--assist-red-dark: #94151d;
	--assist-gold: #e7ab27;
	--assist-ink: #181a1e;
	--assist-soft: #f5f2ec;
	--assist-paper: #ffffff;
	--assist-border: #ddd8ce;
	--assist-muted: #686d75;
	--assist-green: #188654;
	bottom: 22px;
	color: var(--assist-ink);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.45;
	position: fixed;
	right: 22px;
	z-index: 99990;
}

.tenten-assist *,
.tenten-assist *::before,
.tenten-assist *::after {
	box-sizing: border-box;
}

.tenten-assist button,
.tenten-assist input {
	font: inherit;
}

.tenten-assist [hidden] {
	display: none !important;
}

.tenten-assist-launcher {
	align-items: center;
	background: var(--assist-ink);
	border: 1px solid #383b42;
	border-bottom: 3px solid var(--assist-gold);
	box-shadow: 0 16px 42px rgba(13, 15, 18, 0.25);
	color: #fff;
	cursor: pointer;
	display: grid;
	gap: 10px;
	grid-template-columns: 42px minmax(0, 1fr) auto;
	min-height: 64px;
	padding: 9px 12px;
	text-align: left;
	width: 252px;
}

.tenten-assist-launcher:hover,
.tenten-assist-launcher:focus-visible {
	background: #25282e;
	box-shadow: 0 20px 48px rgba(13, 15, 18, 0.34);
	transform: translateY(-2px);
}

.assist-launch-icon {
	align-items: center;
	background: var(--assist-red);
	border-radius: 50%;
	display: inline-flex;
	height: 42px;
	justify-content: center;
	position: relative;
	width: 42px;
}

.assist-launch-icon .dashicons {
	color: #fff;
	font-size: 23px;
	height: 23px;
	width: 23px;
}

.assist-launch-icon i {
	background: #50de94;
	border: 2px solid var(--assist-ink);
	border-radius: 50%;
	height: 11px;
	position: absolute;
	right: 0;
	top: 0;
	width: 11px;
}

.assist-launch-copy {
	display: grid;
	line-height: 1.22;
}

.assist-launch-copy strong {
	color: #fff;
	font-size: 0.9rem;
	letter-spacing: 0.01em;
}

.assist-launch-copy small {
	color: #c6c9ce;
	font-size: 0.68rem;
	margin-top: 3px;
}

.assist-launch-badge {
	background: #3b3e45;
	color: var(--assist-gold);
	font-size: 0.57rem;
	font-weight: 800;
	letter-spacing: 0.07em;
	padding: 4px 6px;
	text-transform: uppercase;
}

.tenten-assist-teaser {
	background: #fff;
	border: 1px solid var(--assist-border);
	border-left: 4px solid var(--assist-red);
	box-shadow: 0 14px 38px rgba(19, 21, 24, 0.18);
	display: grid;
	margin: 0 0 10px auto;
	padding: 13px 34px 13px 15px;
	position: relative;
	width: 284px;
}

.tenten-assist-teaser strong {
	font-size: 0.78rem;
}

.tenten-assist-teaser > span {
	color: var(--assist-muted);
	font-size: 0.7rem;
}

.assist-teaser-dismiss {
	background: transparent;
	border: 0;
	color: #73777e;
	cursor: pointer;
	height: 28px;
	padding: 4px;
	position: absolute;
	right: 5px;
	top: 5px;
	width: 28px;
}

.tenten-assist-panel {
	background: var(--assist-paper);
	border: 1px solid #cfc9bf;
	box-shadow: 0 28px 75px rgba(15, 17, 20, 0.32);
	display: grid;
	grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
	height: min(680px, calc(100vh - 116px));
	margin-bottom: 12px;
	overflow: hidden;
	width: min(408px, calc(100vw - 32px));
}

.assist-panel-header {
	align-items: center;
	background: var(--assist-ink);
	border-bottom: 3px solid var(--assist-gold);
	color: #fff;
	display: flex;
	justify-content: space-between;
	min-height: 76px;
	padding: 11px 14px;
}

.assist-identity {
	align-items: center;
	display: flex;
	gap: 10px;
}

.assist-mark {
	align-items: center;
	background: #fff;
	border: 2px solid rgba(231, 171, 39, 0.72);
	border-radius: 50%;
	display: inline-flex;
	height: 48px;
	justify-content: center;
	overflow: hidden;
	width: 48px;
}

.assist-mark img {
	height: 100%;
	object-fit: contain;
	width: 100%;
}

.assist-identity > span:last-child {
	display: grid;
	line-height: 1.2;
}

.assist-identity strong {
	color: #fff;
	font-size: 1rem;
	letter-spacing: 0.01em;
}

.assist-identity small {
	align-items: center;
	color: #bec2c8;
	display: flex;
	font-size: 0.64rem;
	gap: 5px;
	margin-top: 3px;
}

.assist-identity small i {
	background: #50de94;
	border-radius: 50%;
	height: 7px;
	width: 7px;
}

.assist-header-actions {
	align-items: center;
	display: flex;
	gap: 5px;
}

.assist-header-actions button {
	background: transparent;
	border: 1px solid #464a51;
	color: #d4d6da;
	cursor: pointer;
	font-size: 0.63rem;
	font-weight: 750;
	min-height: 32px;
	padding: 6px 8px;
}

.assist-header-actions button:last-child {
	align-items: center;
	display: inline-flex;
	justify-content: center;
	padding: 5px;
	width: 34px;
}

.assist-header-actions button:hover,
.assist-header-actions button:focus-visible {
	border-color: var(--assist-gold);
	color: #fff;
}

.assist-preview-notice {
	align-items: flex-start;
	background: #fff7df;
	border-bottom: 1px solid #ecd89b;
	color: #5f4b17;
	display: flex;
	font-size: 0.64rem;
	gap: 7px;
	line-height: 1.45;
	padding: 9px 13px;
}

.assist-preview-notice .dashicons {
	color: #9a6800;
	flex: 0 0 auto;
	font-size: 17px;
	height: 17px;
	width: 17px;
}

.assist-conversation {
	background: #f7f5f0;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 16px 13px;
	scrollbar-color: #c6c1b8 transparent;
	scrollbar-width: thin;
}

.assist-message {
	align-items: flex-start;
	display: flex;
	gap: 8px;
	margin-bottom: 13px;
}

.assist-message.is-user {
	justify-content: flex-end;
}

.assist-message-avatar {
	align-items: center;
	background: var(--assist-red);
	border-radius: 50%;
	color: #fff;
	display: inline-flex;
	flex: 0 0 auto;
	font-size: 0.58rem;
	font-weight: 900;
	height: 30px;
	justify-content: center;
	letter-spacing: -0.04em;
	width: 30px;
}

.assist-message-content {
	background: #fff;
	border: 1px solid #ddd8ce;
	border-left: 3px solid var(--assist-red);
	box-shadow: 0 5px 15px rgba(23, 25, 29, 0.05);
	max-width: calc(100% - 38px);
	padding: 11px 12px;
}

.assist-message.is-user .assist-message-content {
	background: var(--assist-ink);
	border-color: var(--assist-ink);
	border-left: 0;
	color: #fff;
	max-width: 84%;
}

.assist-message-content p {
	color: inherit;
	font-size: 0.74rem;
	line-height: 1.55;
	margin: 0 0 7px;
}

.assist-message-content p:last-child {
	margin-bottom: 0;
}

.assist-message-content strong {
	font-size: 0.76rem;
}

.assist-source-label {
	align-items: center;
	color: var(--assist-muted);
	display: inline-flex;
	font-size: 0.61rem;
	font-weight: 750;
	letter-spacing: 0.02em;
	margin-top: 9px;
	text-decoration: underline;
	text-decoration-color: #c4aa71;
	text-underline-offset: 3px;
}

.assist-source-label:hover,
.assist-source-label:focus-visible {
	color: var(--assist-red-dark);
}

.assist-page-context {
	background: #fff9e8;
	border: 1px solid #e2c572;
	border-left: 4px solid var(--assist-gold);
	color: var(--assist-ink);
	cursor: pointer;
	display: grid;
	gap: 2px;
	margin: 2px 0 12px 38px;
	padding: 10px 11px;
	text-align: left;
	width: calc(100% - 38px);
}

.assist-page-context > span {
	color: #7c611d;
	font-size: 0.57rem;
	font-weight: 850;
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

.assist-page-context strong {
	font-size: 0.7rem;
	line-height: 1.38;
}

.assist-page-context small {
	align-items: center;
	color: var(--assist-red-dark);
	display: inline-flex;
	font-size: 0.61rem;
	font-weight: 800;
	gap: 3px;
	margin-top: 3px;
}

.assist-page-context .dashicons {
	font-size: 14px;
	height: 14px;
	width: 14px;
}

.assist-page-context:hover,
.assist-page-context:focus-visible {
	border-color: var(--assist-red);
	box-shadow: 0 5px 14px rgba(23, 25, 29, 0.08);
}

.assist-response-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
}

.assist-response-actions a,
.assist-response-actions button {
	align-items: center;
	background: #fff;
	border: 1px solid #c8c2b7;
	color: var(--assist-red-dark);
	cursor: pointer;
	display: inline-flex;
	font-size: 0.64rem;
	font-weight: 800;
	gap: 4px;
	min-height: 32px;
	padding: 6px 8px;
	text-decoration: none;
}

.assist-response-actions a.is-primary {
	background: var(--assist-red);
	border-color: var(--assist-red);
	color: #fff;
}

.assist-response-actions a:hover,
.assist-response-actions a:focus-visible,
.assist-response-actions button:hover,
.assist-response-actions button:focus-visible {
	border-color: var(--assist-gold);
	box-shadow: 0 0 0 2px rgba(231, 171, 39, 0.2);
}

.assist-quick-actions {
	display: grid;
	gap: 7px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin: 3px 0 13px 38px;
}

.assist-quick-actions button {
	align-items: center;
	background: #fff;
	border: 1px solid #d7d1c7;
	border-left: 3px solid var(--assist-gold);
	color: var(--assist-ink);
	cursor: pointer;
	display: flex;
	font-size: 0.66rem;
	font-weight: 750;
	gap: 7px;
	min-height: 44px;
	padding: 8px 9px;
	text-align: left;
}

.assist-quick-actions button:hover,
.assist-quick-actions button:focus-visible {
	border-color: var(--assist-red);
	box-shadow: 0 5px 14px rgba(23, 25, 29, 0.08);
}

.assist-quick-actions .dashicons {
	color: var(--assist-red);
	flex: 0 0 auto;
	font-size: 17px;
	height: 17px;
	width: 17px;
}

.assist-followups {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: -2px 0 14px 38px;
}

.assist-followups button {
	background: #f4f0e8;
	border: 1px solid #d4cec3;
	color: #454950;
	cursor: pointer;
	font-size: 0.62rem;
	font-weight: 700;
	padding: 6px 8px;
}

.assist-human-row {
	align-items: center;
	background: #fff;
	border-top: 1px solid var(--assist-border);
	display: flex;
	font-size: 0.65rem;
	justify-content: space-between;
	padding: 8px 13px;
}

.assist-human-row > span {
	color: var(--assist-muted);
	display: grid;
	gap: 1px;
}

.assist-human-row > span strong {
	color: var(--assist-ink);
	font-size: 0.67rem;
}

.assist-human-row > span small {
	font-size: 0.56rem;
}

.assist-human-row > div {
	align-items: center;
	display: flex;
	gap: 10px;
}

.assist-human-row a {
	align-items: center;
	color: var(--assist-red-dark);
	display: inline-flex;
	font-weight: 800;
	gap: 4px;
	text-decoration: none;
}

.assist-human-row a + a {
	border-left: 1px solid #ddd8ce;
	padding-left: 10px;
}

.assist-human-row .dashicons {
	font-size: 15px;
	height: 15px;
	width: 15px;
}

.assist-composer {
	align-items: center;
	background: #fff;
	border-top: 1px solid var(--assist-border);
	display: grid;
	gap: 8px;
	grid-template-columns: minmax(0, 1fr) 40px;
	margin: 0;
	padding: 11px 13px 8px;
}

.assist-composer input {
	background: #faf9f6;
	border: 1px solid #c9c3b8;
	border-radius: 0;
	color: var(--assist-ink);
	font-size: 0.76rem;
	height: 42px;
	margin: 0;
	min-width: 0;
	padding: 9px 11px;
	width: 100%;
}

.assist-composer input:focus {
	border-color: var(--assist-red);
	box-shadow: 0 0 0 3px rgba(201, 34, 43, 0.12);
	outline: 0;
}

.assist-composer button {
	align-items: center;
	background: var(--assist-red);
	border: 0;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	height: 40px;
	justify-content: center;
	padding: 0;
	width: 40px;
}

.assist-composer button:hover,
.assist-composer button:focus-visible {
	background: var(--assist-red-dark);
	box-shadow: 0 0 0 3px rgba(231, 171, 39, 0.34);
}

.assist-disclaimer {
	background: #fff;
	color: #777b82;
	font-size: 0.54rem;
	line-height: 1.42;
	margin: 0;
	padding: 0 13px 10px;
}

.tenten-assist button:focus-visible,
.tenten-assist a:focus-visible {
	outline: 2px solid var(--assist-gold);
	outline-offset: 2px;
}

@media (max-width: 620px) {
	.tenten-assist {
		bottom: max(12px, env(safe-area-inset-bottom));
		left: 12px;
		right: 12px;
	}

	.tenten-assist-launcher {
		margin-left: auto;
		width: 208px;
	}

	.assist-launch-copy small {
		display: none;
	}

	.tenten-assist-teaser {
		width: min(284px, 100%);
	}

	.tenten-assist-panel {
		bottom: 0;
		height: min(700px, calc(100dvh - 26px));
		margin: 0;
		position: fixed;
		width: calc(100vw - 24px);
	}

	.tenten-assist[data-assist-state="open"] .tenten-assist-launcher {
		display: none;
	}

	.assist-quick-actions {
		grid-template-columns: 1fr;
	}

	.assist-human-row {
		align-items: flex-start;
		gap: 8px;
	}

	.assist-human-row > span small {
		display: none;
	}

	.assist-human-row > div {
		flex: 0 0 auto;
	}
}

@media (max-height: 620px) and (min-width: 621px) {
	.tenten-assist-panel {
		height: calc(100vh - 92px);
	}
}

@media (prefers-reduced-motion: no-preference) {
	.tenten-assist-launcher,
	.tenten-assist-panel,
	.tenten-assist-teaser {
		transition: opacity 160ms ease, transform 160ms ease, box-shadow 160ms ease;
	}

	.tenten-assist-panel:not([hidden]),
	.tenten-assist-teaser:not([hidden]) {
		animation: tenten-assist-arrive 180ms ease both;
	}

	@keyframes tenten-assist-arrive {
		from { opacity: 0; transform: translateY(10px); }
		to { opacity: 1; transform: translateY(0); }
	}
}

@media print {
	.tenten-assist {
		display: none !important;
	}
}
