/* ── Save Media modal body ────────────────────────────────────────
   Shell chrome (backdrop, centring, header bar) comes from the
   shared `Modal` primitive; this module only 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;
}

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

.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, #4641d9);
}

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

.input:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.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, #4641d9);
}

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

/* ── Tags ────────────────────────────────────────────────────── */

.tagChips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.tagChip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px;
	background-color: var(--background-secondary, rgba(255, 255, 255, 0.04));
	border: 1px solid var(--background-modifier-accent);
	border-radius: 999px;
	font-size: 0.8125rem;
	color: var(--text-primary);
}

.tagChipText {
	max-width: 140px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tagChipRemove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 50%;
	color: var(--text-primary-muted, #a0a3a8);
	cursor: pointer;
	transition: background-color 0.1s, color 0.1s;
}

.tagChipRemove:hover {
	background-color: var(--background-modifier-hover);
	color: var(--text-primary);
}

/* Input + Add button row */
.tagRow {
	display: flex;
	align-items: center;
	gap: 8px;
}

.tagRow .input {
	flex: 1;
}

.addButton {
	height: 40px;
	padding: 0 16px;
	background-color: var(--brand-primary, #4641d9);
	border: none;
	border-radius: 6px;
	color: #fff;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 700;
	cursor: pointer;
	transition: filter 0.12s;
	flex-shrink: 0;
}

.addButton:hover:not(:disabled) {
	filter: brightness(1.08);
}

.addButton:active:not(:disabled) {
	filter: brightness(0.92);
}

.addButton:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ── Footer actions ──────────────────────────────────────────── */

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

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

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

.secondaryButton:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

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

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

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

.primaryButton:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

/* Inline save error row */
.error {
	padding: 10px 14px;
	background-color: hsl(0, calc(60% * var(--saturation-factor, 1)), 22%);
	color: hsl(0, calc(80% * var(--saturation-factor, 1)), 85%);
	border-radius: 6px;
	font-size: 0.8125rem;
}
