/**
 * priorIT Photobooth
 *
 * Design nach photobooth.pitsfs.work:
 *   Akzent  #A6243B (Priorit-Rot)
 *   Grau    #2A2A2A (Priorit-Grau)
 *   dunkler Verlauf als Hintergrund, Überschriften in Versalien
 *
 * Es werden ABSICHTLICH keine Web-Fonts von externen Servern geladen
 * (DSGVO). Liegen Aeonik-Dateien unter assets/fonts/, werden sie genutzt,
 * sonst greift der System-Font-Stack.
 */

@font-face {
	font-family: "Aeonik";
	src: url("fonts/Aeonik-Regular.woff2") format("woff2"),
		url("fonts/Aeonik-Regular.woff") format("woff");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Aeonik";
	src: url("fonts/Aeonik-Bold.woff2") format("woff2"),
		url("fonts/Aeonik-Bold.woff") format("woff");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

:root {
	--pb-accent: #a6243b;
	--pb-accent-dark: #8a1e32;
	--pb-grey: #2a2a2a;
	--pb-bg-from: #1a1a1a;
	--pb-bg-to: #2d2d2d;
	--pb-text: #ffffff;
	--pb-text-dim: #e0e0e0;
	--pb-radius: 12px;
	--pb-font: "Aeonik", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif;
}

.pb,
.pb * {
	box-sizing: border-box;
}

.pb {
	font-family: var(--pb-font);
	color: var(--pb-text);
}

/* ---------------------------------------------------------------- Kopf --- */

.pb-head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin-bottom: 24px;
}

.pb-logo {
	display: block;
	width: auto;
	max-width: 220px;
	height: auto;
	max-height: 90px;
}

.pb-event {
	font-size: 1.15rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--pb-text-dim);
	text-align: center;
}

/* ------------------------------------------------------- Upload-Formular --- */

.pb-upload {
	max-width: 620px;
	margin: 40px auto;
	padding: 40px 32px;
	background: linear-gradient(135deg, var(--pb-bg-from) 0%, var(--pb-bg-to) 100%);
	border-radius: var(--pb-radius);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.pb-headline {
	margin: 0;
	font-size: clamp(1.9rem, 6vw, 2.6rem);
	font-weight: 700;
	line-height: 1.1;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--pb-accent);
}

.pb-rule {
	width: 100%;
	height: 2px;
	margin: 18px 0 24px;
	background: var(--pb-accent);
}

.pb-intro {
	margin-bottom: 28px;
	font-size: 1.05rem;
	line-height: 1.6;
	text-align: center;
	color: var(--pb-text-dim);
}

.pb-intro p {
	margin: 0 0 0.6em;
}

.pb-intro p:last-child {
	margin-bottom: 0;
}

/* Dateifeld: der sichtbare Bereich ist das Label, das Input selbst
   wird versteckt (bleibt aber fokussierbar und für Screenreader da). */

