/*
 * Eventos QR — Estilos públicos.
 * Diseño moderno inspirado en Apple / Airbnb / Google Photos: mucho espacio en
 * blanco, botones grandes, tarjetas redondeadas y excelente experiencia móvil.
 */

.eqr-event,
.eqr-gallery,
.eqr-upload-modal {
	--eqr-color: #111111;
	--eqr-radius: 16px;
	--eqr-transition: 180ms ease;
	box-sizing: border-box;
}

.eqr-event *,
.eqr-gallery *,
.eqr-upload-modal * {
	box-sizing: inherit;
}

/* ---------- Botones ---------- */

.eqr-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 28px;
	font-size: 16px;
	font-weight: 600;
	border-radius: 999px;
	border: none;
	cursor: pointer;
	transition: transform var(--eqr-transition), box-shadow var(--eqr-transition), opacity var(--eqr-transition);
	text-decoration: none;
}

.eqr-btn:active {
	transform: scale(0.97);
}

.eqr-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.eqr-btn-primary {
	background: var(--eqr-color);
	color: #fff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.eqr-btn-primary:hover:not(:disabled) {
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
}

.eqr-btn-secondary {
	background: #f2f2f2;
	color: #111;
}

.eqr-btn-secondary:hover {
	background: #e6e6e6;
}

/* ---------- Hero / cabecera del evento ---------- */

.eqr-hero {
	position: relative;
	min-height: 60vh;
	display: flex;
	align-items: flex-end;
	background-size: cover;
	background-position: center;
	border-radius: var(--eqr-radius);
	overflow: hidden;
	margin-bottom: 48px;
}

.eqr-hero-overlay {
	width: 100%;
	padding: 40px 32px;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.65) 100%);
	color: #fff;
	text-align: center;
}

.eqr-hero-title {
	font-size: clamp(28px, 5vw, 48px);
	margin: 0 0 8px;
	font-weight: 700;
}

.eqr-hero-date {
	opacity: 0.85;
	margin: 0 0 16px;
	font-size: 15px;
}

.eqr-hero-message {
	max-width: 560px;
	margin: 0 auto 28px;
	font-size: 17px;
	line-height: 1.5;
	opacity: 0.95;
}

.eqr-notice {
	padding: 14px 20px;
	border-radius: 12px;
	font-size: 14px;
}

.eqr-notice-error {
	background: #fdeaea;
	color: #a11;
}

.eqr-notice-closed {
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	display: inline-block;
}

/* ---------- Modal de subida ---------- */

.eqr-upload-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.eqr-upload-modal.is-open {
	display: flex;
}

.eqr-upload-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 17, 17, 0.55);
	backdrop-filter: blur(4px);
}

.eqr-upload-dialog {
	position: relative;
	background: #fff;
	border-radius: 24px;
	max-width: 480px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	padding: 36px 28px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.eqr-upload-dialog h2 {
	margin: 0 0 6px;
	font-size: 24px;
}

.eqr-upload-subtitle {
	margin: 0 0 24px;
	color: #666;
	font-size: 14px;
}

.eqr-upload-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	background: #f2f2f2;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.eqr-field {
	margin-bottom: 20px;
}

.eqr-field label {
	display: block;
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 8px;
}

.eqr-input {
	width: 100%;
	padding: 14px 16px;
	border: 1px solid #ddd;
	border-radius: 12px;
	font-size: 15px;
}

.eqr-input:focus {
	outline: none;
	border-color: var(--eqr-color);
}

.eqr-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.eqr-dropzone {
	border: 2px dashed #ddd;
	border-radius: 16px;
	padding: 24px;
	text-align: center;
	transition: border-color var(--eqr-transition), background var(--eqr-transition);
}

.eqr-dropzone.is-dragover {
	border-color: var(--eqr-color);
	background: rgba(0, 0, 0, 0.03);
}

.eqr-dropzone-text {
	margin: 0 0 16px;
	color: #777;
	font-size: 14px;
}

