/* Wedding Photo Uploader — public styles (mobile-first) */

.wpu-wrap {
	max-width: 640px;
	margin: 0 auto;
	padding: 16px 12px 32px;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: #1a1a1a;
	box-sizing: border-box;
}

.wpu-wrap *,
.wpu-wrap *::before,
.wpu-wrap *::after {
	box-sizing: border-box;
}

.wpu-alert {
	padding: 14px 16px;
	border-radius: 10px;
	margin-bottom: 16px;
	font-weight: 600;
	line-height: 1.4;
}

.wpu-alert-closed {
	background: #fff4e5;
	border: 1px solid #ffd8a8;
	color: #7c4a00;
}

/* Elegant "Zárva" notice shown when the upload gate is closed. */
.wpu-closed {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 10px;
	padding: 40px 24px;
	margin-bottom: 24px;
	background: linear-gradient(180deg, #ffffff 0%, #faf7f2 100%);
	border: 1px solid #ece4d8;
	border-radius: 18px;
	box-shadow: 0 6px 28px rgba(60, 40, 10, 0.08);
}

.wpu-closed-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: #f3ece0;
	color: #9c7b4a;
}

.wpu-closed-icon svg {
	width: 34px;
	height: 34px;
}

.wpu-closed-title {
	font-size: 28px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #4a3a22;
}

.wpu-closed-text {
	font-size: 15px;
	color: #8a7a63;
}

/* Live "photos collected" counter shown when thumbnails are disabled. */
.wpu-counter-section {
	margin-top: 24px;
}

.wpu-counter-box {
	text-align: center;
	padding: 28px 24px;
	background: linear-gradient(135deg, #fff7f9 0%, #f3f6ff 100%);
	border: 1px solid #ecdfe9;
	border-radius: 18px;
	box-shadow: 0 6px 28px rgba(60, 40, 80, 0.07);
}

.wpu-counter-text {
	font-size: 20px;
	font-weight: 600;
	line-height: 1.4;
	color: #4a3a52;
}

.wpu-counter-text #wpu_photo_count {
	font-size: 28px;
	font-weight: 800;
	color: #c2410c;
}

.wpu-form {
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 16px;
	padding: 20px 16px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.wpu-field {
	margin-bottom: 18px;
}

.wpu-label {
	display: block;
	font-weight: 700;
	font-size: 14px;
	margin-bottom: 8px;
}

.wpu-required {
	color: #c92a2a;
}

.wpu-input {
	width: 100%;
	padding: 14px 12px;
	border: 1px solid #ced4da;
	border-radius: 10px;
	font-size: 16px;
	line-height: 1.3;
}

.wpu-input:focus {
	outline: none;
	border-color: #7950f2;
	box-shadow: 0 0 0 3px rgba(121, 80, 242, 0.2);
}

.wpu-file-input {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.wpu-file-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 20px;
	border-radius: 10px;
	background: #f1f3f5;
	border: 2px dashed #adb5bd;
	color: #343a40;
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
	width: 100%;
	text-align: center;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.wpu-file-btn:hover {
	background: #e9ecef;
	border-color: #868e96;
}

.wpu-file-names {
	margin-top: 10px;
	font-size: 13px;
	color: #495057;
	word-break: break-word;
}

.wpu-progress {
	margin: 16px 0 6px;
	height: 10px;
	background: #e9ecef;
	border-radius: 999px;
	overflow: hidden;
}

.wpu-progress-bar {
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, #7950f2, #9775fa);
	border-radius: 999px;
	transition: width 0.2s ease;
}

.wpu-progress-label {
	font-size: 13px;
	font-weight: 700;
	color: #495057;
	margin-bottom: 8px;
	text-align: center;
}

.wpu-submit {
	display: block;
	width: 100%;
	min-height: 52px;
	margin-top: 8px;
	padding: 14px 20px;
	border: none;
	border-radius: 12px;
	background: linear-gradient(135deg, #7950f2, #6741d9);
	color: #fff;
	font-size: 17px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(103, 65, 217, 0.35);
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.wpu-submit:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 8px 24px rgba(103, 65, 217, 0.4);
}

.wpu-submit:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	box-shadow: none;
}

.wpu-message {
	margin-top: 14px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

.wpu-message-success {
	color: #2b8a3e;
}

.wpu-message-error {
	color: #c92a2a;
}

.wpu-message-info {
	color: #495057;
}

.wpu-error-badge {
	display: inline-block;
	background: #c92a2a;
	color: #fff;
	font-weight: 800;
	font-size: 12px;
	letter-spacing: 0.04em;
	padding: 3px 8px;
	border-radius: 6px;
	margin-right: 6px;
	vertical-align: middle;
	text-transform: uppercase;
}

.wpu-gallery-section {
	margin-top: 28px;
}

.wpu-gallery-title {
	font-size: 20px;
	font-weight: 800;
	margin: 0 0 14px;
	text-align: center;
}

.wpu-gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}

.wpu-gallery-item {
	margin: 0;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 10px;
	background: #f1f3f5;
}

.wpu-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wpu-gallery-item--clickable {
	cursor: pointer;
}

.wpu-gallery-item--clickable img {
	transition: transform 0.2s ease;
}

.wpu-gallery-item--clickable:hover img {
	transform: scale(1.05);
}

.wpu-gallery-item--clickable:focus-visible {
	outline: 3px solid #7950f2;
	outline-offset: 2px;
}

.wpu-gallery-item--placeholder {
	border: 1px solid #e9ecef;
}

.wpu-gallery-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: #adb5bd;
	background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.wpu-gallery-placeholder svg {
	width: 42%;
	height: 42%;
}

.wpu-gallery-loading,
.wpu-gallery-empty {
	grid-column: 1 / -1;
	text-align: center;
	color: #868e96;
	font-size: 14px;
	padding: 20px 8px;
}

.wpu-load-more {
	display: block;
	margin: 16px auto 0;
	min-height: 44px;
	padding: 10px 24px;
	border: 1px solid #ced4da;
	border-radius: 999px;
	background: #fff;
	color: #495057;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.wpu-load-more:hover {
	background: #f1f3f5;
	border-color: #adb5bd;
}

/* ---- Lightbox ---- */
body.wpu-lb-open {
	overflow: hidden;
}

.wpu-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.9);
	padding: 24px;
}

.wpu-lightbox[hidden] {
	display: none;
}

.wpu-lb-img {
	max-width: 92vw;
	max-height: 86vh;
	object-fit: contain;
	border-radius: 6px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.wpu-lb-btn {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	cursor: pointer;
	border-radius: 50%;
	transition: background 0.15s ease;
	line-height: 1;
}

.wpu-lb-btn:hover {
	background: rgba(255, 255, 255, 0.25);
}

.wpu-lb-close {
	top: 16px;
	right: 16px;
	width: 44px;
	height: 44px;
	font-size: 28px;
}

.wpu-lb-prev,
.wpu-lb-next {
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
	height: 52px;
	font-size: 34px;
}

.wpu-lb-prev {
	left: 12px;
}

.wpu-lb-next {
	right: 12px;
}

@media (min-width: 480px) {
	.wpu-gallery {
		grid-template-columns: repeat(4, 1fr);
		gap: 10px;
	}
}

@media (min-width: 768px) {
	.wpu-wrap {
		padding: 24px 16px 40px;
	}

	.wpu-form {
		padding: 24px 20px;
	}

	.wpu-gallery {
		grid-template-columns: repeat(5, 1fr);
	}
}
