/* Nachrul Reviews — front-end styles */

:root {
	--nr-accent: #00b67a; /* Trustpilot-style green */
	--nr-accent-dark: #00875a;
	--nr-text: #1a1a1a;
	--nr-muted: #6b6b6b;
	--nr-border: #e5e5e5;
}

.nr-widget {
	max-width: 720px;
	font-family: inherit;
	color: var(--nr-text);
	margin: 3em auto 0;
	padding-top: 2.5em;
	border-top: 1px solid var(--nr-border);
	text-align: left;
}

/* Reset text alignment and font sizing inside the widget so it looks
   consistent regardless of the surrounding theme's typography rules. */
.nr-widget,
.nr-widget p,
.nr-widget div,
.nr-widget span,
.nr-widget label,
.nr-widget li {
	text-align: left;
	font-size: 1rem;
	line-height: 1.5;
}

.nr-widget-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.75em;
	margin-bottom: 1em;
}

.nr-widget-title {
	margin: 0 !important;
	font-size: 1.6rem !important;
	line-height: 1.25 !important;
	font-weight: 700 !important;
}

.nr-no-reviews {
	color: var(--nr-muted);
	font-size: 0.95rem;
	margin: 0.5em 0 1.5em;
}

.nr-write-review-btn {
	background: var(--nr-accent);
	color: #fff;
	border: none;
	padding: 0.65em 1.3em;
	border-radius: 4px;
	font-weight: 600;
	cursor: pointer;
	font-size: 0.95em;
}

.nr-write-review-btn:hover {
	background: var(--nr-accent-dark);
}

/* Summary block */
.nr-summary {
	display: flex;
	flex-wrap: wrap;
	gap: 2em;
	align-items: center;
	border: 1px solid var(--nr-border);
	border-radius: 8px;
	padding: 1.25em 1.5em;
	margin-bottom: 1.5em;
	background: #fafafa;
}

.nr-summary-score {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.15em;
	min-width: 140px;
}

.nr-summary-number {
	font-size: 2.4em;
	font-weight: 800;
	line-height: 1;
}

.nr-summary-stars {
	color: var(--nr-accent);
	font-size: 1.3em;
	letter-spacing: 1px;
}

.nr-summary-count {
	color: var(--nr-muted);
	font-size: 0.9em;
}

.nr-summary-bars {
	flex: 1;
	min-width: 220px;
	display: flex;
	flex-direction: column;
	gap: 0.35em;
}

.nr-bar-row {
	display: flex;
	align-items: center;
	gap: 0.6em;
	font-size: 0.85em;
}

.nr-bar-label {
	width: 2em;
	color: var(--nr-muted);
}

.nr-bar-track {
	flex: 1;
	background: #e5e5e5;
	border-radius: 3px;
	height: 8px;
	overflow: hidden;
}

.nr-bar-fill {
	display: block;
	height: 100%;
	background: var(--nr-accent);
	border-radius: 3px;
}

.nr-bar-count {
	width: 2em;
	text-align: right;
	color: var(--nr-muted);
}

/* Collapsible write-review panel */
.nr-write-review-panel {
	border: 1px solid var(--nr-border);
	border-radius: 8px;
	padding: 1.25em 1.5em;
	margin-bottom: 1.5em;
	background: #fff;
}

.nr-write-review-panel[hidden] {
	display: none;
}

/* Reviewer avatar bubble */
.nr-review-avatar {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	color: #fff;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1em;
}

.nr-review-header-text {
	display: flex;
	flex-direction: column;
	gap: 0.15em;
}

.nr-review-meta-row {
	display: flex;
	align-items: center;
	gap: 0.75em;
}

/* Compact per-product rating badge (replaces native shop/single-product stars) */
.nr-product-rating {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	text-decoration: none;
	margin: 0.4em 0;
}

.nr-product-rating-stars {
	color: var(--nr-accent, #00b67a);
	letter-spacing: 1px;
	font-size: 0.95em;
}

.nr-product-rating-count {
	color: var(--nr-muted, #6b6b6b);
	font-size: 0.85em;
}

.nr-product-rating:hover .nr-product-rating-count {
	text-decoration: underline;
}

.nr-review-form {
	max-width: 520px;
	margin: 0 0 2em;
}

.nr-review-form p {
	margin-bottom: 1em;
}

.nr-review-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35em;
}

.nr-review-form input[type="text"],
.nr-review-form input[type="email"],
.nr-review-form textarea {
	width: 100%;
	padding: 0.6em;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1em;
}

/* Honeypot: hidden from real users, still present in DOM for bots to find */
.nr-honeypot {
	position: absolute !important;
	left: -9999px !important;
	top: -9999px !important;
	height: 0;
	overflow: hidden;
}

.nr-star-picker {
	display: inline-flex;
	flex-direction: row-reverse;
	font-size: 1.6em;
}

.nr-star-picker input {
	display: none;
}

.nr-star-picker label {
	color: #ccc;
	cursor: pointer;
	padding: 0 0.05em;
	font-weight: normal;
}

.nr-star-picker input:checked ~ label,
.nr-star-picker label:hover,
.nr-star-picker label:hover ~ label {
	color: #f5a623;
}

.nr-submit-btn {
	background: #1a1a1a;
	color: #fff;
	border: none;
	padding: 0.75em 1.5em;
	border-radius: 4px;
	cursor: pointer;
	font-size: 1em;
}

.nr-submit-btn:hover {
	background: #333;
}

.nr-notice {
	padding: 0.75em 1em;
	border-radius: 4px;
	margin-bottom: 1em;
}

.nr-notice-success {
	background: #e6f6e9;
	color: #1a7a34;
	border: 1px solid #b6e3c1;
}

.nr-notice-error {
	background: #fdeaea;
	color: #a41818;
	border: 1px solid #f3c1c1;
}

.nr-reviews-list {
	display: flex;
	flex-direction: column;
	gap: 1.25em;
}

.nr-review {
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	padding: 1em 1.25em;
}

.nr-review-header {
	display: flex;
	align-items: flex-start;
	gap: 0.75em;
	margin-bottom: 0.5em;
	flex-wrap: wrap;
}

.nr-review-stars {
	color: #f5a623;
	letter-spacing: 1px;
}

.nr-review-date {
	color: #888;
	font-size: 0.85em;
}

.nr-review-photo img {
	max-width: 220px;
	border-radius: 6px;
	margin-top: 0.75em;
}
