/**
 * RateMate — Public Stylesheet
 * Covers: verified badge, vote buttons, photo upload, rating summary bar
 *
 * @package RateMate
 */

/* =========================================================================
   CSS Design Tokens
   ========================================================================= */
:root {
	--rf-purple:        #5b4fff;
	--rf-purple-light:  #ede9ff;
	--rf-teal:          #0ea5a0;
	--rf-teal-light:    #e0f7f6;
	--rf-star:          #f59e0b;
	--rf-star-empty:    #d1d5db;
	--rf-green:         #16a34a;
	--rf-green-light:   #dcfce7;
	--rf-red:           #dc2626;
	--rf-red-light:     #fee2e2;
	--rf-text:          #111827;
	--rf-text-muted:    #6b7280;
	--rf-border:        #e5e7eb;
	--rf-surface:       #f9fafb;
	--rf-radius-sm:     4px;
	--rf-radius:        8px;
	--rf-radius-lg:     12px;
	--rf-shadow:        0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
	--rf-transition:    150ms ease;
}

/* =========================================================================
   Verified Purchase Badge
   ========================================================================= */
.rf-verified-badge {
	display:      inline-flex;
	align-items:  center;
	gap:          4px;
	font-size:    11px;
	font-weight:  500;
	color:        var(--rf-green);
	background:   var(--rf-green-light);
	border:       1px solid rgba(22,163,74,.2);
	border-radius: var(--rf-radius-sm);
	padding:      2px 7px;
	margin-left:  8px;
	vertical-align: middle;
	white-space:  nowrap;
	letter-spacing: .01em;
}

.rf-verified-badge svg {
	flex-shrink: 0;
}

/* =========================================================================
   Helpfulness Vote Buttons
   ========================================================================= */
.rf-vote-wrap {
	display:     flex;
	align-items: center;
	flex-wrap:   wrap;
	gap:         8px;
	margin-top:  14px;
	padding-top: 12px;
	border-top:  1px solid var(--rf-border);
}

.rf-vote-label {
	font-size:  12px;
	color:      var(--rf-text-muted);
	margin-right: 2px;
}

.rf-vote-btn {
	display:         inline-flex;
	align-items:     center;
	gap:             5px;
	padding:         5px 11px;
	font-size:       12px;
	font-weight:     500;
	color:           var(--rf-text-muted);
	background:      transparent;
	border:          1px solid var(--rf-border);
	border-radius:   var(--rf-radius-sm);
	cursor:          pointer;
	transition:      all var(--rf-transition);
	line-height:     1;
}

.rf-vote-btn:hover {
	border-color: var(--rf-purple);
	color:        var(--rf-purple);
	background:   var(--rf-purple-light);
}

.rf-vote-btn:focus-visible {
	outline:        2px solid var(--rf-purple);
	outline-offset: 2px;
}

.rf-vote-btn.rf-voted-yes,
.rf-vote-btn.rf-vote-yes.active {
	color:        var(--rf-green);
	border-color: var(--rf-green);
	background:   var(--rf-green-light);
}

.rf-vote-btn.rf-voted-no,
.rf-vote-btn.rf-vote-no.active {
	color:        var(--rf-red);
	border-color: var(--rf-red);
	background:   var(--rf-red-light);
}

.rf-vote-btn:disabled {
	opacity:      .5;
	cursor:       not-allowed;
	pointer-events: none;
}

.rf-vote-count {
	font-variant-numeric: tabular-nums;
}

.rf-vote-summary {
	font-size:   11px;
	color:       var(--rf-text-muted);
	font-style:  italic;
}

/* =========================================================================
   Photo / Video Upload — Dropzone
   ========================================================================= */
.comment-form-rf-upload {
	margin-top: 16px;
}

.rf-upload-label {
	display:      block;
	font-size:    14px;
	font-weight:  600;
	color:        var(--rf-text);
	margin-bottom: 6px;
}

.rf-upload-hint {
	display:     block;
	font-size:   12px;
	font-weight: 400;
	color:       var(--rf-text-muted);
	margin-top:  2px;
}

