/**
 * Product reviews section on the single product page (inc/product-reviews.php).
 * Builds on css/testimonials.css: .tst-card (cards), .rv-summary (rating summary),
 * .tst-cta-btn (blue button), .tst-modal / .tst-form-section (form modal).
 * Card extras (photo, badge, product link) and the photo viewer live in css/testimonials.css,
 * because the same cards are mixed into /atsiliepimai/ and the front page carousel.
 */

/* ---- Section ---- */
.pr-section {
	clear: both;
	margin: 40px 0 10px;
	padding: 0; /* no outer card: the review cards are the cards */
	font-family: 'Inter', sans-serif;
	color: #212121;
	scroll-margin-top: 140px;
}
.pr-section *,
.pr-section *::before,
.pr-section *::after {
	box-sizing: border-box;
}
.pr-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 20px;
	margin: 0 0 20px;
}
.pr-section .pr-title {
	margin: 0;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.3;
}
.pr-total {
	color: #66707c;
	font-weight: 500;
}
.pr-section .rv-summary {
	margin-bottom: 24px;
	box-shadow: none;
	background: #FAFBFC;
}

/* Thank-you message after submitting */
.pr-notice {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 20px;
	padding: 14px 16px;
	border: 1px solid #bfe3da;
	border-radius: 10px;
	background: #ecf8f5;
	color: #0f5f52;
}
.pr-notice svg {
	flex: none;
	margin-top: 1px;
}
.pr-notice p {
	margin: 0;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.45;
}

/* Empty state */
.pr-empty {
	padding: 28px 20px;
	border: 1px dashed #dbe3ea;
	border-radius: 10px;
	background: #FAFBFC;
	text-align: center;
}
.pr-empty .rv-stars {
	margin: 0 0 8px;
}
.pr-empty__title {
	margin: 0 0 4px;
	font-size: 18px;
	font-weight: 600;
}
.pr-empty__text {
	margin: 0 0 16px;
	color: #6b7280;
	font-size: 15px;
}

/* Card list: 3 / 2 / 1 columns */
.pr-list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}
.pr-list .tst-card-text {
	-webkit-line-clamp: 6;
	line-clamp: 6;
}
@media (max-width: 991px) {
	.pr-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}
}
@media (max-width: 639px) {
	.pr-section {
		margin-top: 32px;
	}
	.pr-section .pr-title {
		font-size: 21px;
	}
	.pr-list {
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
	}
}

/* "Rodyti daugiau atsiliepimų" (a <button>: the theme forces button styles with !important) */
.pr-more-wrap {
	margin: 24px 0 0;
	text-align: center;
}
.pr-section .pr-more-btn,
.pr-section .pr-more-btn:hover,
.pr-section .pr-more-btn:focus,
.pr-section .pr-more-btn:active {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 11px 20px !important;
	border: 1px solid #0f69af !important;
	border-radius: 10px !important;
	background: #fff !important;
	color: #0f69af !important;
	font-family: inherit;
	font-size: 15px !important;
	font-weight: 500 !important;
	line-height: 1.2 !important;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s ease;
}
.pr-section .pr-more-btn:hover,
.pr-section .pr-more-btn:focus,
.pr-section .pr-more-btn:active {
	background: #e8f1f9 !important;
}
.pr-section .pr-more-btn:focus-visible {
	outline: 2px solid #0f69af;
	outline-offset: 2px;
}
.pr-section .pr-more-btn[disabled] {
	opacity: .6;
	cursor: wait;
}
.pr-more-left {
	color: #5b7a95;
}

/* ---- Form (inline without JS, modal with JS) ---- */
.pr-form-section {
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid #F1F1F1;
}
.pr-form-section.is-modal {
	border-top: 0;
}
.pr-form-section .comment-respond {
	margin: 0;
	padding: 0;
	border: 0;
}
.pr-form-section #reply-title,
.pr-form-section #cancel-comment-reply-link {
	display: none;
}
.pr-form {
	display: grid;
	gap: 16px;
	margin: 0;
}
.pr-form p {
	margin: 0;
}
.pr-label {
	display: block;
	margin: 0 0 6px;
	padding: 0;
	color: #212121;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}
.pr-form .required {
	color: #c0262d;
}
.pr-form input[type="text"],
.pr-form input[type="email"],
.pr-form textarea {
	display: block;
	width: 100%;
	padding: 11px 14px;
	border: 1px solid #d7dee6;
	border-radius: 10px;
	background: #fff;
	color: #212121;
	font: 400 15px/1.45 'Inter', sans-serif;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.pr-form textarea {
	min-height: 130px;
	resize: vertical;
}
.pr-form input[type="text"]:focus,
.pr-form input[type="email"]:focus,
.pr-form textarea:focus {
	border-color: #0f69af;
	box-shadow: 0 0 0 3px rgba(15, 105, 175, .15);
	outline: none;
}
.pr-note {
	display: block;
	margin-top: 5px;
	color: #6b7280;
	font-size: 13px;
}
.pr-form .form-submit {
	margin: 4px 0 0;
}
.pr-section button.pr-submit,
.pr-section button.pr-submit:hover,
.pr-section button.pr-submit:focus,
.pr-section button.pr-submit:active {
	width: 100%;
	padding: 14px 20px !important;
	border-radius: 10px !important;
	color: #fff !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	text-decoration: none;
}
.pr-section button.pr-submit:focus-visible {
	outline: 2px solid #0f69af;
	outline-offset: 2px;
}
@media (min-width: 640px) {
	.pr-form .comment-form-author,
	.pr-form .comment-form-email {
		grid-column: auto;
	}
	.pr-form {
		grid-template-columns: 1fr 1fr;
		column-gap: 16px;
	}
	.pr-form .pr-rating,
	.pr-form .comment-form-comment,
	.pr-form .form-submit,
	.pr-form .pr-hp,
	.pr-form .must-log-in {
		grid-column: 1 / -1;
	}
}

/* Honeypot: never visible */
.pr-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Star rating input */
.pr-rating {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}
.pr-stars-input {
	display: inline-flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 4px;
}
.pr-stars-input input {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	border: 0;
	opacity: 0;
}
.pr-stars-input label {
	display: inline-flex;
	margin: 0;
	padding: 2px;
	border-radius: 6px;
	cursor: pointer;
	line-height: 0;
}
.pr-stars-input svg {
	width: 32px;
	height: 32px;
	fill: #E1E7EE;
	transition: fill .12s ease, transform .12s ease;
}
.pr-stars-input input:checked ~ label svg,
.pr-stars-input label:hover svg,
.pr-stars-input label:hover ~ label svg {
	fill: #CC7A00;
}
.pr-stars-input:hover input:checked ~ label svg {
	fill: #F8C76E;
}
.pr-stars-input:hover label:hover svg,
.pr-stars-input:hover label:hover ~ label svg {
	fill: #CC7A00;
}
.pr-stars-input label:hover svg {
	transform: scale(1.08);
}
.pr-stars-input input:focus-visible + label {
	outline: 2px solid #0f69af;
	outline-offset: 1px;
}
.pr-rating-hint {
	display: inline-block;
	min-height: 1.2em;
	margin-left: 10px;
	color: #6b7280;
	font-size: 14px;
	vertical-align: 12px;
}

@media (prefers-reduced-motion: reduce) {
	.pr-stars-input svg {
		transition: none;
	}
}
