/* Project Submission Form — form.css  v60.3
   Brutalist Minimal — Swiss Style */

#pfp-form {
	max-width: 720px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 0;
	font-family: helvetica, arial, sans-serif;
	font-size: 16px;
	color: #000;
	text-transform: lowercase;
	letter-spacing: -0.01em;
}

/* ── Sections ── */
#pfp-form h3 {
	font-weight: 400;
	font-size: 1em;
	margin: 0;
	padding: 28px 0 8px;
	letter-spacing: 0.02em;
}

/* ── Text inputs ── */
#pfp-form input[type="text"],
#pfp-form input[type="email"],
#pfp-form input[type="url"] {
	width: 100%;
	border: none;
	border-bottom: 1px solid #000;
	padding: 10px 0;
	background: transparent;
	font-family: helvetica, arial, sans-serif;
	font-size: 1em;
	color: #000;
	box-sizing: border-box;
	outline: none;
	border-radius: 0;
	-webkit-appearance: none;
	display: block;
	letter-spacing: -0.01em;
}
#pfp-form input::placeholder,
#pfp-form textarea::placeholder {
	color: #aaa;
}
#pfp-form input:focus,
#pfp-form textarea:focus {
	border-bottom-width: 2px;
}
#pfp-form input:-webkit-autofill,
#pfp-form input:-webkit-autofill:focus {
	-webkit-box-shadow: 0 0 0 60px #fff inset !important;
	-webkit-text-fill-color: #000 !important;
	transition: background-color 9999s ease-in-out 0s !important;
}

/* ── Textarea ── */
#pfp-form #pfp_description {
	width: 100% !important;
	min-height: calc(1.6em * 5) !important;
	border: none !important;
	border-bottom: 1px solid #000 !important;
	padding: 10px 0 !important;
	background: transparent !important;
	font-family: helvetica, arial, sans-serif !important;
	font-size: 1em !important;
	color: #000 !important;
	box-sizing: border-box !important;
	outline: none !important;
	border-radius: 0 !important;
	-webkit-appearance: none !important;
	display: block !important;
	resize: none !important;
	overflow-y: hidden !important;
	line-height: 1.6 !important;
	overscroll-behavior: contain !important;
	scrollbar-width: none !important;
	letter-spacing: -0.01em !important;
}
#pfp-form #pfp_concept,
#pfp-form #pfp_process {
	width: 100% !important;
	min-height: calc(1.6em * 3) !important;
	border: none !important;
	border-bottom: 1px solid #000 !important;
	padding: 10px 0 !important;
	background: transparent !important;
	font-family: helvetica, arial, sans-serif !important;
	font-size: 1em !important;
	color: #000 !important;
	box-sizing: border-box !important;
	outline: none !important;
	border-radius: 0 !important;
	-webkit-appearance: none !important;
	display: block !important;
	resize: none !important;
	overflow-y: hidden !important;
	line-height: 1.6 !important;
	overscroll-behavior: contain !important;
	scrollbar-width: none !important;
	letter-spacing: -0.01em !important;
}
#pfp-form #pfp_description:focus {
	border-bottom-width: 2px !important;
}
#pfp-form #pfp_concept:focus,
#pfp-form #pfp_process:focus {
	border-bottom-width: 2px !important;
}
#pfp-form #pfp_description::-webkit-scrollbar { display: none; }
#pfp-form #pfp_concept::-webkit-scrollbar,
#pfp-form #pfp_process::-webkit-scrollbar { display: none; }

/* ── Wordcount ── */
#pfp-wordcount {
	font-size: 0.65em;
	color: #aaa;
	margin-top: 4px;
	text-transform: none;
	min-height: 1em;
	letter-spacing: 0;
}

/* ── File inputs ── */
#pfp-form #pfp-featured-input,
#pfp-form #pfp-files-input {
	display: block;
	width: 100%;
	min-height: 44px;
	font-family: helvetica, arial, sans-serif;
	font-size: 0.78em;
	cursor: pointer;
	touch-action: manipulation;
	color: #666;
	padding: 4px 0;
}

/* ── Format hint ── */
.pfp-formats {
	font-size: 0.65em;
	color: #aaa;
	margin: 0;
	padding: 0 0 2px;
	line-height: 1.5;
	text-transform: none;
	letter-spacing: 0;
}

