/* Customer reviews in the store look (includes/reviews-look.php). Loaded on the home page and product pages, after
   the QRystal Customer Reviews plugin CSS (reviews.css, plum colours). Only colours, fonts, shapes and the review
   form change; the shelf, its arrows and its script stay as the plugin made them. Permanent (not a Christmas style).
   Selectors start with "body" so they win over the plugin's own rules; form rules carry #commentform because the
   theme's do, and the submit colours need !important because the theme sets them with !important. */

body .qrw-reviews {
	--qrw-ink: #141218;
	--qrw-plum: #141218;
	--qrw-muted: #6b6457;
	--qrw-line: #ece3cf;
	--qrw-wash: #faf7f0;
	--qrr-gold: #d4af6a;
	--qrr-gold-deep: #a8843f;
	--qrr-gold-ink: #7d5f22;
	--qrr-ivory: #faf7f0;
	--qrr-serif: "Frank Ruhl Libre", Georgia, serif;
}

/* Product pages: the section starts at the same line as the gallery, the tabs, "Write a review" and the related
   products (the plugin adds inner side space, and removes it only below 760px). */
body.single-product .qrw-reviews .qrw-inner {
	padding-inline: 0;
}

/* ---------- R1: heading, summary, arrows ---------- */

body .qrw-reviews .qrw-head {
	border-block-start: 1px solid transparent;
	border-image: linear-gradient(90deg, rgba(212, 175, 106, 0) 0%, #d4af6a 15%, #d4af6a 85%, rgba(212, 175, 106, 0) 100%) 1;
}

body .qrw-reviews .qrw-title {
	color: var(--qrw-ink);
	font-family: var(--qrr-serif);
	font-weight: 600;
	letter-spacing: -0.02em;
}

body .qrw-reviews .qra-stars {
	color: var(--qrr-gold-deep);
	font-family: inherit;
	letter-spacing: 0.08em;
}

body .qrw-reviews .qra-navigation button {
	border-color: var(--qrw-line);
	color: var(--qrr-gold-deep);
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

body .qrw-reviews .qra-navigation button:disabled {
	border-color: #f1ece2;
	background: #fdfcf9;
	color: #b9b2a4;
}

@media (hover: hover) {
	body .qrw-reviews .qra-navigation button:enabled:hover {
		border-color: #0d0d10;
		background: #0d0d10;
		color: #ecd9a8;
	}
}

body .qrw-reviews .qra-navigation button:focus-visible,
body .qrw-reviews .qra-shelf:focus-visible {
	outline-color: var(--qrr-gold-deep);
}

body .qrw-reviews .qra-shelf {
	scrollbar-color: #c9a45c #f3eee3;
}

/* ---------- R1: the cards ---------- */

body .qrw-reviews .qra-card {
	border-color: var(--qrw-line);
	border-radius: 14px;
	background: linear-gradient(180deg, #fffdf8 0%, var(--qrr-ivory) 100%);
	color: #2a261f;
}

body .qrw-reviews .qra-card:first-child {
	border-color: rgba(212, 175, 106, 0.7);
	background: #fff;
}

body .qrw-reviews .qra-card figcaption {
	color: var(--qrw-ink);
}

body .qrw-reviews .qra-attribution {
	font-family: var(--qrr-serif);
	font-weight: 600;
}

body .qrw-reviews .qra-finish {
	color: var(--qrr-gold-ink);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* The "Customer reviews" link in the buy box. */
body a.qrystal-reviews-shortcut,
body a.qrystal-reviews-shortcut:visited {
	color: var(--qrr-gold-ink, #7d5f22);
	text-decoration-color: rgba(168, 132, 63, 0.5);
}

body a.qrystal-reviews-shortcut:focus-visible {
	outline-color: #a8843f;
}

/* ---------- R2: "Write a review" as a gold outline pill with a pen ---------- */

body .qrystal-reviews-form > summary {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	min-height: 44px;
	padding: 0 22px;
	border: 1px solid #c9a45c;
	border-radius: 999px;
	background: transparent;
	color: #141218;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.02em;
	list-style: none;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

body .qrystal-reviews-form > summary::-webkit-details-marker {
	display: none;
}

body .qrystal-reviews-form > summary::before {
	content: "";
	flex: none;
	width: 15px;
	height: 15px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16v4zM14 6l4 4' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16v4zM14 6l4 4' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

body .qrystal-reviews-form[open] > summary {
	border-color: #0d0d10;
	background: #0d0d10;
	color: #ecd9a8;
}

@media (hover: hover) {
	body .qrystal-reviews-form > summary:hover {
		border-color: #0d0d10;
		background: #0d0d10;
		color: #ecd9a8;
	}
}

body .qrystal-reviews-form > summary:focus-visible {
	outline: 2px solid #a8843f;
	outline-offset: 3px;
}

/* ---------- R4 and R5: the form in an ivory panel ---------- */

body .qrystal-reviews-form #review_form_wrapper,
body .qrystal-reviews-form .comment-respond {
	margin-top: 14px;
	padding: 24px 24px 22px;
	border: 1px solid #ece3cf;
	border-radius: 18px;
	background: linear-gradient(180deg, #fffdf8 0%, #faf7f0 100%);
}

/* The theme gives #respond a grey background with !important. */
body .qrystal-reviews-form #review_form_wrapper #respond.comment-respond {
	margin: 0;
	padding: 0;
	border: 0;
	background: none !important;
}

body .qrystal-reviews-form #reply-title::after {
	width: 44px;
	border-bottom-color: #d4af6a;
}

body .qrystal-reviews-form #reply-title {
	display: block;
	margin: 0 0 6px;
	color: #141218 !important;
	font-family: "Frank Ruhl Libre", Georgia, serif;
	font-size: 22px;
	font-weight: 600;
	letter-spacing: -0.01em;
	text-transform: none;
}

body .qrystal-reviews-form #commentform label,
body .qrystal-reviews-form #commentform .qr-photo-label {
	display: block;
	margin: 0 0 6px;
	color: #2a261f;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.4;
	text-transform: none;
}

body .qrystal-reviews-form .qr-optional {
	color: #7a7466;
	font-weight: 400;
}

body .qrystal-reviews-form #commentform .required {
	color: #a8843f;
}

body .qrystal-reviews-form #commentform :is(input[type="text"], input[type="email"], textarea) {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 14px;
	border: 1px solid #ddd2bd;
	border-radius: 10px;
	background: #fff;
	color: #141218;
	font-size: 16px;
	line-height: 1.45;
	box-shadow: none;
}

body .qrystal-reviews-form #commentform :is(input[type="text"], input[type="email"], textarea):focus {
	border-color: #c9a45c;
	outline: 0;
	box-shadow: 0 0 0 3px rgba(212, 175, 106, 0.25);
}

body .qrystal-reviews-form .qr-form-hint {
	display: block;
	margin-top: 6px;
	color: #6b6457;
	font-size: 13px;
	line-height: 1.4;
}

/* The photo: the file field stays reachable with the keyboard (the theme hides it with display: none). */
body .qrystal-reviews-form #commentform .comment-form-image {
	position: relative;
}

