/* Theme-aware accent. Kadence uses --global-palette1; fallback remains Parkland green. */
.parkland-review-form-block,
.parkland-review-counter-block {
	--parkland-review-accent: var(--global-palette1, var(--wp--preset--color--theme-palette-1, #00a65a));
	box-sizing: border-box;
	width: 100%;
	max-width: none;
}

.parkland-review-form-heading,
.parkland-review-counter-heading {
	margin-top: 0;
}

.parkland-review-form {
	display: grid;
	gap: 16px;
	width: 100%;
}

.parkland-review-field {
	margin: 0;
	padding: 0;
	border: 0;
}

.parkland-review-field > label,
.parkland-review-field > legend {
	display: block;
	margin: 0 0 6px;
	font-weight: 600;
}

.parkland-review-form input[type="text"],
.parkland-review-form input[type="email"],
.parkland-review-form textarea {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	padding: 10px 12px;
}

.parkland-review-form textarea {
	min-height: 125px;
	resize: vertical;
}

.parkland-review-combobox {
	position: relative;
	width: 100%;
}

.parkland-review-product-search {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	padding: 10px 12px;
}

.parkland-review-product-suggestions {
	position: absolute;
	z-index: 9999;
	top: calc(100% + 2px);
	left: 0;
	right: 0;
	max-height: 280px;
	margin: 0;
	padding: 4px 0;
	overflow-y: auto;
	list-style: none;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.18);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.parkland-review-product-suggestion,
.parkland-review-product-no-results {
	margin: 0;
	padding: 9px 12px;
	line-height: 1.35;
}

.parkland-review-product-suggestion {
	cursor: pointer;
}

.parkland-review-product-suggestion:hover,
.parkland-review-product-suggestion.is-active {
	background: rgba(0, 0, 0, 0.06);
}

.parkland-review-stars {
	display: inline-flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 2px;
}

.parkland-review-stars input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.parkland-review-stars label {
	cursor: pointer;
	font-size: 31px;
	line-height: 1;
	color: var(--parkland-review-accent);
}

.parkland-review-stars label::before {
	content: "☆";
}

.parkland-review-stars label:hover::before,
.parkland-review-stars label:hover ~ label::before,
.parkland-review-stars input:checked ~ label::before {
	content: "★";
}

.parkland-review-submit-wrap {
	margin: 0;
}

/* The theme owns the button colour/shape through .button.alt. */
.parkland-review-submit {
	width: auto;
}

.parkland-review-form-notice {
	margin-bottom: 16px;
	padding: 12px 14px;
	border: 1px solid currentColor;
}

.parkland-review-form-notice-success {
	font-weight: 600;
}

/* Overall rating / counter */
.parkland-review-counter-block {
	width: 100%;
}

.parkland-review-counter-heading {
	margin-bottom: 8px;
}

.parkland-review-counter-summary {
	display: flex;
	align-items: center;
	gap: 9px;
	margin-bottom: 2px;
}

.parkland-review-counter-average {
	font-size: 1.2em;
}

.parkland-review-counter-stars {
	display: inline-flex;
	gap: 1px;
	font-size: 22px;
	line-height: 1;
	color: #c9c9c9;
}

.parkland-review-counter-stars .is-filled,
.parkland-review-counter-editor-preview .parkland-review-counter-stars {
	color: var(--parkland-review-accent);
}

.parkland-review-counter-meta {
	margin: 0;
	opacity: .75;
}

.parkland-review-counter-bars {
	display: grid;
	gap: 5px;
}

.parkland-review-counter-row {
	display: grid;
	grid-template-columns: minmax(76px, auto) minmax(80px, 1fr) 44px;
	align-items: center;
	gap: 8px;
}

.parkland-review-counter-label,
.parkland-review-counter-percent {
	font-size: .9em;
	opacity: .72;
}

.parkland-review-counter-percent {
	text-align: right;
}

.parkland-review-counter-track {
	display: block;
	height: 14px;
	background: rgba(127, 127, 127, .13);
	overflow: hidden;
}

.parkland-review-counter-fill {
	display: block;
	height: 100%;
	background: var(--parkland-review-accent);
}

/* Editor previews */
.parkland-review-form-editor-preview,
.parkland-review-counter-editor-preview {
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	padding: 14px;
	border: 1px dashed #a7aaad;
}

.parkland-review-editor-field {
	display: grid;
	gap: 6px;
	margin-bottom: 13px;
}

.parkland-review-editor-field input,
.parkland-review-editor-field textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 8px;
}

.parkland-review-editor-stars {
	font-size: 28px;
	color: var(--parkland-review-accent);
}

@media (max-width: 520px) {
	.parkland-review-counter-row {
		grid-template-columns: 70px minmax(60px, 1fr) 40px;
		gap: 6px;
	}
}


/* Compact overall rating shortcode/block.
 * Deliberately theme-neutral: typography and colour inherit from the
 * surrounding block/theme so this counter can be reused on other pages/sites.
 */
.parkland-review-simple-counter {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .42em;
	width: fit-content;
	max-width: 100%;
	box-sizing: border-box;
	font: inherit;
	color: inherit;
	line-height: inherit;
}

.parkland-review-simple-stars {
	display: inline-block;
	flex: 0 0 auto;
	font: inherit;
	font-size: 1em;
	line-height: 1;
	letter-spacing: .04em;
	color: inherit;
	white-space: nowrap;
}

.parkland-review-simple-text {
	display: inline;
	font: inherit;
	color: inherit;
}

.parkland-review-simple-counter-editor-preview {
	padding: 10px 12px;
	border: 1px dashed #a7aaad;
}

@media (max-width: 420px) {
	.parkland-review-simple-counter {
		gap: .35em;
	}
}


/* Review distribution labels as 5–1 stars. */
.parkland-review-counter-row-stars {
	color: var(--parkland-review-accent);
	opacity: 1;
	letter-spacing: .04em;
	white-space: nowrap;
	line-height: 1;
}

.parkland-review-counter-row {
	grid-template-columns: minmax(88px, auto) minmax(80px, 1fr) 44px;
}


/* v1.3.5: right-align the 5–1 star distribution labels. */
.parkland-review-counter-row-stars {
	display: block;
	width: 100%;
	text-align: right;
	justify-self: stretch;
}


/* v1.3.7: make the adjustable gap exact and immune to theme paragraph margins. */
.parkland-review-counter-block .parkland-review-counter-meta {
	margin-top: 0 !important;
	/* margin-bottom is supplied inline by the block setting. */
}

.parkland-review-counter-block .parkland-review-counter-bars {
	margin-top: 0 !important;
}


/* v1.4.0: theme-neutral Info Box-style review counter.
 * The plugin controls only structure. Typography, colour and sizing inherit
 * from the surrounding theme/block. Add a custom class through the shortcode
 * when page-specific styling is required.
 */
.parkland-review-info-box {
	display: inline-flex;
	align-items: center;
	justify-content: inherit;
	gap: 1em;
	width: 100%;
	box-sizing: border-box;
	font: inherit;
	color: inherit;
	line-height: inherit;
	text-decoration: none !important;
}

.parkland-review-info-box:hover,
.parkland-review-info-box:focus,
.parkland-review-info-box:visited {
	color: inherit;
	text-decoration: none !important;
}

.parkland-review-info-box:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.parkland-review-info-box-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 1.75em;
	height: 1.75em;
	font-size: inherit;
	color: inherit;
}

.parkland-review-info-box-icon svg {
	display: block;
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.parkland-review-info-box-copy {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: .35em;
	min-width: 0;
	text-align: inherit;
	font: inherit;
	color: inherit;
	line-height: inherit;
}

.parkland-review-info-box-rating,
.parkland-review-info-box-count {
	display: block;
	margin: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	line-height: inherit;
}

.parkland-review-info-box-rating {
	font-weight: inherit;
}

@media (max-width: 480px) {
	.parkland-review-info-box {
		gap: .8em;
	}
}



/* v1.4.1: minimal text-only review counter.
 * No icon, no fixed typography, and no forced colour.
 */
.parkland-review-text-counter {
	display: inline-flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: .35em;
	max-width: 100%;
	font: inherit;
	color: inherit;
	line-height: inherit;
}

.parkland-review-text-counter-rating,
.parkland-review-text-counter-count {
	display: inline;
	margin: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	line-height: inherit;
}

.parkland-review-text-counter-rating {
	font-weight: 700;
}