/* ── Categories ── */
.pfp-categories {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	column-gap: 0;
	row-gap: 0;
}
@media (max-width: 600px) {
	.pfp-categories { grid-template-columns: repeat(2, 1fr); }
}
.pfp-cat {
	position: relative;
	padding: 7px 0 7px 18px;
	cursor: pointer;
	font-size: 0.78em;
	border-bottom: 1px solid #eee;
}
.pfp-cat input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: auto;
	border: none;
	padding: 0;
}
.pfp-cat span:before {
	content: "";
	position: absolute;
	left: 0;
	top: 9px;
	width: 9px;
	height: 9px;
	border: 1px solid #000;
}
.pfp-cat input:checked + span:before {
	background: #000;
}

/* ════════════════════════════════════════════════════════════════════
   FEATURED PREVIEW — single item, no grid gap noise
════════════════════════════════════════════════════════════════════ */
#pfp-featured-preview {
	display: block;
	margin: 6px 0;
	max-width: 240px;
}

/* ════════════════════════════════════════════════════════════════════
   FILES PREVIEW GRID — 3 columns, 1px gap
════════════════════════════════════════════════════════════════════ */
#pfp-preview {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1px;
	margin: 6px 0;
	background: #e0e0e0;
}
@media (max-width: 600px) {
	#pfp-preview { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 380px) {
	#pfp-preview { grid-template-columns: 1fr; }
}

/* ── Preview Item ── */
.pfp-item {
	position: relative;
	background: #fff;
	cursor: grab;
	-webkit-user-select: none;
	user-select: none;
	display: flex;
	flex-direction: column;
}
.pfp-item:active { cursor: grabbing; }

.pfp-item img {
	width: 100%;
	aspect-ratio: 1/1;
	object-fit: cover;
	display: block;
	background: #f2f2f2;
	cursor: zoom-in;
	flex-shrink: 0;
}

.pfp-item-cap {
	background: #fff;
	padding: 3px 5px;
	min-height: 18px;
	display: flex;
	align-items: center;
}
.pfp-item-label {
	font-size: 0.55em;
	color: #999;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	width: 100%;
	text-transform: none;
	line-height: 1.2;
	letter-spacing: 0;
}

.pfp-item.pfp-dragging  { opacity: 0.25; }
.pfp-item.pfp-drag-over { outline: 2px solid #000; outline-offset: -2px; }

.pfp-remove {
	position: absolute; top: 0; right: 0;
	width: 22px; height: 22px;
	background: #000; color: #fff;
	display: flex; align-items: center; justify-content: center;
	font-size: 12px; cursor: pointer; z-index: 10;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

.pfp-converting {
	aspect-ratio: 1/1; width: 100%; background: #f2f2f2;
	display: flex; align-items: center; justify-content: center;
	font-size: 0.58em; color: #aaa; text-align: center; line-height: 1.4;
	flex-shrink: 0;
}

/* ── Counter ── */
#pfp-counter {
	font-size: 0.65em;
	color: #aaa;
	margin-top: 4px;
	letter-spacing: 0;
}

/* ── Message ── */
#pfp-msg {
	font-size: 0.75em;
	min-height: 1em;
}

/* ════════════════════════════════════════════════════════════════════
   SUBMIT — solid black, brutalist
════════════════════════════════════════════════════════════════════ */
#pfp-form #pfp-submit {
	-webkit-appearance: none;
	appearance:         none;
	border-radius:      0;
	display:            block;
	width:              100%;
	min-height:         48px;
	margin-top:         28px;
	margin-bottom:      20px;
	padding:            12px 16px;
	box-sizing:         border-box;
	background:         #000;
	border:             none;
	color:              #fff;
	font-family:        helvetica, arial, sans-serif;
	font-size:          0.82em;
	text-align:         center;
	text-transform:     lowercase;
	letter-spacing:     0.05em;
	cursor:             pointer;
	touch-action:       manipulation;
	-webkit-tap-highlight-color: rgba(255,255,255,0.15);
	-webkit-user-select: none;
	user-select:        none;
	transition:         opacity 0.12s;
}
#pfp-form #pfp-submit:hover {
	opacity: 0.75;
}
#pfp-form #pfp-submit:active {
	opacity: 0.5;
}
#pfp-form #pfp-submit:disabled {
	opacity: 0.25;
	cursor: default;
}

