/* ── Edit Attachment modal body ──────────────────────────────
   Chrome (backdrop, centring, header X) comes from Modal.Root.
   This module styles the form controls inside Modal.Content. */

.body {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 0;
}

.field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

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

.label {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--text-primary-muted, #a0a3a8);
}

.counter {
	font-size: 0.6875rem;
	font-weight: 500;
	color: var(--text-tertiary, #a0a3a8);
	font-variant-numeric: tabular-nums;
}

.input {
	height: 40px;
	padding: 0 12px;
	background-color: var(--form-surface-background, #1e2024);
	border: 1px solid var(--background-modifier-accent);
	border-radius: 6px;
	color: var(--text-primary);
	font: inherit;
	font-size: 0.9375rem;
	outline: none;
	transition: border-color 0.12s;
}

.input:focus,
.input:focus-visible {
	outline: none;
	border-color: var(--brand-primary);
}

.textarea {
	min-height: 80px;
	padding: 10px 12px;
	background-color: var(--form-surface-background, #1e2024);
	border: 1px solid var(--background-modifier-accent);
	border-radius: 6px;
	color: var(--text-primary);
	font: inherit;
	font-size: 0.9375rem;
	resize: vertical;
	outline: none;
	transition: border-color 0.12s;
}

.textarea:focus,
.textarea:focus-visible {
	outline: none;
	border-color: var(--brand-primary);
}

.textarea::placeholder {
	color: var(--text-tertiary);
}

/* ── Spoiler toggle row ───────────────────────────────────────
   Fluxer-style iOS switch. Left label + right track-and-thumb. */
.spoilerRow {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 0;
}

.spoilerLabel {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--text-primary);
	cursor: pointer;
}

.toggle {
	position: relative;
	width: 36px;
	height: 20px;
	padding: 0;
	background-color: var(--background-modifier-accent);
	border: none;
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 0.18s ease;
	flex-shrink: 0;
}

.toggleOn {
	background-color: var(--brand-primary);
}

.toggleThumb {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background-color: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
	transition: transform 0.18s ease;
}

.toggleOn .toggleThumb {
	transform: translateX(16px);
}

/* ── Footer actions ───────────────────────────────────────── */
.actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 4px;
}

.secondaryButton {
	height: 40px;
	padding: 0 18px;
	background: var(--background-secondary-alt);
	border: none;
	border-radius: 6px;
	color: var(--text-primary);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.12s;
}

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

.primaryButton {
	height: 40px;
	padding: 0 20px;
	background-color: var(--brand-primary);
	border: none;
	border-radius: 6px;
	color: var(--text-on-brand-primary, #fff);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 700;
	cursor: pointer;
	transition: filter 0.12s;
}

.primaryButton:hover {
	filter: brightness(1.08);
}

.primaryButton:active {
	filter: brightness(0.92);
}
