:root {
	--ushera-color: #1f6feb;
}

/* Reset — themes/page builders (Divi, Elementor, etc.) often apply global
   styles straight to bare button/input tags. This neutralizes that
   *only* on the actual button/input elements (never on our own divs —
   an ID-anchored selector always outranks our plain class selectors, so
   resetting broadly here would silently override our own component
   styling instead of the theme's). */
#ushera-root, #ushera-root *, #ushera-root *::before, #ushera-root *::after {
	box-sizing: border-box !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	text-shadow: none !important;
}
#ushera-root button, #ushera-root input {
	margin: 0;
	padding: 0;
	background: none;
	border: none;
	color: inherit;
	font-family: inherit !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	box-shadow: none !important;
	outline: none !important;
}
#ushera-root a { text-decoration: underline; }

#ushera-root {
	position: fixed;
	bottom: var(--ushera-offset-y, 20px);
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
#ushera-root.ushera-pos-right { right: var(--ushera-offset-x, 20px); }
#ushera-root.ushera-pos-left { left: var(--ushera-offset-x, 20px); }

.ushera-toggle {
	width: var(--ushera-bubble-size, 58px) !important;
	height: var(--ushera-bubble-size, 58px) !important;
	border-radius: 50% !important;
	background: var(--ushera-color) !important;
	color: #fff !important;
	border: none !important;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0,0,0,.2) !important;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform .15s ease;
}
.ushera-toggle:hover { transform: scale(1.05); }
.ushera-toggle svg { width: 45%; height: 45%; }

.ushera-panel {
	position: absolute;
	bottom: calc(var(--ushera-bubble-size, 58px) + 16px);
	width: 360px;
	max-width: calc(100vw - 40px);
	height: 520px;
	max-height: 75vh;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 10px 40px rgba(0,0,0,.22);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
#ushera-root.ushera-pos-right .ushera-panel { right: 0; }
#ushera-root.ushera-pos-left .ushera-panel { left: 0; }
.ushera-panel[hidden] { display: none; }

.ushera-header {
	background: var(--ushera-color);
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 600;
}
.ushera-close {
	background: transparent !important;
	border: none !important;
	color: #fff !important;
	font-size: 20px !important;
	cursor: pointer;
	line-height: 1;
	padding: 4px;
}

.ushera-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #f7f8fa;
}

.ushera-msg {
	max-width: 82%;
	padding: 9px 12px;
	border-radius: 12px;
	font-size: 14px;
	line-height: 1.45;
	word-wrap: break-word;
}
.ushera-msg a { color: inherit; text-decoration: underline; }
.ushera-msg--bot { align-self: flex-start; background: #fff; border: 1px solid #e6e8eb; border-bottom-left-radius: 4px; }
.ushera-msg--user { align-self: flex-end; background: var(--ushera-color); color: #fff; border-bottom-right-radius: 4px; }
.ushera-msg--error { align-self: flex-start; background: #fdecea; color: #611a15; border: 1px solid #f5c6cb; }

.ushera-feedback {
	display: flex;
	gap: 6px;
	margin-top: 4px;
	align-self: flex-start;
}
.ushera-feedback button {
	background: none !important;
	border: 1px solid #e6e8eb !important;
	border-radius: 8px !important;
	padding: 2px 8px !important;
	font-size: 13px !important;
	cursor: pointer;
}
.ushera-feedback button.is-selected { background: var(--ushera-color) !important; color: #fff !important; border-color: var(--ushera-color) !important; }

.ushera-consent {
	align-self: stretch;
	background: #fff;
	border: 1px solid #e6e8eb;
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 12.5px;
	color: #444;
}
.ushera-consent p { margin: 0 0 8px; }
.ushera-consent-actions { display: flex; gap: 8px; }
.ushera-consent-actions button {
	flex: 1;
	border-radius: 8px !important;
	border: 1px solid #ddd !important;
	padding: 6px 8px !important;
	font-size: 12.5px !important;
	cursor: pointer;
	background: #f2f2f2 !important;
	color: #333 !important;
}
.ushera-consent-actions button.ushera-consent-accept { background: var(--ushera-color) !important; color: #fff !important; border-color: var(--ushera-color) !important; }

.ushera-suggestions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-self: flex-start;
}
.ushera-suggestions button {
	background: #fff !important;
	border: 1px solid var(--ushera-color) !important;
	color: var(--ushera-color) !important;
	border-radius: 16px !important;
	padding: 6px 12px !important;
	font-size: 12.5px !important;
	cursor: pointer;
}
.ushera-suggestions button:hover { background: var(--ushera-color) !important; color: #fff !important; }

.ushera-typing { display: flex; gap: 4px; padding: 8px 12px; align-self: flex-start; }
.ushera-typing span { width: 6px; height: 6px; border-radius: 50%; background: #b7bcc4; animation: ushera-blink 1.2s infinite ease-in-out; }
.ushera-typing span:nth-child(2) { animation-delay: .2s; }
.ushera-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes ushera-blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

.ushera-form {
	display: flex;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid #e6e8eb;
	background: #fff;
}
.ushera-form input {
	flex: 1;
	border: 1px solid #dcdfe3 !important;
	border-radius: 20px !important;
	padding: 9px 14px !important;
	font-size: 14px !important;
	background: #fff !important;
	color: #222 !important;
}
.ushera-form input:focus { border-color: var(--ushera-color) !important; }
.ushera-form button {
	background: var(--ushera-color) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 20px !important;
	padding: 0 16px !important;
	font-size: 13px !important;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}
.ushera-form button:disabled { opacity: .6; cursor: default; }

@media (max-width: 480px) {
	.ushera-panel { width: calc(100vw - 24px); height: 70vh; }
}