/* ── City autocomplete ── */
.pfp-location-wrap { position: relative; }
.pfp-suggestions {
	position: absolute; top: 100%; left: 0; right: 0;
	background: #fff; border: 1px solid #000;
	list-style: none; margin: 0; padding: 0;
	z-index: 999; max-height: 220px; overflow-y: auto; display: none;
}
.pfp-suggestions li {
	padding: 8px 0; cursor: pointer;
	font-size: 0.78em; border-bottom: 1px solid #eee; text-transform: none;
}
.pfp-suggestions li:last-child { border-bottom: none; }
.pfp-suggestions li:hover, .pfp-suggestions li.pfp-active { background: #000; color: #fff; }

/* ── Lightbox ── */
#pfp-lightbox {
	position: fixed; inset: 0;
	background: rgba(0,0,0,0.95);
	z-index: 99999;
	display: flex; align-items: center; justify-content: center;
	cursor: zoom-out;
	-webkit-tap-highlight-color: transparent;
}
#pfp-lightbox img {
	max-width: 90vw; max-height: 90vh;
	object-fit: contain;
	-webkit-user-select: none; user-select: none;
}

/* ── Touch-Drag Ghost ── */
.pfp-touch-ghost {
	position: fixed;
	z-index: 99998;
	pointer-events: none;
	opacity: 0.75;
	box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* ── Credits ── */
.pfp-credits-row {
	display: flex;
	gap: 0;
	align-items: stretch;
}
.pfp-credits-row input { flex: 1; }
.pfp-credit-add {
	-webkit-appearance: none;
	appearance: none;
	border: none;
	border-bottom: 1px solid #000;
	background: #000;
	color: #fff;
	font-family: helvetica, arial, sans-serif;
	font-size: 0.72em;
	padding: 8px 16px;
	cursor: pointer;
	width: 100%;
	text-align: center;
	text-transform: lowercase;
	letter-spacing: 0.02em;
	margin-top: 2px;
	touch-action: manipulation;
	-webkit-tap-highlight-color: rgba(255,255,255,0.15);
}
.pfp-credit-add:hover { opacity: 0.75; }
#pfp-credits-list { display: flex; flex-direction: column; }
.pfp-credit-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 0;
	border-bottom: 1px solid #eee;
	font-size: 0.78em;
}
.pfp-credit-item span { text-transform: none; }
.pfp-credit-role { color: #999; margin-left: 4px; }
.pfp-credit-insta { color: #999; margin-left: 4px; }
.pfp-credit-rm {
	cursor: pointer; font-size: 1em; color: #aaa; padding: 0 4px;
	-webkit-tap-highlight-color: rgba(0,0,0,0.1);
	touch-action: manipulation;
}
.pfp-credit-rm:hover { color: #000; }

/* ── AGB ── */
.pfp-agb-wrap { margin-top: 20px; display: flex; align-items: baseline; gap: 0; flex-wrap: wrap; }
.pfp-agb-label {
	display: flex; align-items: flex-start; gap: 8px;
	font-size: 0.72em; cursor: pointer; text-transform: none; line-height: 1.5;
}
.pfp-agb-label input[type="checkbox"] {
	width: 14px; height: 14px; margin-top: 2px; flex-shrink: 0; accent-color: #000;
}
a.pfp-agb-link {
	color: #000; text-decoration: underline; font-size: 0.72em;
	text-transform: none; line-height: 1.5;
	-webkit-tap-highlight-color: rgba(0,0,0,0.1); touch-action: manipulation;
}
a.pfp-agb-link:hover { opacity: 0.6; }

/* ── Square Crop ── */
#pfp-crop-container {
	position: relative;
	max-width: 360px;
	margin: 8px 0;
}
#pfp-crop-canvas {
	display: block;
	width: 100%;
	aspect-ratio: 1/1;
	cursor: grab;
	touch-action: none;
	background: #f8f8f8;
}
#pfp-crop-canvas:active { cursor: grabbing; }
.pfp-crop-controls { display: flex; gap: 0; }
.pfp-crop-btn {
	-webkit-appearance: none; appearance: none; border: none;
	background: #000; color: #fff;
	font-family: helvetica, arial, sans-serif; font-size: 0.72em;
	padding: 8px 16px; cursor: pointer; flex: 1; text-align: center;
	touch-action: manipulation; -webkit-tap-highlight-color: rgba(255,255,255,0.15);
}
.pfp-crop-btn:hover { opacity: 0.75; }
.pfp-crop-confirm { background: #333; }

/* ── Upload Overlay ── */
#pfp-upload-overlay {
	position: fixed; inset: 0;
	background: rgba(255,255,255,0.92);
	z-index: 99999;
	display: flex; align-items: center; justify-content: center;
}
.pfp-upload-spinner { text-align: center; }
.pfp-upload-msg {
	font-family: helvetica, arial, sans-serif;
	font-size: 14px; font-weight: 100;
	color: #000; text-transform: lowercase;
	letter-spacing: 0.02em;
}
@keyframes pfp-pulse { 0%,100%{opacity:0.4} 50%{opacity:1} }
.pfp-upload-msg { animation: pfp-pulse 1.5s ease-in-out infinite; }

/* PATCH E3: Progress bar — appears below the upload message */
.pfp-upload-track {
	width: 180px; height: 1px;
	background: #e0e0e0;
	margin: 10px auto 0;
	position: relative;
	overflow: hidden;
}
.pfp-upload-bar {
	position: absolute; left: 0; top: 0; height: 100%;
	width: 0%;
	background: #000;
	transition: width 0.25s ease;
}

/* ══════════════════════════════════════════════════════════════════
   AGB / Terms of Service Popup  (v79.2)

   Wichtig: In manchen Themes (Lay Theme, Elementor) hat ein Parent
   ein `transform`/`filter`/`will-change`, was `position:fixed` brechen
   kann. Außerdem haben ihre Inhalte hohe z-indexes. Daher:
   - Popup wird per JS direkt an document.body gehängt (portal)
   - z-index 2147483647 (max int32) → über allem
   - All !important um Theme-Overrides zu besiegen
   - Solides Weiß mit isolation: isolate → kein Durchsickern
═══════════════════════════════════════════════════════════════════ */
#pfp-agb-overlay {
	position: fixed !important;
	top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	height: 100dvh !important; /* dynamic viewport — iOS address bar aware */
	background: rgba(0, 0, 0, 0.75) !important;
	z-index: 2147483647 !important; /* max int32 — beats everything */
	display: none;
	align-items: center !important;
	justify-content: center !important;
	padding: 20px !important;
	margin: 0 !important;
	box-sizing: border-box !important;
	isolation: isolate; /* new stacking context */
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	animation: pfp-agb-fade 0.18s ease-out;
	overflow: hidden !important;
}
#pfp-agb-overlay[style*="flex"] { display: flex !important; }

