.container {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 680px;
}

.header {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.heading {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--text-primary, #fff);
}

.count {
	font-size: 11px;
	color: var(--text-primary-muted, #a0a3a8);
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.description {
	margin: 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--text-secondary, #a0a3a8);
}

/* ── Upload row ──────────────────────────────────────────────────── */

.uploadRow {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	background-color: var(--background-secondary, rgba(255, 255, 255, 0.03));
	border: 1px solid var(--background-modifier-accent, rgba(255, 255, 255, 0.06));
	border-radius: 8px;
}

.uploadPreview {
	flex: 0 0 auto;
	width: 64px;
	height: 64px;
	border-radius: 8px;
	background-color: var(--background-tertiary, rgba(0, 0, 0, 0.3));
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.uploadPreviewImage {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.uploadPreviewEmpty {
	color: var(--text-primary-muted, #a0a3a8);
}

.uploadFields {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.shortcodeInput {
	width: 100%;
	padding: 8px 12px;
	background-color: var(--background-tertiary, rgba(0, 0, 0, 0.3));
	border: 1px solid transparent;
	border-radius: 6px;
	color: var(--text-primary, #fff);
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 13px;
	outline: none;
	box-sizing: border-box;
	transition: border-color 0.1s;
}

.shortcodeInput:focus {
	border-color: var(--brand-primary, #5865f2);
}

.uploadActions {
	display: flex;
	gap: 8px;
}

/* ── Status banners ──────────────────────────────────────────────── */

.statusSuccess {
	padding: 8px 12px;
	background-color: rgba(46, 204, 113, 0.15);
	border: 1px solid rgba(46, 204, 113, 0.4);
	border-radius: 6px;
	font-size: 13px;
	color: var(--text-primary, #fff);
}

.statusError {
	padding: 8px 12px;
	background-color: rgba(234, 80, 80, 0.15);
	border: 1px solid rgba(234, 80, 80, 0.4);
	border-radius: 6px;
	font-size: 13px;
	color: var(--text-primary, #fff);
}

/* ── Existing pack grid ──────────────────────────────────────────── */

.empty {
	padding: 32px 20px;
	text-align: center;
	font-size: 13px;
	color: var(--text-primary-muted, #a0a3a8);
	background-color: var(--background-secondary, rgba(255, 255, 255, 0.03));
	border: 1px dashed var(--background-modifier-accent, rgba(255, 255, 255, 0.08));
	border-radius: 8px;
}

.grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
	gap: 10px;
}

.gridItem {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 10px 8px;
	background-color: var(--background-secondary, rgba(255, 255, 255, 0.03));
	border: 1px solid var(--background-modifier-accent, rgba(255, 255, 255, 0.06));
	border-radius: 8px;
	transition: border-color 0.1s, background-color 0.1s;
}

.gridItem:hover {
	background-color: var(--background-modifier-hover, rgba(255, 255, 255, 0.06));
	border-color: var(--background-modifier-accent, rgba(255, 255, 255, 0.12));
}

.gridPreview {
	width: 56px;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gridImage {
	max-width: 56px;
	max-height: 56px;
	object-fit: contain;
}

.gridLabel {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 11px;
	color: var(--text-primary-muted, #a0a3a8);
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	text-align: center;
}

.gridRemove {
	position: absolute;
	top: 4px;
	right: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border: none;
	border-radius: 4px;
	background-color: rgba(0, 0, 0, 0.5);
	color: #fff;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.1s, background-color 0.1s;
}

.gridItem:hover .gridRemove {
	opacity: 1;
}

.gridRemove:hover {
	background-color: var(--status-danger, #da373c);
}

/* ── Permission gate fallback ────────────────────────────────────── */

.gate {
	padding: 60px 20px;
	text-align: center;
}

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

.gateBody {
	margin: 0 auto;
	max-width: 360px;
	font-size: 14px;
	color: var(--text-secondary, #a0a3a8);
}
