:root {
	--sga-accent: #2563eb;
}

.sga-widget {
	position: fixed;
	bottom: 24px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.sga-widget.sga-bottom-right {
	right: 24px;
}

.sga-widget.sga-bottom-left {
	left: 24px;
}

.sga-widget.sga-bottom-center {
	left: 50%;
	transform: translateX(-50%);
}

.sga-toggle {
	width: 150px;
	height: 150px;
	border: none;
	padding: 0;
	background: transparent;
	box-shadow: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: sga-bob 3s ease-in-out infinite;
	transition: transform 0.15s ease;
	filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.2));
}

.sga-toggle:hover {
	transform: scale(1.05);
}

.sga-toggle:focus-visible {
	outline: 3px solid var(--sga-accent);
	outline-offset: 4px;
	border-radius: 8px;
}

.sga-avatar-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

@keyframes sga-bob {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
	.sga-toggle {
		animation: none;
	}
}

.sga-panel {
	position: absolute;
	bottom: 158px;
	width: 300px;
	max-width: calc(100vw - 48px);
	max-height: 70vh;
	overflow-y: auto;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
	padding: 16px;
	box-sizing: border-box;
}

.sga-widget.sga-bottom-right .sga-panel {
	right: 0;
}

.sga-widget.sga-bottom-left .sga-panel {
	left: 0;
}

.sga-widget.sga-bottom-center .sga-panel {
	left: 50%;
	right: auto;
	transform: translateX(-50%);
}

.sga-panel[hidden] {
	display: none;
}

.sga-panel-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	font-weight: 600;
	font-size: 14px;
	color: #1f2937;
	margin-bottom: 10px;
}

.sga-close {
	background: none;
	border: none;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: #6b7280;
	padding: 0 2px;
}

.sga-close:hover {
	color: #111827;
}

.sga-search-form {
	position: relative;
	margin-bottom: 10px;
}

.sga-search-icon {
	position: absolute;
	left: 10px;
	top: 50%;
	transform: translateY(-50%);
	color: #9ca3af;
	display: flex;
	pointer-events: none;
}

.sga-search-input {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 10px 10px 34px;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	font-size: 14px;
}

.sga-search-input:focus {
	outline: none;
	border-color: var(--sga-accent);
	box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.sga-curated-links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.sga-curated-links li a {
	display: block;
	padding: 8px 10px;
	border-radius: 8px;
	text-decoration: none;
	color: #1f2937;
	font-size: 14px;
	background: #f3f4f6;
	transition: background 0.15s ease;
}

.sga-curated-links li a:hover {
	background: var(--sga-accent);
	color: #fff;
}

.sga-search-results {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.sga-search-results[hidden],
.sga-curated-links[hidden] {
	display: none;
}

.sga-search-results li a {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 8px 9px;
	border-radius: 8px;
	text-decoration: none;
	background: #f9fafb;
}

.sga-search-results li a:hover {
	background: #eef2ff;
}

.sga-result-title {
	color: #1f2937;
	font-size: 13px;
	font-weight: 600;
}

.sga-result-excerpt {
	color: #6b7280;
	font-size: 12px;
	line-height: 1.35;
}

.sga-view-all {
	text-align: center;
	color: var(--sga-accent) !important;
	font-weight: 600;
	font-size: 13px;
	background: transparent !important;
}

.sga-search-results .sga-no-results,
.sga-search-results .sga-hint {
	padding: 6px 2px;
	font-size: 12px;
	color: #9ca3af;
	list-style: none;
}
