/* =====================================================================
   ASP Uploader - drop zone styling
   Companion to uploader-dropzone.js. Variables fall back to literals so
   the file also works on pages that do not load uploader-skin.css.
   ===================================================================== */

.upl-dropzone {
	position: relative;
	display: block;
	border: 2px dashed var(--upl-border, #cfd6e4);
	border-radius: var(--upl-radius, 10px);
	background: var(--upl-bg-soft, #f8fafd);
	padding: 1.9rem 1.5rem;
	text-align: center;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
	-webkit-user-select: none;
	user-select: none;
}

.upl-dropzone:hover {
	border-color: var(--upl-primary, #0d6efd);
	background: #fff;
}

.upl-dropzone:focus-visible {
	outline: 3px solid rgba(13, 110, 253, .35);
	outline-offset: 2px;
}

/* dragging over the zone */
.upl-dropzone.is-over {
	transform: translateY(-1px);
	border-color: var(--upl-primary, #0d6efd);
	border-style: solid;
	background: #eff6ff;
	box-shadow: 0 10px 26px -18px rgba(13, 110, 253, .9);
}

/* walking a dropped folder */
.upl-dropzone.is-busy { opacity: .7; cursor: progress; }

.upl-dropzone__icon {
	display: block;
	width: 2.4rem;
	height: 2.4rem;
	margin: 0 auto .6rem;
	border-radius: 50%;
	background: var(--upl-primary, #0d6efd);
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M7.646 4.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 5.707V13.5a.5.5 0 0 1-1 0V5.707L5.354 7.854a.5.5 0 1 1-.708-.708l3-3z'/><path d='M2 2.5A.5.5 0 0 1 2.5 2h11a.5.5 0 0 1 0 1h-11A.5.5 0 0 1 2 2.5z'/></svg>") center / 1.5rem no-repeat;
	        mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M7.646 4.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 5.707V13.5a.5.5 0 0 1-1 0V5.707L5.354 7.854a.5.5 0 1 1-.708-.708l3-3z'/><path d='M2 2.5A.5.5 0 0 1 2.5 2h11a.5.5 0 0 1 0 1h-11A.5.5 0 0 1 2 2.5z'/></svg>") center / 1.5rem no-repeat;
}

.upl-dropzone__title {
	margin: 0;
	color: var(--upl-text, #1e2022);
	font-size: 15px;
	font-weight: 600;
}

.upl-dropzone__hint {
	margin: .3rem 0 0;
	color: var(--upl-muted, #677788);
	font-size: 13px;
	line-height: 1.5;
}

.upl-dropzone__status {
	margin: .55rem 0 0;
	min-height: 1.2em;
	color: var(--upl-primary-dark, #0a58ca);
	font-size: 13px;
	font-weight: 500;
}

/* the control's own button still works; it sits under the zone */
.upl-dropzone + .upl-dropzone-fallback {
	margin-top: .85rem;
	text-align: center;
}

@media (prefers-reduced-motion: reduce) {
	.upl-dropzone, .upl-dropzone.is-over { transition: none; transform: none; }
}

@media (max-width: 480px) {
	.upl-dropzone { padding: 1.35rem 1rem; }
}

/* =====================================================================
   VARIANTS
   Same script, different presentation. Each is opt-in via a modifier
   class; the base .upl-dropzone rules above still apply.
   ===================================================================== */

/* ---- compact: a slim strip for forms and toolbars ------------------- */
.upl-dropzone--compact {
	display: flex;
	align-items: center;
	gap: .75rem;
	padding: .7rem 1rem;
	text-align: left;
	border-width: 1px;
	border-style: dashed;
}

.upl-dropzone--compact .upl-dropzone__icon {
	width: 1.35rem;
	height: 1.35rem;
	margin: 0;
	flex: none;
	-webkit-mask-size: 1.1rem;
	        mask-size: 1.1rem;
}

.upl-dropzone--compact .upl-dropzone__title { font-size: 14px; }
.upl-dropzone--compact .upl-dropzone__hint { margin: 0; font-size: 12.5px; }
.upl-dropzone--compact .upl-dropzone__status { margin: 0 0 0 auto; font-size: 12.5px; text-align: right; }
.upl-dropzone--compact.is-over { background: #eff6ff; }

/* ---- avatar: a round target with one live thumbnail ----------------- */
.upl-dropzone--avatar {
	width: 168px;
	height: 168px;
	margin: 0 auto;
	border-radius: 50%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	overflow: hidden;
}

.upl-dropzone--avatar .upl-dropzone__icon { margin-bottom: .35rem; }
.upl-dropzone--avatar .upl-dropzone__title { font-size: 13.5px; }
.upl-dropzone--avatar .upl-dropzone__hint { font-size: 11.5px; }
.upl-dropzone--avatar .upl-dropzone__status { display: none; }

/* once an image is dropped the thumbnail fills the circle */
.upl-dropzone--avatar.has-previews .upl-dropzone__icon,
.upl-dropzone--avatar.has-previews .upl-dropzone__title,
.upl-dropzone--avatar.has-previews .upl-dropzone__hint { display: none; }

.upl-dropzone--avatar .upl-previews {
	position: absolute;
	inset: 0;
	margin: 0;
	display: block;
}

.upl-dropzone--avatar .upl-preview,
.upl-dropzone--avatar .upl-preview img {
	width: 100%;
	height: 100%;
	margin: 0;
	border: 0;
	border-radius: 50%;
	object-fit: cover;
}

.upl-dropzone--avatar.has-previews::after {
	content: "Drop a new image to replace";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(15, 23, 42, .72);
	padding: .35rem .5rem;
	color: #fff;
	font-size: 11px;
	line-height: 1.3;
	opacity: 0;
	transition: opacity .15s ease;
}

.upl-dropzone--avatar.has-previews:hover::after,
.upl-dropzone--avatar.has-previews:focus-visible::after,
.upl-dropzone--avatar.has-previews.is-over::after { opacity: 1; }

/* ---- gallery previews ------------------------------------------------ */
.upl-previews {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .6rem;
	margin-top: .9rem;
}

.upl-preview {
	width: 104px;
	margin: 0;
	border: 1px solid var(--upl-border, #e7eaf3);
	border-radius: 8px;
	background: #fff;
	padding: .35rem;
	overflow: hidden;
}

.upl-preview img {
	display: block;
	width: 100%;
	height: 70px;
	border-radius: 5px;
	object-fit: cover;
	background: #f1f5f9;
}

.upl-preview figcaption {
	margin-top: .3rem;
	overflow: hidden;
	color: var(--upl-muted, #677788);
	font-size: 11px;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---- whole-page overlay ---------------------------------------------- */
.upl-drop-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(15, 23, 42, .55);
	opacity: 0;
	visibility: hidden;
	transition: opacity .15s ease, visibility .15s ease;
	pointer-events: none;
	-webkit-backdrop-filter: blur(2px);
	        backdrop-filter: blur(2px);
}

.upl-drop-overlay.is-visible { opacity: 1; visibility: visible; }

.upl-drop-overlay__inner {
	border: 3px dashed rgba(255, 255, 255, .85);
	border-radius: 16px;
	padding: 2.5rem 3rem;
	text-align: center;
	color: #fff;
}

.upl-drop-overlay .upl-dropzone__icon {
	width: 3rem;
	height: 3rem;
	background: #fff;
	-webkit-mask-size: 2rem;
	        mask-size: 2rem;
}

.upl-drop-overlay__title { margin: .4rem 0 0; font-size: 20px; font-weight: 600; }
.upl-drop-overlay__hint { margin: .3rem 0 0; font-size: 13.5px; opacity: .8; }

@media (prefers-reduced-motion: reduce) {
	.upl-drop-overlay { transition: none; }
}