@keyframes pfp-agb-fade { from { opacity: 0; } to { opacity: 1; } }

.pfp-agb-popup {
	background: #ffffff !important;
	background-color: #ffffff !important;
	max-width: 620px !important;
	width: 100% !important;
	max-height: 85vh !important;
	max-height: 85dvh !important;
	position: relative !important;
	display: flex !important;
	flex-direction: column !important;
	font-family: helvetica, arial, sans-serif !important;
	font-size: 14px !important;
	line-height: 1.6 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	color: #111 !important;
	border-radius: 2px !important;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35) !important;
	overflow: hidden !important; /* contain rounded corners */
	margin: 0 auto !important;
	/* NOTE: no `isolation:isolate` or `animation` here — both create
	   stacking contexts on iOS that interfere with wheel events on
	   descendant scroll containers. Fade happens on the overlay only. */
}

/* Close × in top-right corner */
.pfp-agb-close {
	position: absolute !important;
	top: 10px !important;
	right: 12px !important;
	width: 36px !important;
	height: 36px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-size: 24px !important;
	line-height: 1 !important;
	cursor: pointer !important;
	color: #000 !important;
	background: rgba(255, 255, 255, 0.95) !important;
	border: 1px solid rgba(0,0,0,0.08) !important;
	border-radius: 50% !important;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0.15) !important;
	touch-action: manipulation !important;
	z-index: 10 !important;
	user-select: none !important;
	-webkit-user-select: none !important;
	pointer-events: auto !important;
	transition: background 0.15s, transform 0.15s !important;
}
.pfp-agb-close:hover {
	background: rgba(0, 0, 0, 0.08) !important;
	transform: scale(1.05) !important;
}
.pfp-agb-close:active {
	transform: scale(0.95) !important;
}

