/* NUA — campo de upload (assets/js/upload.js) */
.nua-up {
	--up-bg: rgba(255, 255, 255, .025);
	--up-line: rgba(236, 196, 170, .22);
	--up-txt: #f3e6ea;
	--up-muted: #a8929b;
	--up-acc: #ff2d8f;
	--up-acc2: #e4b597;
	--up-tile: #1a0b13;
	margin-top: 10px; font-weight: 400; text-transform: none; letter-spacing: 0;
}
.wp-admin .nua-up { --up-bg: #fafafa; --up-line: #d9d9de; --up-txt: #1d2327; --up-muted: #6b7280; --up-acc: #c40f63; --up-acc2: #9a5b3a; --up-tile: #f1f1f3; max-width: 640px; }
.nua-up-input { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none; overflow: hidden; }

.nua-up-zone {
	position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
	min-height: 150px; padding: 26px 20px; border-radius: 18px; text-align: center; cursor: pointer;
	background:
		radial-gradient(120% 140% at 50% 0%, rgba(255, 45, 143, .09), transparent 60%),
		var(--up-bg);
	border: 1.5px dashed var(--up-line);
	transition: border-color .2s, background .2s, transform .2s;
	outline: none;
}
.nua-up.is-single .nua-up-zone { min-height: 120px; }
.nua-up-zone:hover, .nua-up-zone:focus-visible { border-color: var(--up-acc); }
.nua-up.is-over .nua-up-zone { border-color: var(--up-acc); border-style: solid; background: radial-gradient(120% 140% at 50% 0%, rgba(255, 45, 143, .22), transparent 65%), var(--up-bg); transform: scale(1.01); }
.nua-up-ic {
	width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff;
	background: linear-gradient(135deg, #ff3d97 0%, #c40f63 60%, #7d0a3c 100%);
	box-shadow: 0 10px 30px rgba(255, 45, 143, .35);
	transition: transform .25s;
}
.nua-up-ic svg { width: 26px; height: 26px; }
.nua-up-zone:hover .nua-up-ic, .nua-up.is-over .nua-up-ic { transform: translateY(-3px); }
.nua-up-t { color: var(--up-txt); font-size: 15px; }
.nua-up-t b { font-weight: 600; }
.nua-up-t u { color: var(--up-acc); text-decoration: none; border-bottom: 1px solid currentColor; }
.nua-up-s { color: var(--up-muted); font-size: 12.5px; }
.nua-up-atual { position: absolute; right: 14px; top: 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.nua-up-atual img { width: 54px; height: 54px; object-fit: cover; border-radius: 12px; border: 1px solid var(--up-line); }
.nua-up-atual small { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--up-muted); }
.nua-up.is-single.has-files .nua-up-atual { display: none; }

.nua-up-bar { display: flex; justify-content: space-between; align-items: center; margin: 14px 2px 0; font-size: 13px; color: var(--up-muted); }
.nua-up-clear { background: none; border: 0; color: var(--up-muted); font: inherit; cursor: pointer; text-decoration: underline; padding: 0; }
.nua-up-clear:hover { color: var(--up-acc); }

.nua-up-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; margin-top: 12px; }
.nua-up-tiles:empty { display: none; }
.nua-up.is-single .nua-up-tiles { grid-template-columns: minmax(0, 220px); }
.nua-up-tile {
	position: relative; border-radius: 14px; overflow: hidden; background: var(--up-tile);
	border: 1px solid var(--up-line); animation: nuaUpIn .28s ease both;
	transition: transform .15s, box-shadow .15s, opacity .15s;
}
.nua-up.is-multi .nua-up-tile { cursor: grab; }
.nua-up-tile.is-drag { opacity: .35; }
.nua-up-tile.is-alvo { box-shadow: 0 0 0 2px var(--up-acc); transform: scale(.97); }
@keyframes nuaUpIn { from { opacity: 0; transform: translateY(6px) scale(.96); } }
.nua-up-media { position: relative; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.nua-up-media img, .nua-up-media video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.nua-up-play { position: absolute; inset: auto auto 8px 8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; backdrop-filter: blur(6px); }
.nua-up-play svg { width: 14px; height: 14px; }
.nua-up-gen { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: var(--up-acc2); background: rgba(228, 181, 151, .12); }
.nua-up-gen svg { width: 28px; height: 28px; }
.nua-up-n { position: absolute; top: 8px; left: 8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; font: 600 11px/1 var(--ff, sans-serif); backdrop-filter: blur(6px); }
.nua-up-rm {
	position: absolute; top: 7px; right: 7px; width: 28px; height: 28px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
	display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px);
	transition: background .15s, transform .15s;
}
.nua-up-rm svg { width: 14px; height: 14px; }
.nua-up-rm:hover { background: #e0245e; transform: scale(1.08); }
.nua-up-info { padding: 8px 10px 9px; display: grid; gap: 2px; }
.nua-up-info b { font-size: 12px; font-weight: 500; color: var(--up-txt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nua-up-info small { font-size: 11px; color: var(--up-muted); }
.nua-up-info i { font-style: normal; }
.nua-up-add {
	aspect-ratio: auto; min-height: 132px; border-radius: 14px; border: 1.5px dashed var(--up-line); cursor: pointer;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--up-muted);
	transition: border-color .2s, color .2s;
}
.nua-up-add span { font-size: 30px; line-height: 1; font-weight: 300; }
.nua-up-add:hover { border-color: var(--up-acc); color: var(--up-acc); }
.nua-up-msg { margin: 10px 2px 0; font-size: 13px; color: #ff6b9a; }
.nua-up.is-erro .nua-up-zone { border-color: #ff6b9a; }

/* Versão compacta (anexo no chat) */
.nua-up.is-mini { margin: 0 0 8px; }
.nua-up.is-mini .nua-up-tiles { grid-template-columns: repeat(auto-fill, 72px); gap: 8px; margin: 0; }
.nua-up.is-mini .nua-up-info { display: none; }
.nua-up.is-mini .nua-up-rm { width: 22px; height: 22px; top: 4px; right: 4px; }
.nua-up.is-mini .nua-up-gen { width: 36px; height: 36px; }
.nua-up.is-mini.is-over { outline: 2px dashed var(--up-acc); outline-offset: 4px; border-radius: 12px; min-height: 40px; }

/* Mídias já salvas na publicação */
.nua-up-salvas { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; margin: 6px 0 4px; }
.nua-up-salva { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line, rgba(236, 196, 170, .22)); background: #1a0b13; cursor: pointer; }
.nua-up-salva .nua-up-media { aspect-ratio: 1; }
.nua-up-salva input { position: absolute; opacity: 0; }
.nua-up-salva .nua-up-rm { pointer-events: none; }
.nua-up-salva:has(input:checked) .nua-up-media { opacity: .25; filter: grayscale(1); }
.nua-up-salva:has(input:checked) .nua-up-rm { background: #e0245e; }
.nua-up-salva:has(input:checked)::after { content: 'será removida'; position: absolute; inset: 40% 0 auto; text-align: center; font-size: 12px; font-weight: 600; color: #ff6b9a; }

@media (max-width: 600px) {
	.nua-up-tiles, .nua-up-salvas { grid-template-columns: repeat(3, 1fr); gap: 8px; }
	.nua-up-info { padding: 6px 7px; }
	.nua-up-atual { position: static; }
}

.nua-up-bar[hidden], .nua-up-msg[hidden] { display: none !important; }