.rf-dropzone {
	display:          flex;
	flex-direction:   column;
	align-items:      center;
	justify-content:  center;
	gap:              8px;
	padding:          28px 20px;
	border:           2px dashed var(--rf-border);
	border-radius:    var(--rf-radius-lg);
	background:       var(--rf-surface);
	color:            var(--rf-text-muted);
	font-size:        13px;
	cursor:           pointer;
	transition:       all var(--rf-transition);
	text-align:       center;
}

.rf-dropzone:hover,
.rf-dropzone.rf-drag-over {
	border-color: var(--rf-purple);
	background:   var(--rf-purple-light);
	color:        var(--rf-purple);
}

.rf-dropzone:focus-visible {
	outline:        2px solid var(--rf-purple);
	outline-offset: 2px;
}

.rf-dropzone svg {
	opacity: .6;
}

.rf-dropzone:hover svg,
.rf-dropzone.rf-drag-over svg {
	opacity: 1;
}

/* Preview grid */
.rf-preview-grid {
	display:               grid;
	grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
	gap:                   8px;
	margin-top:            12px;
}

.rf-preview-item {
	position:      relative;
	border-radius: var(--rf-radius);
	overflow:      hidden;
	aspect-ratio:  1;
	background:    var(--rf-border);
}

.rf-preview-item img,
.rf-preview-item video {
	width:       100%;
	height:      100%;
	object-fit:  cover;
	display:     block;
}

.rf-preview-remove {
	position:   absolute;
	top:        4px;
	right:      4px;
	width:      20px;
	height:     20px;
	border:     none;
	border-radius: 50%;
	background: rgba(0,0,0,.6);
	color:      #fff;
	cursor:     pointer;
	display:    flex;
	align-items: center;
	justify-content: center;
	font-size:  12px;
	line-height: 1;
	padding:    0;
	transition: background var(--rf-transition);
}

.rf-preview-remove:hover {
	background: var(--rf-red);
}

.rf-preview-uploading::after {
	content:    '';
	position:   absolute;
	inset:      0;
	background: rgba(255,255,255,.6);
}

.rf-preview-progress {
	position:  absolute;
	bottom:    0;
	left:      0;
	right:     0;
	height:    3px;
	background: var(--rf-border);
}

.rf-preview-progress-fill {
	height:     100%;
	background: var(--rf-purple);
	transition: width .2s ease;
}

/* Upload error notice */
.rf-upload-error {
	margin-top:   8px;
	padding:      8px 12px;
	background:   var(--rf-red-light);
	border:       1px solid rgba(220,38,38,.2);
	border-radius: var(--rf-radius-sm);
	font-size:    12px;
	color:        var(--rf-red);
}

/* =========================================================================
   Review Media Gallery (display)
   ========================================================================= */
.rf-media-gallery {
	display:               grid;
	grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
	gap:                   8px;
	margin-top:            12px;
}

.rf-media-item {
	border-radius: var(--rf-radius);
	overflow:      hidden;
	aspect-ratio:  1;
	background:    var(--rf-surface);
}

.rf-media-thumb {
	width:       100%;
	height:      100%;
	object-fit:  cover;
	display:     block;
	transition:  transform var(--rf-transition);
}

.rf-media-link {
	display: block;
	width:   100%;
	height:  100%;
}

.rf-media-link:hover .rf-media-thumb {
	transform: scale(1.04);
}

.rf-media-video {
	width:       100%;
	height:      100%;
	object-fit:  cover;
	border:      none;
}

/* =========================================================================
   Rating Summary Bar
   ========================================================================= */
.rf-summary-bar {
	display:         flex;
	align-items:     flex-start;
	flex-wrap:       wrap;
	gap:             24px;
	padding:         20px 24px;
	background:      var(--rf-surface);
	border:          1px solid var(--rf-border);
	border-radius:   var(--rf-radius-lg);
	margin-bottom:   24px;
	box-shadow:      var(--rf-shadow);
}

