.swp-buddy {
	--swp-buddy-border: #d7dee8;
	--swp-buddy-text: #172033;
	--swp-buddy-muted: #5f6b7a;
	--swp-buddy-panel: #ffffff;
	--swp-buddy-surface: #f6f8fb;
	--swp-buddy-primary: #1f6feb;
	--swp-buddy-accent: #0f8f70;
	color: var(--swp-buddy-text);
	font-size: 16px;
	line-height: 1.5;
}

.swp-buddy * {
	box-sizing: border-box;
}

.swp-buddy a {
	color: var(--swp-buddy-primary);
	text-decoration: none;
}

.swp-buddy a:hover {
	text-decoration: underline;
}

.swp-buddy-toolbar {
	align-items: center;
	display: flex;
	justify-content: space-between;
	margin: 0 0 16px;
}

.swp-buddy-toolbar h2,
.swp-buddy h2,
.swp-buddy h3 {
	letter-spacing: 0;
	margin: 0;
}

.swp-buddy-grid {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.swp-buddy-card,
.swp-buddy-composer,
.swp-buddy-form,
.swp-buddy-login,
.swp-buddy-register,
.swp-buddy-notice {
	background: var(--swp-buddy-panel);
	border: 1px solid var(--swp-buddy-border);
	border-radius: 8px;
	padding: 16px;
}

.swp-buddy-member-card,
.swp-buddy-profile-card__header {
	align-items: center;
	display: flex;
	gap: 14px;
}

.swp-buddy-avatar {
	border-radius: 999px;
	flex: 0 0 auto;
}

.swp-buddy-muted,
.swp-buddy-member-card p,
.swp-buddy-activity-item header span,
.swp-buddy-group-card footer,
.swp-buddy-form__status {
	color: var(--swp-buddy-muted);
}

.swp-buddy-feed {
	display: grid;
	gap: 12px;
}

.swp-buddy-composer,
.swp-buddy-form {
	display: grid;
	gap: 12px;
	margin-bottom: 16px;
}

.swp-buddy label {
	display: grid;
	gap: 6px;
}

.swp-buddy input,
.swp-buddy select,
.swp-buddy textarea {
	border: 1px solid var(--swp-buddy-border);
	border-radius: 6px;
	color: var(--swp-buddy-text);
	font: inherit;
	max-width: 100%;
	padding: 10px 12px;
	width: 100%;
}

.swp-buddy textarea {
	resize: vertical;
}

.swp-buddy-composer__actions {
	align-items: center;
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}

.swp-buddy-composer__actions select {
	max-width: 180px;
}

.swp-buddy-button {
	background: var(--swp-buddy-primary);
	border: 0;
	border-radius: 6px;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-weight: 600;
	justify-content: center;
	line-height: 1.2;
	padding: 10px 14px;
	text-decoration: none;
}

.swp-buddy-button--small {
	font-size: 13px;
	padding: 7px 10px;
}

.swp-buddy-button--secondary {
	background: var(--swp-buddy-surface);
	border: 1px solid var(--swp-buddy-border);
	color: var(--swp-buddy-text);
}

.swp-buddy-button--secondary:hover {
	background: #e9eef6;
	color: var(--swp-buddy-text);
}

.swp-buddy-button:hover {
	background: #185abc;
	color: #fff;
	text-decoration: none;
}

.swp-buddy-link-button {
	background: transparent;
	border: 0;
	color: var(--swp-buddy-primary);
	cursor: pointer;
	font: inherit;
	padding: 0;
}

.swp-buddy-activity-item {
	display: grid;
	gap: 10px;
}

.swp-buddy-card-actions,
.swp-buddy-inline-form {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.swp-buddy-inline-form input {
	flex: 1 1 180px;
	min-width: 0;
}

.swp-buddy-activity-item header,
.swp-buddy-activity-item footer,
.swp-buddy-group-card footer {
	align-items: center;
	display: flex;
	gap: 12px;
	justify-content: space-between;
}

.swp-buddy-content {
	overflow-wrap: anywhere;
}

.swp-buddy-form__status.is-error {
	color: #b42318;
}

@media (max-width: 640px) {
	.swp-buddy-member-card,
	.swp-buddy-profile-card__header,
	.swp-buddy-composer__actions,
	.swp-buddy-card-actions,
	.swp-buddy-inline-form,
	.swp-buddy-activity-item footer,
	.swp-buddy-group-card footer {
		align-items: stretch;
		flex-direction: column;
	}

	.swp-buddy-composer__actions select {
		max-width: none;
	}
}

/* ------------------------------------------------------------------
 * 1.0: mentions, live badges, discovery suggestions, feed toggle.
 * ------------------------------------------------------------------ */

.swp-buddy-mention {
	color: #2563eb;
	font-weight: 600;
	text-decoration: none;
}

.swp-buddy-mention:hover {
	text-decoration: underline;
}

.swp-buddy-composer {
	position: relative;
}

.swp-buddy-mention-menu {
	background: #fff;
	border: 1px solid #d7dee8;
	border-radius: 10px;
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
	display: flex;
	flex-direction: column;
	left: 12px;
	max-width: 320px;
	overflow: hidden;
	position: absolute;
	top: calc(100% - 8px);
	z-index: 40;
}

.swp-buddy-mention-menu__item {
	background: transparent;
	border: 0;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 8px 12px;
	text-align: left;
	width: 100%;
}

.swp-buddy-mention-menu__item:hover,
.swp-buddy-mention-menu__item:focus {
	background: #f1f5f9;
}

.swp-buddy-mention-menu__item span {
	color: #64748b;
	font-size: 12px;
}

.swp-buddy-badge-count {
	background: #dc2626;
	border-radius: 999px;
	color: #fff;
	display: inline-flex;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	min-width: 18px;
	justify-content: center;
	padding: 3px 6px;
}

.swp-buddy-badge-count.is-empty {
	display: none;
}

.swp-buddy-feed-toggle {
	display: inline-flex;
	gap: 4px;
	background: #eef2f7;
	border-radius: 999px;
	padding: 4px;
	margin-bottom: 16px;
}

.swp-buddy-feed-toggle a {
	border-radius: 999px;
	color: #475569;
	font-size: 13px;
	font-weight: 600;
	padding: 6px 14px;
	text-decoration: none;
}

.swp-buddy-feed-toggle a.is-active {
	background: #fff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
	color: #0f172a;
}

.swp-buddy-suggestions__section + .swp-buddy-suggestions__section {
	margin-top: 24px;
}

.swp-buddy-suggestion {
	align-items: center;
	display: flex;
	gap: 12px;
	justify-content: space-between;
}

.swp-buddy-suggestion__reason {
	color: #64748b;
	font-size: 12px;
}

.swp-buddy-pill {
	background: #fef3c7;
	border-radius: 999px;
	color: #92400e;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
}

.swp-buddy-suite-item {
	border-left: 3px solid #6366f1;
}

@media (prefers-color-scheme: dark) {
	.swp-buddy-mention-menu {
		background: #0f172a;
		border-color: #1e293b;
	}

	.swp-buddy-mention-menu__item:hover,
	.swp-buddy-mention-menu__item:focus {
		background: #1e293b;
	}

	.swp-buddy-feed-toggle {
		background: #1e293b;
	}

	.swp-buddy-feed-toggle a.is-active {
		background: #0f172a;
	}
}
