/* Custom Photo Reviews — front end. Uses theme tokens where available. */

/* ---- Review form photo field ---- */
.comment-form-cpr-photo {
	margin: 12px 0 4px;
}
.comment-form-cpr-photo label {
	display: block;
	font-weight: 700;
	margin-bottom: 6px;
	color: var(--cp-dark, #111827);
}
.comment-form-cpr-photo input[type="file"] {
	display: block;
	max-width: 100%;
	font-size: 14px;
}
.cpr-photo-hint {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	color: #6b7280;
}
.cpr-photo-preview img {
	display: block;
	margin-top: 10px;
	max-width: 160px;
	max-height: 160px;
	border-radius: 12px;
	border: 1px solid var(--cp-border, #e5eaf1);
	object-fit: cover;
}

/* ---- Photo under a product review ---- */
.cpr-review-photo-wrap {
	margin-top: 10px;
}
.cpr-review-photo {
	display: inline-block;
	max-width: 220px;
	height: auto;
	border-radius: var(--cp-radius, 24px);
	border: 1px solid var(--cp-border, #e5eaf1);
	box-shadow: var(--cp-shadow, 0 12px 30px rgba(17,24,39,0.06));
	cursor: zoom-in;
	transition: transform .15s ease;
}
.cpr-review-photo:hover { transform: translateY(-2px); }

/* ---- [cp_gallery] grid ---- */
.cpr-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(var(--cpr-min, 220px), 1fr));
	gap: 18px;
	margin: 22px 0;
}
.cpr-tile {
	margin: 0;
	background: #fff;
	border: 1px solid var(--cp-border, #e5eaf1);
	border-radius: var(--cp-radius, 24px);
	box-shadow: var(--cp-shadow, 0 12px 30px rgba(17,24,39,0.06));
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .15s ease, box-shadow .15s ease;
}
.cpr-tile:hover {
	transform: translateY(-3px);
	box-shadow: 0 18px 40px rgba(17,24,39,0.10);
}
.cpr-tile-media {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	cursor: zoom-in;
}
.cpr-tile-media img,
.cpr-gallery-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.cpr-tile-cap {
	padding: 12px 14px 14px;
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.cpr-stars {
	color: #f5a623;
	font-size: 14px;
	letter-spacing: 1px;
	line-height: 1;
}
.cpr-tile-product {
	font-weight: 700;
	color: var(--cp-dark, #111827);
	text-decoration: none;
	font-size: 14px;
	line-height: 1.3;
}
.cpr-tile-product:hover { text-decoration: underline; }
.cpr-tile-by {
	font-size: 12px;
	color: #6b7280;
}

/* ---- Lightbox ---- */
.cpr-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(17,24,39,0.86);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: 24px;
}
.cpr-lightbox.is-open { display: flex; }
.cpr-lightbox img {
	max-width: 92vw;
	max-height: 88vh;
	border-radius: 12px;
	box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.cpr-lightbox-close {
	position: absolute;
	top: 18px;
	right: 22px;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: rgba(255,255,255,0.14);
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}
.cpr-lightbox-close:hover { background: rgba(255,255,255,0.28); }

@media (max-width: 480px) {
	.cpr-gallery { gap: 12px; }
}

/* ---- Thank-you funnel overlay ---- */
.cpr-thanks-overlay {
	position: fixed;
	inset: 0;
	background: rgba(17,24,39,0.72);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 100001;
	padding: 20px;
}
.cpr-thanks-overlay.is-open { display: flex; }
.cpr-thanks-card {
	position: relative;
	background: #fff;
	border-radius: var(--cp-radius, 24px);
	max-width: 420px;
	width: 100%;
	padding: 30px 26px 24px;
	text-align: center;
	box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.cpr-thanks-x {
	position: absolute; top: 12px; right: 14px;
	width: 34px; height: 34px; border: 0; border-radius: 50%;
	background: #f3f4f6; color: #6b7280; font-size: 20px; line-height: 1; cursor: pointer;
}
.cpr-thanks-x:hover { background: #e5e7eb; }
.cpr-thanks-emoji { font-size: 40px; line-height: 1; }
.cpr-thanks-title { margin: 8px 0 6px; font-size: 22px; font-weight: 800; color: var(--cp-dark, #111827); }
.cpr-thanks-lead { margin: 0 0 14px; color: #374151; font-size: 15px; }
.cpr-thanks-code {
	display: inline-block;
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 22px; font-weight: 800; letter-spacing: 1px;
	color: var(--cp-dark, #111827);
	background: #f0fdf4; border: 2px dashed #46b450; border-radius: 12px;
	padding: 10px 18px; cursor: copy;
}
.cpr-thanks-copied { margin: 6px 0 0; color: #15803d; font-size: 12px; font-weight: 700; }
.cpr-thanks-sub { margin: 16px 0 12px; color: #6b7280; font-size: 13px; }
.cpr-thanks-google {
	display: block; text-decoration: none;
	background: #1e5fbf; color: #fff; font-weight: 800; font-size: 15px;
	border-radius: 999px; padding: 13px 18px;
}
.cpr-thanks-google:hover { background: #184e9e; color: #fff; }
.cpr-thanks-later {
	display: block; width: 100%; margin-top: 8px;
	background: none; border: 0; color: #9ca3af; font-size: 13px; cursor: pointer; padding: 8px;
}