/* Overall score column */
.rf-summary-overall {
	display:         flex;
	flex-direction:  column;
	align-items:     center;
	justify-content: center;
	gap:             4px;
	min-width:       80px;
}

.rf-avg-score {
	font-size:   40px;
	font-weight: 700;
	color:       var(--rf-text);
	line-height: 1;
}

.rf-avg-stars {
	display:     flex;
	gap:         1px;
}

.rf-star {
	color:     var(--rf-star-empty);
	font-size: 18px;
}

.rf-star--filled {
	color: var(--rf-star);
}

.rf-star--half {
	/* Simple half-star via gradient trick */
	background:  linear-gradient(90deg, var(--rf-star) 50%, var(--rf-star-empty) 50%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip:         text;
}

.rf-total-count {
	font-size:  12px;
	color:      var(--rf-text-muted);
	margin-top: 2px;
	white-space: nowrap;
}

/* Breakdown rows */
.rf-summary-breakdown {
	display:        flex;
	flex-direction: column;
	gap:            5px;
	flex:           1;
	min-width:      200px;
}

.rf-summary-row {
	display:      grid;
	grid-template-columns: 52px 1fr 32px;
	align-items:  center;
	gap:          8px;
	padding:      5px 8px;
	background:   transparent;
	border:       1px solid transparent;
	border-radius: var(--rf-radius-sm);
	cursor:       pointer;
	transition:   all var(--rf-transition);
	text-align:   left;
	width:        100%;
}

.rf-summary-row:hover:not(:disabled) {
	background:   var(--rf-purple-light);
	border-color: var(--rf-purple);
}

.rf-summary-row.rf-active {
	background:   var(--rf-purple-light);
	border-color: var(--rf-purple);
}

.rf-summary-row:focus-visible {
	outline:        2px solid var(--rf-purple);
	outline-offset: 2px;
}

.rf-summary-row--empty {
	opacity: .45;
	cursor:  default;
}

.rf-summary-stars {
	font-size:   12px;
	color:       var(--rf-text-muted);
	white-space: nowrap;
}

.rf-summary-bar-track {
	display:       block;
	height:        6px;
	background:    var(--rf-border);
	border-radius: 3px;
	overflow:      hidden;
}

.rf-summary-bar-fill {
	display:       block;
	height:        100%;
	background:    var(--rf-star);
	border-radius: 3px;
	transition:    width .3s ease;
}

.rf-summary-count {
	font-size:   12px;
	color:       var(--rf-text-muted);
	text-align:  right;
	font-variant-numeric: tabular-nums;
}

/* Clear filter button */
.rf-summary-clear {
	font-size:    12px;
	color:        var(--rf-purple);
	background:   transparent;
	border:       none;
	cursor:       pointer;
	padding:      0;
	text-decoration: underline;
	align-self:   center;
}

.rf-summary-clear:hover {
	opacity: .8;
}

/* Filtered reviews state */
.rf-reviews-filtered .woocommerce-Reviews-title {
	display: none;
}

.rf-filter-notice {
	display:       flex;
	align-items:   center;
	gap:           8px;
	font-size:     13px;
	color:         var(--rf-purple);
	background:    var(--rf-purple-light);
	border:        1px solid rgba(91,79,255,.2);
	border-radius: var(--rf-radius-sm);
	padding:       8px 12px;
	margin-bottom: 16px;
}

/* No reviews message */
.rf-no-reviews {
	color:     var(--rf-text-muted);
	font-style: italic;
	padding:   16px 0;
}

/* =========================================================================
   Loading spinner (AJAX states)
   ========================================================================= */
.rf-loading {
	display:         flex;
	justify-content: center;
	padding:         24px;
}

.rf-spinner {
	width:         24px;
	height:        24px;
	border:        3px solid var(--rf-border);
	border-top-color: var(--rf-purple);
	border-radius: 50%;
	animation:     rf-spin .7s linear infinite;
}

@keyframes rf-spin {
	to { transform: rotate(360deg); }
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 600px) {
	.rf-summary-bar {
		flex-direction: column;
		padding:        16px;
		gap:            16px;
	}

	.rf-summary-overall {
		flex-direction: row;
		gap:            12px;
	}

	.rf-avg-score {
		font-size: 32px;
	}

	.rf-media-gallery,
	.rf-preview-grid {
		grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
	}
}

/* =========================================================================
   Phase 2 — Sort & Filter Bar
   ========================================================================= */
.rf-sort-bar {
	display:        flex;
	align-items:    center;
	flex-wrap:      wrap;
	gap:            12px;
	padding:        12px 16px;
	background:     var(--rf-surface, #fff);
	border:         1px solid var(--rf-border, #e5e7eb);
	border-radius:  var(--rf-radius, 8px);
	margin-bottom:  16px;
	position:       relative;
}

.rf-sort-left {
	display:     flex;
	align-items: center;
	gap:         8px;
}

.rf-sort-right {
	display:     flex;
	align-items: center;
	margin-left: auto;
}

.rf-sort-label {
	font-size:   13px;
	color:       var(--rf-text-muted, #6b7280);
	white-space: nowrap;
}

/* Select wrapper */
.rf-select-wrap {
	position: relative;
	display:  inline-flex;
	align-items: center;
}

.rf-sort-select {
	appearance:       none;
	font-size:        13px;
	padding:          6px 30px 6px 10px;
	border:           1px solid var(--rf-border, #e5e7eb);
	border-radius:    var(--rf-radius-sm, 4px);
	background:       var(--rf-surface, #fff);
	color:            var(--rf-text, #111827);
	cursor:           pointer;
	transition:       border-color 0.15s;
	min-width:        130px;
}

.rf-sort-select:focus {
	outline:      none;
	border-color: var(--rf-purple, #5b4fff);
	box-shadow:   0 0 0 2px var(--rf-purple-light, #ede9ff);
}

.rf-select-chevron {
	position:       absolute;
	right:          8px;
	pointer-events: none;
	color:          var(--rf-text-muted, #6b7280);
}

/* Photo filter label */
.rf-photo-filter-label {
	display:     inline-flex;
	align-items: center;
	gap:         5px;
	font-size:   13px;
	color:       var(--rf-text-muted, #6b7280);
	cursor:      pointer;
	user-select: none;
	padding:     5px 10px;
	border:      1px solid var(--rf-border, #e5e7eb);
	border-radius: var(--rf-radius-sm, 4px);
	transition:  all 0.15s;
}

.rf-photo-filter-label:hover {
	border-color: var(--rf-purple, #5b4fff);
	color:        var(--rf-purple, #5b4fff);
}

.rf-photo-only-check {
	position:     absolute;
	opacity:      0;
	width:        0;
	height:       0;
}

.rf-photo-filter-label:has(.rf-photo-only-check:checked) {
	background:   var(--rf-purple-light, #ede9ff);
	border-color: var(--rf-purple, #5b4fff);
	color:        var(--rf-purple, #5b4fff);
}

.rf-photo-filter-icon {
	display:     flex;
	align-items: center;
}

/* Spinner inside sort bar */
.rf-sort-spinner {
	display:    none;
	margin-left: auto;
}

.rf-sort-bar.rf-loading .rf-sort-spinner {
	display: flex;
}

/* =========================================================================
   Phase 2 — Store Owner Reply
   ========================================================================= */
.rf-owner-reply {
	margin-top:    14px;
	padding:       12px 14px;
	background:    var(--rf-purple-light, #ede9ff);
	border-left:   3px solid var(--rf-purple, #5b4fff);
	border-radius: 0 var(--rf-radius, 8px) var(--rf-radius, 8px) 0;
}

.rf-owner-reply-header {
	display:     flex;
	align-items: center;
	gap:         6px;
	margin-bottom: 6px;
}

.rf-owner-reply-header svg {
	color:       var(--rf-purple, #5b4fff);
	flex-shrink: 0;
}

.rf-owner-reply-label {
	font-size:   12px;
	font-weight: 600;
	color:       var(--rf-purple, #5b4fff);
}

.rf-owner-reply-date {
	font-size:  11px;
	color:      var(--rf-text-muted, #6b7280);
	margin-left: auto;
}

.rf-owner-reply-text {
	font-size:   13px;
	color:       var(--rf-text, #111827);
	line-height: 1.55;
}

.rf-owner-reply-text p {
	margin: 0 0 6px;
}

.rf-owner-reply-text p:last-child {
	margin-bottom: 0;
}

/* Reply form (frontend toggle) */
.rf-reply-form-wrap {
	margin-top: 10px;
}

.rf-reply-toggle {
	display:      inline-flex;
	align-items:  center;
	gap:          5px;
	font-size:    12px;
	color:        var(--rf-purple, #5b4fff);
	background:   transparent;
	border:       1px solid var(--rf-purple-border, rgba(91,79,255,.2));
	border-radius: var(--rf-radius-sm, 4px);
	padding:      5px 10px;
	cursor:       pointer;
	transition:   all 0.15s;
}

.rf-reply-toggle:hover {
	background: var(--rf-purple-light, #ede9ff);
}

.rf-reply-form {
	margin-top: 8px;
}

.rf-reply-text {
	width:         100%;
	font-size:     13px;
	padding:       8px 10px;
	border:        1px solid var(--rf-border, #e5e7eb);
	border-radius: var(--rf-radius-sm, 4px);
	resize:        vertical;
	min-height:    72px;
	transition:    border-color 0.15s;
	font-family:   inherit;
}

.rf-reply-text:focus {
	outline:      none;
	border-color: var(--rf-purple, #5b4fff);
	box-shadow:   0 0 0 2px var(--rf-purple-light, #ede9ff);
}

.rf-reply-actions {
	display:     flex;
	align-items: center;
	gap:         8px;
	margin-top:  6px;
}

.rf-reply-cancel {
	font-size:   12px;
	color:       var(--rf-text-muted, #6b7280);
	background:  transparent;
	border:      none;
	cursor:      pointer;
	padding:     0;
}

.rf-reply-cancel:hover {
	color: var(--rf-text, #111827);
}

/* Small button variant */
.rf-btn--small {
	font-size: 12px !important;
	padding:   5px 12px !important;
}

/* =========================================================================
   Phase 3 — Product Q&A Module
   ========================================================================= */
.rf-qa-wrap {
	margin-top: 16px;
}

.rf-qa-header {
	display:         flex;
	align-items:     center;
	justify-content: space-between;
	gap:             12px;
	margin-bottom:   20px;
	flex-wrap:       wrap;
}

.rf-qa-title {
	font-size:   20px !important;
	font-weight: 500 !important;
	color:       var(--rf-text, #111827) !important;
	display:     flex !important;
	align-items: center !important;
	gap:         8px !important;
	margin:      0 !important;
}

.rf-qa-count {
	display:       inline-flex;
	align-items:   center;
	justify-content: center;
	font-size:     13px;
	font-weight:   500;
	background:    var(--rf-purple-light, #ede9ff);
	color:         var(--rf-purple, #5b4fff);
	border-radius: 20px;
	padding:       2px 10px;
	min-width:     28px;
}

/* Ask form */
.rf-ask-form-wrap {
	background:    var(--rf-surface, #fff);
	border:        1px solid var(--rf-border, #e5e7eb);
	border-radius: var(--rf-radius-lg, 12px);
	margin-bottom: 20px;
	overflow:      hidden;
}

.rf-ask-form {
	padding: 16px 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.rf-ask-guest-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.rf-qa-input {
	width:         100%;
	font-size:     13px;
	padding:       8px 12px;
	border:        1px solid var(--rf-border, #e5e7eb);
	border-radius: var(--rf-radius-sm, 4px);
	background:    var(--rf-surface, #fff);
	color:         var(--rf-text, #111827);
	transition:    border-color 0.15s;
}

.rf-qa-textarea {
	width:         100%;
	font-size:     13px;
	padding:       8px 12px;
	border:        1px solid var(--rf-border, #e5e7eb);
	border-radius: var(--rf-radius-sm, 4px);
	background:    var(--rf-surface, #fff);
	color:         var(--rf-text, #111827);
	resize:        vertical;
	min-height:    80px;
	font-family:   inherit;
	transition:    border-color 0.15s;
}

.rf-qa-input:focus,
.rf-qa-textarea:focus {
	outline:      none;
	border-color: var(--rf-purple, #5b4fff);
	box-shadow:   0 0 0 2px var(--rf-purple-light, #ede9ff);
}

.rf-ask-footer {
	display:         flex;
	align-items:     center;
	justify-content: space-between;
	gap:             10px;
}

.rf-ask-note {
	font-size:  12px;
	color:      var(--rf-text-muted, #6b7280);
	margin:     0;
	font-style: italic;
}

/* Questions list */
.rf-question {
	padding:       18px 0;
	border-bottom: 1px solid var(--rf-border, #e5e7eb);
}

.rf-question:last-of-type {
	border-bottom: none;
}

.rf-question-body {
	display: flex;
	gap:     12px;
	align-items: flex-start;
}

.rf-q-icon, .rf-a-icon {
	width:            28px;
	height:           28px;
	border-radius:    50%;
	display:          flex;
	align-items:      center;
	justify-content:  center;
	font-size:        12px;
	font-weight:      700;
	flex-shrink:      0;
}

.rf-q-icon {
	background: var(--rf-purple-light, #ede9ff);
	color:      var(--rf-purple, #5b4fff);
}

.rf-a-icon {
	background: var(--rf-surface, #f9fafb);
	color:      var(--rf-text-muted, #6b7280);
	border:     1px solid var(--rf-border, #e5e7eb);
}

.rf-a-icon--owner {
	background: var(--rf-teal-light, #e0f7f6);
	color:      var(--rf-teal, #0ea5a0);
}

.rf-q-content {
	flex: 1;
	min-width: 0;
}

.rf-q-text {
	font-size:   14px;
	font-weight: 500;
	color:       var(--rf-text, #111827);
	line-height: 1.5;
	margin-bottom: 5px;
}

.rf-q-meta, .rf-a-meta {
	display:     flex;
	align-items: center;
	flex-wrap:   wrap;
	gap:         8px;
	font-size:   12px;
	color:       var(--rf-text-muted, #6b7280);
}

.rf-q-author, .rf-a-author {
	font-weight: 500;
	color:       var(--rf-text-secondary, #374151);
}

/* Answers */
.rf-answers-list {
	margin:     10px 0 0 40px;
	display:    flex;
	flex-direction: column;
	gap:        10px;
}

.rf-answer {
	display:       flex;
	gap:           10px;
	align-items:   flex-start;
	padding:       10px 12px;
	background:    var(--rf-surface-alt, #f9fafb);
	border-radius: var(--rf-radius, 8px);
	border:        1px solid var(--rf-border, #e5e7eb);
}

.rf-answer--owner {
	background:   var(--rf-teal-light, #e0f7f6);
	border-color: rgba(14,165,160,.2);
}

.rf-a-content {
	flex: 1;
	min-width: 0;
}

.rf-a-text {
	font-size:   13px;
	color:       var(--rf-text, #111827);
	line-height: 1.5;
}

.rf-a-text p { margin: 0 0 4px; }
.rf-a-text p:last-child { margin: 0; }

/* Answer vote button */
.rf-answer-vote {
	display:     inline-flex;
	align-items: center;
	gap:         4px;
	font-size:   12px;
	color:       var(--rf-text-muted, #6b7280);
	background:  transparent;
	border:      none;
	cursor:      pointer;
	padding:     0;
	transition:  color 0.15s;
}

.rf-answer-vote:hover { color: var(--rf-purple, #5b4fff); }
.rf-answer-vote.rf-voted { color: var(--rf-purple, #5b4fff); pointer-events: none; }

/* Add answer form */
.rf-add-answer-wrap {
	margin: 12px 0 0 40px;
}

.rf-add-answer-toggle {
	font-size:   12px;
	color:       var(--rf-purple, #5b4fff);
	background:  transparent;
	border:      none;
	cursor:      pointer;
	padding:     0;
	text-decoration: underline;
}

.rf-add-answer-form {
	margin-top: 8px;
	display:    flex;
	flex-direction: column;
	gap:        6px;
}

/* Q&A admin moderation */
.rf-qa-admin-trash {
	font-size:   11px;
	color:       var(--rf-red, #dc2626);
	background:  transparent;
	border:      none;
	cursor:      pointer;
	padding:     0;
	text-decoration: underline;
}

/* Load more */
.rf-load-more-btn {
	display:       block;
	width:         100%;
	margin-top:    16px;
	padding:       10px;
	font-size:     13px;
	color:         var(--rf-purple, #5b4fff);
	background:    var(--rf-purple-light, #ede9ff);
	border:        1px solid var(--rf-purple-border, rgba(91,79,255,.2));
	border-radius: var(--rf-radius, 8px);
	cursor:        pointer;
	text-align:    center;
	transition:    background 0.15s;
}

.rf-load-more-btn:hover { background: #ddd6ff; }

/* Empty state */
.rf-qa-empty {
	display:         flex;
	flex-direction:  column;
	align-items:     center;
	padding:         40px 24px;
	color:           var(--rf-text-muted, #6b7280);
	gap:             10px;
}

.rf-qa-empty p { font-size: 14px; margin: 0; }

@media (max-width: 600px) {
	.rf-ask-guest-fields { grid-template-columns: 1fr; }
	.rf-answers-list, .rf-add-answer-wrap { margin-left: 12px; }
}

/* =========================================================================
   Feature 2 — Recommendation form field
   ========================================================================= */
.rf-recommendation-wrap {
	margin: 14px 0;
}

.rf-recommendation-label {
	display:     block;
	font-size:   14px;
	font-weight: 600;
	color:       var(--rf-text, #111827);
	margin-bottom: 10px;
}

.rf-recommendation-options {
	display: flex;
	gap:     10px;
	flex-wrap: wrap;
}

.rf-rec-option {
	display:       flex;
	align-items:   center;
	gap:           7px;
	padding:       9px 16px;
	border:        1px solid var(--rf-border, #e5e7eb);
	border-radius: var(--rf-radius, 8px);
	cursor:        pointer;
	transition:    all 0.15s;
	user-select:   none;
	font-size:     13px;
	color:         var(--rf-text-muted, #6b7280);
	background:    var(--rf-surface, #fff);
}

.rf-rec-option input[type="radio"] {
	display: none;
}

.rf-rec-option:hover {
	border-color: var(--rf-purple, #5b4fff);
	color:        var(--rf-text, #111827);
}

.rf-rec-option:has(input:checked) {
	border-color: var(--rf-purple, #5b4fff);
	background:   var(--rf-purple-light, #ede9ff);
	color:        var(--rf-purple, #5b4fff);
	font-weight:  500;
}

.rf-rec-option--yes:has(input:checked)     { border-color: #16a34a; background: #dcfce7; color: #16a34a; }
.rf-rec-option--neutral:has(input:checked) { border-color: #d97706; background: #fef3c7; color: #d97706; }
.rf-rec-option--no:has(input:checked)      { border-color: #dc2626; background: #fee2e2; color: #dc2626; }

.rf-rec-icon { font-size: 16px; line-height: 1; }
.rf-rec-text { font-size: 13px; }

/* Recommendation badge on individual reviews */
.rf-rec-badge {
	display:       inline-flex;
	align-items:   center;
	gap:           5px;
	font-size:     12px;
	font-weight:   500;
	padding:       4px 10px;
	border-radius: var(--rf-radius-sm, 4px);
	margin-top:    10px;
}

.rf-rec-badge--yes     { background: #dcfce7; color: #16a34a; }
.rf-rec-badge--neutral { background: #fef3c7; color: #d97706; }
.rf-rec-badge--no      { background: #fee2e2; color: #dc2626; }

/* Overall recommendation score bar */
.rf-rec-summary {
	display:       flex;
	align-items:   center;
	flex-wrap:     wrap;
	gap:           24px;
	padding:       18px 22px;
	background:    var(--rf-surface, #fff);
	border:        1px solid var(--rf-border, #e5e7eb);
	border-radius: var(--rf-radius-lg, 12px);
	margin-bottom: 16px;
}

.rf-rec-summary-score {
	display:        flex;
	flex-direction: column;
	align-items:    center;
	min-width:      80px;
}

.rf-rec-pct {
	font-size:   36px;
	font-weight: 700;
	color:       #16a34a;
	line-height: 1;
}

.rf-rec-pct-label {
	font-size:  11px;
	color:      var(--rf-text-muted, #6b7280);
	text-align: center;
	margin-top: 4px;
	max-width:  90px;
	line-height: 1.3;
}

.rf-rec-summary-bars {
	flex:    1;
	min-width: 200px;
	display: flex;
	flex-direction: column;
	gap:     6px;
}

.rf-rec-bar-row {
	display:     grid;
	grid-template-columns: 110px 1fr 32px;
	align-items: center;
	gap:         8px;
}

.rf-rec-bar-label {
	font-size:  12px;
	color:      var(--rf-text-muted, #6b7280);
	white-space: nowrap;
}

.rf-rec-bar-track {
	height:        6px;
	background:    var(--rf-border, #e5e7eb);
	border-radius: 3px;
	overflow:      hidden;
}

.rf-rec-bar-fill {
	height:        100%;
	border-radius: 3px;
	transition:    width .4s ease;
}

.rf-rec-bar--yes     { background: #16a34a; }
.rf-rec-bar--neutral { background: #d97706; }
.rf-rec-bar--no      { background: #dc2626; }

.rf-rec-bar-count {
	font-size:  12px;
	color:      var(--rf-text-muted, #6b7280);
	text-align: right;
}

/* =========================================================================
   Feature 3 — Review title field + display
   ========================================================================= */
.rf-title-wrap {
	margin-bottom: 10px;
}

.rf-title-wrap label {
	display:     block;
	font-size:   14px;
	font-weight: 600;
	color:       var(--rf-text, #111827);
	margin-bottom: 5px;
}

.rf-title-wrap label .optional {
	font-weight: 400;
	font-size:   12px;
	color:       var(--rf-text-muted, #6b7280);
}

.rf-title-input {
	width:         100%;
	font-size:     14px;
	padding:       8px 12px;
	border:        1px solid var(--rf-border, #e5e7eb);
	border-radius: var(--rf-radius-sm, 4px);
	background:    var(--rf-surface, #fff);
	color:         var(--rf-text, #111827);
	transition:    border-color .15s;
}

.rf-title-input:focus {
	outline:      none;
	border-color: var(--rf-purple, #5b4fff);
	box-shadow:   0 0 0 2px var(--rf-purple-light, #ede9ff);
}

/* Review title in display */
.rf-review-title {
	font-size:    15px;
	font-weight:  600;
	color:        var(--rf-text, #111827);
	margin:       0 0 6px;
	line-height:  1.35;
}

/* =========================================================================
   Feature 4 — Character counter
   ========================================================================= */
.rf-char-counter-wrap {
	display:     flex;
	align-items: center;
	gap:         4px;
	font-size:   12px;
	color:       var(--rf-text-muted, #6b7280);
	margin-top:  5px;
}

.rf-char-count {
	font-weight: 600;
	color:       var(--rf-text, #111827);
	min-width:   24px;
	text-align:  right;
}

.rf-char-status {
	margin-left: 6px;
	font-weight: 500;
}

.rf-char-status--short { color: var(--rf-red,   #dc2626); }
.rf-char-status--ok    { color: var(--rf-green,  #16a34a); }

@media (max-width: 600px) {
	.rf-recommendation-options { flex-direction: column; }
	.rf-rec-summary { flex-direction: column; align-items: flex-start; }
}