/* Scrollable content — this is the ONLY scrollable area when popup is open.
   We use an explicit max-height calculation (popup max-height minus footer)
   to give the browser a concrete scroll context. Flex alone is unreliable
   for wheel events on some desktop browsers. */
.pfp-agb-scroll {
	overflow-y: scroll !important;
	overflow-x: hidden !important;
	-webkit-overflow-scrolling: touch !important;
	padding: 36px 40px 24px !important;
	flex: 1 1 auto !important;
	min-height: 0 !important;
	height: auto !important;
	background: #ffffff !important;
	pointer-events: auto !important;
	touch-action: pan-y !important;
	-webkit-user-select: text !important;
	user-select: text !important;
	/* Explicit scrollbar to make scroll affordance obvious on desktop */
	scrollbar-width: thin;
	scrollbar-color: rgba(0,0,0,0.3) transparent;
}
.pfp-agb-scroll::-webkit-scrollbar {
	width: 8px;
}
.pfp-agb-scroll::-webkit-scrollbar-track {
	background: transparent;
}
.pfp-agb-scroll::-webkit-scrollbar-thumb {
	background: rgba(0,0,0,0.25);
	border-radius: 4px;
}
.pfp-agb-scroll::-webkit-scrollbar-thumb:hover {
	background: rgba(0,0,0,0.45);
}

.pfp-agb-popup h3 {
	font-weight: 400 !important;
	font-size: 22px !important;
	margin: 0 0 20px !important;
	padding: 0 !important;
	letter-spacing: 0 !important;
	color: #000 !important;
	text-transform: none !important;
	border: none !important;
}
.pfp-agb-popup h4 {
	font-weight: 600 !important;
	font-size: 14px !important;
	margin: 22px 0 10px !important;
	padding: 0 !important;
	letter-spacing: 0 !important;
	color: #000 !important;
	text-transform: none !important;
	border: none !important;
}
.pfp-agb-popup p {
	margin: 0 0 12px !important;
	color: #222 !important;
	font-size: 14px !important;
	line-height: 1.6 !important;
}
.pfp-agb-popup p.pfp-agb-lead {
	margin-bottom: 20px !important;
	color: #444 !important;
}
.pfp-agb-popup ul {
	margin: 0 0 12px !important;
	padding: 0 0 0 20px !important;
	list-style: disc !important;
}
.pfp-agb-popup ul li {
	margin: 0 0 6px !important;
	list-style: disc !important;
	color: #222 !important;
	font-size: 14px !important;
}
.pfp-agb-popup em {
	font-style: italic !important;
	font-weight: 500 !important;
}
.pfp-agb-popup strong { font-weight: 600 !important; }

/* Fixed footer with close button */
.pfp-agb-actions {
	flex: 0 0 auto !important;
	padding: 14px 24px !important;
	border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
	background: #fafafa !important;
	display: flex !important;
	justify-content: flex-end !important;
	align-items: center !important;
	gap: 10px !important;
}

.pfp-agb-close-btn {
	-webkit-appearance: none !important;
	appearance: none !important;
	border: none !important;
	background: #000 !important;
	color: #fff !important;
	font-family: helvetica, arial, sans-serif !important;
	font-size: 13px !important;
	padding: 10px 28px !important;
	cursor: pointer !important;
	text-transform: lowercase !important;
	letter-spacing: 0.05em !important;
	border-radius: 2px !important;
	-webkit-tap-highlight-color: rgba(255, 255, 255, 0.15) !important;
	touch-action: manipulation !important;
	transition: opacity 0.15s !important;
	margin: 0 !important;
	pointer-events: auto !important;
	user-select: none !important;
	-webkit-user-select: none !important;
}
.pfp-agb-close-btn:hover { opacity: 0.80 !important; }
.pfp-agb-close-btn:active { opacity: 0.65 !important; }

/* Body scroll lock */
body.pfp-agb-open {
	overflow: hidden !important;
	position: fixed !important;
	width: 100% !important;
	left: 0 !important;
	right: 0 !important;
}

/* Mobile */
@media (max-width: 520px) {
	#pfp-agb-overlay { padding: 10px !important; }
	.pfp-agb-popup { max-height: calc(100vh - 20px) !important; max-height: calc(100dvh - 20px) !important; }
	.pfp-agb-scroll { padding: 32px 20px 16px !important; }
	.pfp-agb-actions { padding: 12px 20px !important; }
	.pfp-agb-popup h3 { font-size: 19px !important; }
}
