/* ── Mobile server settings — full-screen overlay ────────────────────
   Stands in for ServerSettingsModal's desktop Modal at ≤768px. Same
   Fluxer-mobile layout: top bar with back/close + title, server icon
   + name hero, Settings section heading, and a rounded card stack
   with one row per tab. Tapping a row pushes that tab's panel
   full-screen with a back arrow header. */

.overlay {
	position: fixed;
	inset: 0;
	z-index: var(--z-index-modal, 10000);
	display: flex;
	flex-direction: column;
	background-color: var(--background-primary);
	overflow: hidden;
}

/* ── Top bar (close / back + title) ─────────────────────────────────*/

.topBar {
	flex-shrink: 0;
	display: grid;
	grid-template-columns: 48px 1fr 48px;
	align-items: center;
	height: 56px;
	padding: 0 8px;
	border-bottom: 1px solid var(--background-header-secondary);
}

.topBarButton {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background: transparent;
	color: var(--text-primary);
	cursor: pointer;
	transition: background-color 0.15s;
	-webkit-tap-highlight-color: transparent;
	margin: 0 auto;
}

.topBarButton:active {
	background-color: var(--background-modifier-hover);
}

.topBarTitleBlock {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 0;
}

.topBarTitle {
	font-size: 17px;
	font-weight: 700;
	color: var(--text-primary);
	text-align: center;
	margin: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
}

.topBarSubtitle {
	font-size: 12px;
	font-weight: 500;
	color: var(--text-primary-muted);
	line-height: 1.2;
	margin-top: 2px;
}

/* ── Body (scrolling content area) ──────────────────────────────────*/

.body {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 16px 16px 32px;
}

/* Category-list body variant gets extra top space for the server
   hero block. The tab-panel variant sits flush so custom panels
   control their own spacing. */
.bodyList {
	padding-top: 24px;
}

.bodyPanel {
	padding: 16px;
}

/* ── Server hero (icon + name) ──────────────────────────────────────*/

.hero {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin-bottom: 28px;
}

.heroIcon {
	width: 72px;
	height: 72px;
	border-radius: 18px;
	object-fit: cover;
	background-color: var(--background-modifier-hover);
}

.heroInitials {
	width: 72px;
	height: 72px;
	border-radius: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--background-modifier-hover);
	color: var(--text-primary);
	font-size: 26px;
	font-weight: 700;
}

.heroName {
	font-size: 16px;
	font-weight: 600;
	color: var(--text-primary);
	margin: 0;
	text-align: center;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ── Section label ("Settings") ─────────────────────────────────────*/

.sectionLabel {
	font-size: 13px;
	font-weight: 500;
	color: var(--text-primary-muted);
	padding: 0 4px 8px;
}

/* ── Rounded card holding the list of tabs ──────────────────────────*/

.tabList {
	background-color: var(--background-secondary);
	border-radius: 0.75rem;
	overflow: hidden;
}

.tabItem {
	position: relative;
	display: grid;
	grid-template-columns: 32px 1fr auto;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 16px;
	background: transparent;
	border: none;
	color: var(--text-primary);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
	transition: background-color 0.1s;
	-webkit-tap-highlight-color: transparent;
}

.tabItem:active {
	background-color: var(--background-modifier-hover);
}

.tabItemIcon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background-color: var(--background-secondary-alt);
	color: var(--text-primary);
}

.tabItemCaret {
	color: var(--text-primary-muted);
}

/* Divider between adjacent rows within the rounded card. */
.tabItem:not(:last-child)::after {
	content: '';
	position: absolute;
	left: calc(16px + 32px + 12px);
	right: 16px;
	bottom: 0;
	height: 1px;
	background-color: var(--background-header-secondary);
	pointer-events: none;
}

/* ── Tab panel — stub fallback ──────────────────────────────────────*/

.stubTitle {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 700;
	color: var(--text-primary);
}

.stubBody {
	margin: 0;
	font-size: 14px;
	color: var(--text-secondary);
}