.pb-file {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.pb-drop {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	min-height: 190px;
	padding: 28px 20px;
	text-align: center;
	cursor: pointer;
	background: rgba(255, 255, 255, 0.03);
	border: 2px dashed rgba(255, 255, 255, 0.28);
	border-radius: var(--pb-radius);
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.pb-drop:hover,
.pb-drop.is-over {
	background: rgba(166, 36, 59, 0.1);
	border-color: var(--pb-accent);
}

/* Das Datei-Input steht im Markup nach dem Label, deshalb :focus-within
   am Formular statt eines Geschwister-Selektors. */
.pb-form:focus-within .pb-drop {
	outline: 3px solid var(--pb-accent);
	outline-offset: 3px;
}

.pb-icon {
	width: 46px;
	height: 46px;
	color: var(--pb-accent);
}

.pb-drop-text {
	font-size: 1rem;
	line-height: 1.5;
	color: var(--pb-text-dim);
}

.pb-filename {
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--pb-text);
	word-break: break-all;
}

.pb-preview {
	margin-top: 20px;
	text-align: center;
}

.pb-preview-img {
	max-width: 100%;
	max-height: 320px;
	height: auto;
	border-radius: var(--pb-radius);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.pb-button {
	display: block;
	width: 100%;
	margin-top: 26px;
	padding: 17px 24px;
	font-family: inherit;
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #fff;
	cursor: pointer;
	background: var(--pb-accent);
	border: 0;
	border-radius: var(--pb-radius);
	transition: background-color 0.2s ease, transform 0.1s ease;
}

.pb-button:hover:not(:disabled) {
	background: var(--pb-accent-dark);
}

.pb-button:active:not(:disabled) {
	transform: translateY(1px);
}

.pb-button:disabled {
	cursor: not-allowed;
	opacity: 0.55;
}

.pb-progress {
	height: 6px;
	margin-top: 16px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.12);
	border-radius: 3px;
}

.pb-progress-bar {
	width: 0;
	height: 100%;
	background: var(--pb-accent);
	transition: width 0.2s ease;
}

.pb-message {
	margin-top: 18px;
	font-size: 1rem;
	line-height: 1.5;
	text-align: center;
}

.pb-message:empty {
	margin-top: 0;
}

.pb-message.is-error {
	padding: 14px 16px;
	color: #ffd7dd;
	background: rgba(166, 36, 59, 0.22);
	border-left: 4px solid var(--pb-accent);
	border-radius: 6px;
}

.pb-message.is-success {
	padding: 14px 16px;
	color: #d9f2e3;
	background: rgba(40, 150, 90, 0.18);
	border-left: 4px solid #2d9c62;
	border-radius: 6px;
}

.pb-note {
	padding: 18px;
	text-align: center;
	color: var(--pb-text-dim);
	background: rgba(255, 255, 255, 0.05);
	border-radius: var(--pb-radius);
}

.pb-count {
	margin-top: 22px;
	font-size: 0.85rem;
	text-align: center;
	color: rgba(255, 255, 255, 0.5);
}

.pb-again {
	display: inline-block;
	margin-top: 16px;
	padding: 12px 22px;
	font-weight: 700;
	color: #fff;
	text-decoration: none;
	cursor: pointer;
	background: transparent;
	border: 2px solid var(--pb-accent);
	border-radius: var(--pb-radius);
	font-family: inherit;
	font-size: 0.95rem;
}

.pb-again:hover {
	background: var(--pb-accent);
}

/* ------------------------------------------------------------ Slideshow --- */

.pb-show {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 24px;
	background: linear-gradient(135deg, var(--pb-bg-from) 0%, var(--pb-bg-to) 100%);
}

.pb-show-full {
	position: fixed;
	inset: 0;
	z-index: 99999;
	justify-content: space-between;
	padding: clamp(14px, 2.2vh, 34px);
	overflow: hidden;
}

.pb-show-full .pb-head {
	margin-bottom: 0;
	flex-shrink: 0;
}

.pb-stage {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 320px;
	margin: 18px 0;
	overflow: hidden;
}

.pb-slide {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.9s ease;
}

.pb-slide.is-active {
	opacity: 1;
}

.pb-slide img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 10px;
	box-shadow: 0 14px 50px rgba(0, 0, 0, 0.55);
}

.pb-empty {
	max-width: 22ch;
	font-size: clamp(1.2rem, 3vw, 2rem);
	font-weight: 700;
	line-height: 1.35;
	text-align: center;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.45);
}

.pb-footer {
	flex-shrink: 0;
	font-size: clamp(1rem, 2.1vw, 1.7rem);
	font-weight: 700;
	text-align: center;
	color: var(--pb-accent);
}

.pb-badge {
	position: absolute;
	right: 0;
	bottom: 0;
	padding: 7px 14px;
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #fff;
	background: var(--pb-accent);
	border-radius: 999px;
	opacity: 0;
	transition: opacity 0.4s ease;
}

.pb-badge.is-visible {
	opacity: 1;
}

/* Vollbild-Anzeige: Mauszeiger ausblenden, kein Scrollen. */
body.pb-kiosk {
	overflow: hidden;
	cursor: none;
}

@media (prefers-reduced-motion: reduce) {
	.pb-slide,
	.pb-badge,
	.pb-progress-bar,
	.pb-button,
	.pb-drop {
		transition: none;
	}
}

@media (max-width: 600px) {
	.pb-upload {
		margin: 0;
		padding: 28px 18px;
		border-radius: 0;
		min-height: 100vh;
	}
}

/* ----------------------------------------------------------- Backend --- */

.pb-admin-codes {
	padding: 12px 16px;
	margin: 16px 0 24px;
	background: #f0f0f1;
	border-left: 4px solid #2271b1;
}

.pb-admin-codes p {
	margin: 4px 0;
}

.pb-admin-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 16px;
	margin-top: 20px;
}

.pb-admin-item {
	padding: 10px;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
}

.pb-admin-item img {
	display: block;
	width: 100%;
	height: 150px;
	object-fit: cover;
	border-radius: 3px;
}

.pb-admin-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: 8px;
	font-size: 12px;
	color: #50575e;
}

.pb-admin-meta form {
	margin: 0;
}