body .qrystal-reviews-form #commentform .comment-form-image input[type="file"] {
	display: block;
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	opacity: 0;
}

body .qrystal-reviews-form #commentform .comment-form-image .upload-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	min-height: 40px;
	margin: 0;
	padding: 0 18px;
	border: 1px solid #c9a45c;
	border-radius: 999px;
	background: #fff;
	color: #141218;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.01em;
	text-transform: none;
	cursor: pointer;
}

body .qrystal-reviews-form #commentform .comment-form-image:has(input[type="file"]:focus-visible) .upload-btn {
	outline: 2px solid #a8843f;
	outline-offset: 2px;
}

body .qrystal-reviews-form #commentform .comment-form-image .upload-filename {
	color: #6b6457;
}

/* R5: the gold "Submit review" button. */
body .qrystal-reviews-form #commentform .form-submit input#submit {
	min-height: 46px;
	padding: 0 30px;
	border: 1px solid #c9a45c;
	border-radius: 999px;
	background-color: #d4af6a !important;
	background-image: linear-gradient(135deg, #f0dfb0 0%, #d4af6a 48%, #b8914a 100%);
	color: #0d0d10 !important;
	font-size: 15px;
	font-weight: 700 !important;
	letter-spacing: 0.03em;
	box-shadow: 0 10px 26px -12px rgba(212, 175, 106, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.45);
	cursor: pointer;
	transition: filter 0.2s ease;
}

body .qrystal-reviews-form #commentform .form-submit input#submit:hover,
body .qrystal-reviews-form #commentform .form-submit input#submit:focus-visible {
	filter: brightness(1.07);
}

body .qrystal-reviews-form #commentform .form-submit input#submit:focus-visible {
	outline: 2px solid #a8843f;
	outline-offset: 3px;
}

@media (max-width: 600px) {
	body .qrystal-reviews-form #review_form_wrapper,
	body .qrystal-reviews-form .comment-respond {
		padding: 18px 16px;
		border-radius: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	body .qrw-reviews .qra-navigation button,
	body .qrystal-reviews-form > summary,
	body .qrystal-reviews-form #commentform .form-submit input#submit {
		transition: none;
	}
}
