/*
 * serviNec: reseñas con foto (inc/snec-resenas-fotos.php) — campo del formulario, miniaturas en cada reseña y visor.
 */

/* ── Campo del formulario ────────────────────────────────────────────────── */
.snec-rf-field {
	margin: 14px 0 0;
}

.snec-rf-field__lbl {
	display: block;
	margin: 0 0 8px;
	font-size: .9062rem;
	font-weight: 600;
	color: #374151;
}

.snec-rf-field__lbl small {
	font-weight: 400;
	color: #6b7280;
}

.snec-rf-field__drop {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	border: 2px dashed #c7d8f6;
	border-radius: 12px;
	background: #f6f9ff;
	font-size: .875rem;
	color: #4b5563;
}

.snec-rf-field__drop input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.snec-rf-field.is-full .snec-rf-field__drop {
	opacity: .55;
}

.snec-rf-field.is-full .snec-rf-field__drop input {
	pointer-events: none;
}

.snec-rf-field__drop svg {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	color: #1565e8;
}

.snec-rf-field__prev {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}

.snec-rf-field__prev:empty {
	display: none;
}

.snec-rf-field__prev li {
	position: relative;
	width: 72px;
	height: 72px;
}

.snec-rf-field__prev img {
	display: block;
	width: 72px;
	height: 72px;
	border: 1px solid #e5e8ee;
	border-radius: 10px;
	object-fit: cover;
	background: #f3f4f6;
}

.snec-rf-field__prev li.is-file img {
	background: #eef1f6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa0aa' stroke-width='1.6'%3E%3Cpath d='M4 8.5h3l1.5-2.5h7L17 8.5h3v10H4z'/%3E%3Ccircle cx='12' cy='13.5' r='3'/%3E%3C/svg%3E") center / 28px no-repeat;
}

.snec-rf-field__prev button {
	position: absolute;
	top: -7px;
	right: -7px;
	width: 22px;
	height: 22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #111827;
	color: #ffffff;
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
}

.snec-rf-field__error {
	margin: 8px 0 0;
	font-size: .875rem;
	color: #b42318;
}

/* ── Miniaturas en la reseña ─────────────────────────────────────────────── */
.snec-rf {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.snec-rf a {
	display: block;
	border-radius: 10px;
	overflow: hidden;
}

.snec-rf a:focus-visible {
	outline: 2px solid #1565e8;
	outline-offset: 2px;
}

.snec-rf__img {
	display: block;
	width: 72px;
	height: 72px;
	border: 1px solid #e5e8ee;
	border-radius: 10px;
	object-fit: cover;
	background: #f3f4f6;
	transition: transform .15s;
}

.snec-rf a:hover .snec-rf__img {
	transform: scale(1.04);
}

/* ── Visor ───────────────────────────────────────────────────────────────── */
.snec-rf-lb {
	width: 100vw;
	max-width: none;
	height: 100vh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(10, 14, 26, .94);
	color: #ffffff;
}

.snec-rf-lb::backdrop {
	background: transparent;
}

.snec-rf-lb__fig {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 56px 72px;
	box-sizing: border-box;
}

.snec-rf-lb__fig img {
	max-width: 100%;
	max-height: calc(100% - 28px);
	border-radius: 12px;
	object-fit: contain;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.snec-rf-lb__cap {
	font: 500 .875rem/1 Inter, system-ui, sans-serif;
	color: rgba(255, 255, 255, .75);
}

.snec-rf-lb__x,
.snec-rf-lb__nav {
	position: absolute;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #ffffff;
	font-size: 1.8438rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color .15s;
}

.snec-rf-lb__x:hover,
.snec-rf-lb__nav:hover {
	background: rgba(255, 255, 255, .24);
}

.snec-rf-lb__x:focus-visible,
.snec-rf-lb__nav:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
}

.snec-rf-lb__x {
	top: 16px;
	right: 16px;
}

.snec-rf-lb__nav {
	top: 50%;
	transform: translateY(-50%);
}

.snec-rf-lb__nav--prev {
	left: 16px;
}

.snec-rf-lb__nav--next {
	right: 16px;
}

@media (max-width: 640px) {
	.snec-rf-lb__fig {
		padding: 64px 12px 24px;
	}

	.snec-rf-lb__nav {
		top: auto;
		bottom: 16px;
		transform: none;
	}

	.snec-rf-lb__nav--prev {
		left: calc(50% - 56px);
	}

	.snec-rf-lb__nav--next {
		right: calc(50% - 56px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.snec-rf__img,
	.snec-rf-lb__x,
	.snec-rf-lb__nav {
		transition: none;
	}
}