.eqr-dropzone-buttons {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

.eqr-preview-list,
.eqr-progress-list {
	list-style: none;
	margin: 16px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
	gap: 10px;
}

.eqr-preview-list li {
	position: relative;
	aspect-ratio: 1 / 1;
	border-radius: 10px;
	overflow: hidden;
	background: #f2f2f2;
}

.eqr-preview-list img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.eqr-preview-remove {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: none;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
}

.eqr-progress-list li {
	list-style: none;
	background: #f7f7f7;
	border-radius: 10px;
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	grid-column: 1 / -1;
}

.eqr-progress-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.eqr-progress-row img {
	width: 42px;
	height: 42px;
	object-fit: cover;
	border-radius: 8px;
	flex-shrink: 0;
}

.eqr-progress-name {
	flex: 1;
	font-size: 13px;
	color: #444;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.eqr-progress-bar-track {
	height: 6px;
	background: #e6e6e6;
	border-radius: 999px;
	overflow: hidden;
}

.eqr-progress-bar-fill {
	height: 100%;
	width: 0%;
	background: var(--eqr-color);
	transition: width 150ms ease;
}

.eqr-progress-status.is-error {
	color: #c0392b;
	font-size: 12px;
}

.eqr-upload-error {
	background: #fdeaea;
	color: #a11;
	padding: 10px 14px;
	border-radius: 10px;
	font-size: 13px;
	margin-bottom: 16px;
}

.eqr-submit-btn {
	width: 100%;
}

.eqr-upload-step[data-step='success'] {
	text-align: center;
}

.eqr-success-icon {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--eqr-color);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
	margin: 0 auto 20px;
}

.eqr-upload-step[data-step='success'] .eqr-btn {
	width: 100%;
	margin-top: 10px;
}

/* ---------- Galería ---------- */

.eqr-gallery {
	margin: 48px 0;
}

.eqr-gallery-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
}

.eqr-gallery-title {
	font-size: 26px;
	margin: 0;
}

.eqr-gallery-filters {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.eqr-gallery-search,
.eqr-gallery-date {
	padding: 10px 14px;
	border: 1px solid #ddd;
	border-radius: 999px;
	font-size: 14px;
}

.eqr-gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 12px;
}

.eqr-gallery-item {
	margin: 0;
	position: relative;
	border-radius: 14px;
	overflow: hidden;
	cursor: pointer;
	aspect-ratio: 1 / 1;
	background: #f2f2f2;
}

.eqr-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 250ms ease;
}

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

.eqr-gallery-item figcaption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 8px 10px;
	font-size: 12px;
	color: #fff;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.65) 100%);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.eqr-gallery-empty {
	text-align: center;
	color: #888;
	padding: 40px 0;
}

.eqr-gallery-loadmore-wrap {
	text-align: center;
	margin-top: 28px;
}

/* ---------- Lightbox ---------- */

.eqr-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.92);
}

.eqr-lightbox.is-open {
	display: flex;
}

.eqr-lightbox-image {
	max-width: 90vw;
	max-height: 82vh;
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.eqr-lightbox-close,
.eqr-lightbox-prev,
.eqr-lightbox-next {
	position: absolute;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	font-size: 20px;
}

.eqr-lightbox-close {
	top: 20px;
	right: 20px;
	width: 44px;
	height: 44px;
}

.eqr-lightbox-prev,
.eqr-lightbox-next {
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
	height: 52px;
}

.eqr-lightbox-prev {
	left: 20px;
}

.eqr-lightbox-next {
	right: 20px;
}

.eqr-lightbox-caption {
	position: absolute;
	bottom: 24px;
	left: 0;
	right: 0;
	text-align: center;
	color: #fff;
	font-size: 14px;
	opacity: 0.85;
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
	.eqr-hero {
		min-height: 50vh;
	}

	.eqr-upload-dialog {
		padding: 28px 18px;
		border-radius: 18px;
	}

	.eqr-dropzone-buttons {
		flex-direction: column;
	}

	.eqr-lightbox-prev,
	.eqr-lightbox-next {
		width: 40px;
		height: 40px;
		font-size: 16px;
	}
}

/* ---------- Previsualización dentro del editor de Elementor ---------- */
/* El widget "Evento QR – Formulario de subida" envuelve el modal en este
   contenedor únicamente cuando se está editando en Elementor, para que el
   modal (oculto por defecto) se pueda ver y diseñar sin necesidad de pulsar
   el botón "Subir mis fotografías". */

.eqr-elementor-preview .eqr-upload-modal {
	position: static;
	display: flex;
	background: transparent;
	padding: 0;
}

.eqr-elementor-preview .eqr-upload-backdrop {
	display: none;
}

.eqr-elementor-preview .eqr-upload-dialog {
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
	max-width: 480px;
	width: 100%;
	margin: 0 auto;
}
