/* File picker for briefs and listing submissions.
   -------------------------------------------------------------------------
   This control appears in three places that do not look alike: the dark
   listing form, the dark AI finder, and the brief modal, which is white. So
   every colour here reads a host token first and falls back to a light value:
   dropped inside .mfld or .mffc it picks up the dark identity, dropped in the
   brief modal it stays light, and neither host needs to know about it. */
.mfup {
	--up-line: var(--line, #D8DFEA);
	--up-line-2: var(--line-2, #BFCADB);
	--up-text: var(--text, #2B3752);
	--up-text-2: var(--text-2, #607086);
	--up-field: var(--glass, #F7F9FC);
	--up-field-2: var(--glass-2, #EDF1F7);
	--up-accent: var(--sky, #4F46FF);
	--up-bad: var(--bad, #DC2626);
	display: block;
	margin-top: 14px;
	color: var(--up-text);
}
.mfup *, .mfup *::before, .mfup *::after { box-sizing: border-box; }

.mfup-label {
	display: block;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: .2px;
	margin-bottom: 6px;
	color: var(--up-text);
}
.mfup-label em {
	font-style: normal;
	font-weight: 500;
	color: var(--up-text-2);
}

/* The drop zone doubles as the button: the whole box is the label for the
   file input, so a click anywhere in it opens the picker and a drag onto it
   works as well, without two separate controls to explain. */
.mfup-drop {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 14px 16px;
	border: 1.5px dashed var(--up-line-2);
	border-radius: 12px;
	background: var(--up-field);
	cursor: pointer;
	transition: border-color .15s, background .15s;
}
.mfup-drop:hover,
.mfup.is-over .mfup-drop { border-color: var(--up-accent); background: var(--up-field-2); }
.mfup-drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.mfup-drop svg { flex: 0 0 auto; color: var(--up-accent); }
.mfup-drop-text { font-size: 13.5px; line-height: 1.45; }
.mfup-drop-text b { display: block; font-weight: 700; }
.mfup-drop-text span { color: var(--up-text-2); font-size: 12.5px; }

.mfup.is-full .mfup-drop { opacity: .45; cursor: not-allowed; border-style: solid; }

.mfup-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.mfup-list:empty { margin-top: 0; }

.mfup-file {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px 8px 12px;
	border: 1px solid var(--up-line);
	border-radius: 9px;
	background: var(--up-field-2);
	font-size: 13px;
}
.mfup-file.is-busy { opacity: .6; }
.mfup-name {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 600;
}
.mfup-size { flex: 0 0 auto; color: var(--up-text-2); font-size: 12px; }
.mfup-x {
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--up-text-2);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}
.mfup-x:hover { background: var(--up-line); color: var(--up-text); }

.mfup-note { margin: 8px 0 0; font-size: 12.5px; color: var(--up-text-2); }
.mfup-note.is-bad { color: var(--up-bad); font-weight: 600; }

.mfup :focus-visible { outline: 2px solid var(--up-accent); outline-offset: 2px; border-radius: 8px; }

@media (max-width: 600px) {
	.mfup-drop { padding: 12px 13px; }
	.mfup-drop-text { font-size: 13px; }
}
