/* SD Review Images */

/* Upload field */
.comment-form-sd-images label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
}

.comment-form-sd-images input[type="file"] {
	display: block;
	width: 100%;
	padding: 10px;
	border: 2px dashed #ccc;
	border-radius: 8px;
	background: #fafafa;
	cursor: pointer;
}

.comment-form-sd-images input[type="file"]:hover {
	border-color: #999;
}

.sd-ri-hint {
	display: block;
	font-size: 12px;
	color: #777;
	margin-top: 4px;
}

/* Client-side previews before submit */
.sd-ri-previews {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.sd-ri-previews img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid #e0e0e0;
}

/* Gallery inside published reviews */
.sd-ri-gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.sd-ri-gallery .sd-ri-item {
	display: block;
	line-height: 0;
}

.sd-ri-gallery img {
	width: 84px;
	height: 84px;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid #e5e5e5;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sd-ri-gallery img:hover {
	transform: scale(1.04);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Lightbox */
.sd-ri-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(0, 0, 0, 0.85);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.sd-ri-lightbox.is-open {
	opacity: 1;
}

.sd-ri-lightbox img {
	max-width: 92vw;
	max-height: 88vh;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.sd-ri-lightbox-close {
	position: absolute;
	top: 16px;
	right: 20px;
	font-size: 32px;
	line-height: 1;
	color: #fff;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
}

/* Inline validation messages */
.sd-ri-messages {
	display: block;
}

.sd-ri-messages:empty {
	display: none;
}

.sd-ri-error {
	display: block;
	font-size: 13px;
	line-height: 1.4;
	color: #8a1f1f;
	background: #fdf2f2;
	border-left: 3px solid #d94f4f;
	padding: 6px 10px;
	border-radius: 4px;
	margin-top: 8px;
}
