/* WP Nextcloud Basic 2.0 - Upload-Fenster (erscheint erst nach "JETZT ABSENDEN") - Nahiro.net */

/* Drag & Drop: nur während eine Datei über den Kasten gezogen wird */
#form_kontakt1 .fileUploadDiv.wpncb-dragover {
	outline: 2px dashed #9f6b28;
	outline-offset: 4px;
}

html.wpncb-up-open,
html.wpncb-up-open body { overflow: hidden; }

.wpncb-up {
	--b: #9f6b28;
	--b2: #ba7e2e;
	--soft: #fbf4e9;
	--ink: #1f1b16;
	--muted: #6f675d;
	--line: #ebe5dc;
	--ok: #2e7d4f;
	--err: #b42318;
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(24, 20, 16, .55);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity .25s ease;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--ink);
	line-height: 1.45;
	box-sizing: border-box;
}
.wpncb-up *, .wpncb-up *::before, .wpncb-up *::after { box-sizing: border-box; }
.wpncb-up.is-visible { opacity: 1; }

.wpncb-up__box {
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 40px);
	overflow: auto;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
	transform: translateY(12px) scale(.98);
	transition: transform .25s ease;
}
.wpncb-up.is-visible .wpncb-up__box { transform: none; }

.wpncb-up__head { padding: 26px 28px 6px; }
.wpncb-up__head h3 { margin: 0 0 8px; font-size: 21px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.wpncb-up__lead { margin: 0; font-size: 14px; color: var(--muted); }

.wpncb-up__total { margin: 18px 28px 6px; padding: 16px 18px; background: var(--soft); border-radius: 14px; }
.wpncb-up__total-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.wpncb-up__tpct { font-size: 26px; font-weight: 800; color: var(--b); letter-spacing: -.5px; }
.wpncb-up__tinfo { font-size: 13px; color: var(--muted); text-align: right; }

.wpncb-up__bar { height: 8px; background: #efe8de; border-radius: 99px; overflow: hidden; }
.wpncb-up__bar span {
	display: block;
	height: 100%;
	width: 0;
	border-radius: 99px;
	background: linear-gradient(90deg, var(--b), var(--b2));
	transition: width .3s ease;
	position: relative;
	overflow: hidden;
}
.wpncb-up__bar span::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
	transform: translateX(-100%);
	animation: wpncb-shine 1.6s infinite;
}
.wpncb-up__bar--total { height: 10px; background: #fff; }
@keyframes wpncb-shine { to { transform: translateX(100%); } }

.wpncb-up__status { font-size: 13px; margin-top: 10px; min-height: 0; color: var(--muted); }
.wpncb-up__status:empty { display: none; }
.wpncb-up__status.is-warn { color: #8a5300; background: #fff4dc; border-radius: 8px; padding: 8px 10px; }

.wpncb-up__files { padding: 12px 28px 4px; display: flex; flex-direction: column; gap: 10px; }
.wpncb-up__file { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; transition: border-color .2s, background .2s; }
.wpncb-up__file[data-state="active"] { border-color: #dcc7a8; box-shadow: 0 2px 12px rgba(159, 107, 40, .08); }
.wpncb-up__file[data-state="done"] { background: #f6fbf8; border-color: #cfe7d8; }
.wpncb-up__file[data-state="done"] .wpncb-up__bar span { background: var(--ok); }
.wpncb-up__file[data-state="done"] .wpncb-up__bar span::after,
.wpncb-up__file:not([data-state]) .wpncb-up__bar span::after { display: none; }
.wpncb-up__file-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.wpncb-up__ficon { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; background: var(--soft); color: var(--b); display: flex; align-items: center; justify-content: center; }
.wpncb-up__ficon svg { width: 18px; height: 18px; }
.wpncb-up__file[data-state="done"] .wpncb-up__ficon { background: #e3f2e9; color: var(--ok); }
.wpncb-up__fname { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wpncb-up__chip { flex: 0 0 auto; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: #f2eee8; color: var(--muted); }
.wpncb-up__file[data-state="active"] .wpncb-up__chip { background: var(--soft); color: var(--b); }
.wpncb-up__file[data-state="checking"] .wpncb-up__chip { background: #eef3fb; color: #2d5b9a; }
.wpncb-up__file[data-state="done"] .wpncb-up__chip { background: #e3f2e9; color: var(--ok); }
.wpncb-up__fmeta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }

.wpncb-up__foot { padding: 14px 28px 22px; text-align: center; }
.wpncb-up__cancel { background: none; border: 0; color: var(--muted); font-size: 13px; text-decoration: underline; cursor: pointer; padding: 6px 10px; box-shadow: none; }
.wpncb-up__cancel:hover, .wpncb-up__cancel:focus { color: var(--err); background: none; }

.wpncb-up__result { padding: 40px 32px 32px; text-align: center; }
.wpncb-up__ricon { width: 72px; height: 72px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.wpncb-up__ricon svg { width: 36px; height: 36px; }
.wpncb-up__result.is-ok .wpncb-up__ricon { background: #e3f2e9; color: var(--ok); animation: wpncb-pop .4s ease; }
.wpncb-up__result.is-err .wpncb-up__ricon { background: #fdeceb; color: var(--err); }
@keyframes wpncb-pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
.wpncb-up__result h3 { margin: 0 0 10px; font-size: 21px; font-weight: 700; color: var(--ink); }
.wpncb-up__result p { margin: 0 0 24px; color: var(--muted); font-size: 15px; }
.wpncb-up__result a { color: var(--b); font-weight: 600; }
.wpncb-up__close {
	background: #555 !important;
	border: 0 !important;
	color: #fff !important;
	padding: 12px 34px !important;
	border-radius: 4px;
	font-size: 15px;
	letter-spacing: .5px;
	text-transform: uppercase;
	cursor: pointer;
}
.wpncb-up__close:hover { background: #000 !important; }

@media (max-width: 520px) {
	.wpncb-up { padding: 10px; align-items: flex-end; }
	.wpncb-up__box { border-radius: 16px; max-height: calc(100vh - 20px); }
	.wpncb-up__head, .wpncb-up__files, .wpncb-up__foot { padding-left: 18px; padding-right: 18px; }
	.wpncb-up__total { margin-left: 18px; margin-right: 18px; }
	.wpncb-up__tinfo { text-align: left; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.wpncb-up, .wpncb-up__box, .wpncb-up__bar span { transition: none; }
	.wpncb-up__bar span::after, .wpncb-up__ricon { animation: none !important; }
}
