/**
 * Smart MFO Sync — Reviews block styles.
 * Mobile-first.
 */

.smfo-reviews {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	padding: 24px;
	margin: 32px 0;
}

/* ============ HEADER ============ */

.smfo-reviews-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid #e5e7eb;
	margin-bottom: 20px;
}

.smfo-reviews-rating-summary {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.smfo-rating-big {
	font-size: 0;
	line-height: 1;
}

.smfo-rating-num {
	font-size: 48px;
	font-weight: 800;
	color: #15803d;
	line-height: 1;
}

.smfo-rating-max {
	font-size: 18px;
	color: #6b7280;
	font-weight: 500;
}

.smfo-rating-stars {
	font-size: 22px;
	letter-spacing: 1px;
}

.smfo-star-on { color: #f59e0b; }
.smfo-star-off { color: #d1d5db; }

.smfo-rating-count {
	font-size: 14px;
	color: #4b5563;
}

.smfo-write-review-btn {
	background: #2271b1;
	color: #fff;
	border: none;
	font-size: 14px;
	font-weight: 600;
	padding: 12px 22px;
	border-radius: 10px;
	cursor: pointer;
	transition: background 0.15s;
}

.smfo-write-review-btn:hover {
	background: #1e5a92;
}

/* ============ FORM ============ */

.smfo-review-form {
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 20px;
	margin-bottom: 24px;
}

.smfo-review-form h3 {
	margin: 0 0 16px;
	font-size: 18px;
	font-weight: 700;
}

.smfo-form-row {
	margin-bottom: 14px;
}

.smfo-form-row label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	margin-bottom: 6px;
}

.smfo-form-row label small {
	color: #9ca3af;
	font-weight: 400;
}

.smfo-form-row input[type="text"],
.smfo-form-row input[type="email"],
.smfo-form-row select,
.smfo-form-row textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1.5px solid #d1d5db;
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	background: #fff;
	transition: border-color 0.15s;
}

.smfo-form-row input:focus,
.smfo-form-row select:focus,
.smfo-form-row textarea:focus {
	border-color: #2271b1;
	outline: none;
}

.smfo-form-row textarea {
	resize: vertical;
	min-height: 80px;
}

.smfo-form-row small {
	display: block;
	color: #6b7280;
	font-size: 11px;
	margin-top: 4px;
}

/* Rating input (interactive stars) */

.smfo-rating-input {
	display: flex;
	gap: 4px;
}

.smfo-rating-star {
	background: none;
	border: none;
	font-size: 32px;
	color: #d1d5db;
	cursor: pointer;
	padding: 0;
	transition: color 0.1s, transform 0.1s;
}

.smfo-rating-star:hover {
	transform: scale(1.1);
}

.smfo-rating-star.smfo-rating-active,
.smfo-rating-star.smfo-rating-hover {
	color: #f59e0b;
}

/* Recommends radio */

.smfo-recommends-input {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}

.smfo-recommends-input label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	margin-bottom: 0;
}

.smfo-recommends-input input[type="radio"] {
	margin: 0;
}

/* Form buttons */

.smfo-submit-btn {
	background: #15803d;
	color: #fff;
	border: none;
	font-size: 14px;
	font-weight: 600;
	padding: 12px 22px;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s;
}

.smfo-submit-btn:hover { background: #166534; }
.smfo-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.smfo-cancel-btn {
	background: transparent;
	color: #6b7280;
	border: 1.5px solid #d1d5db;
	font-size: 14px;
	font-weight: 500;
	padding: 12px 22px;
	border-radius: 8px;
	cursor: pointer;
	margin-left: 8px;
}

.smfo-form-hint {
	font-size: 12px;
	color: #92400e;
	background: #fef3c7;
	padding: 8px 12px;
	border-radius: 6px;
	margin-top: 12px;
}

.smfo-form-result {
	margin-top: 12px;
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 13px;
}

.smfo-form-result.smfo-success {
	background: #dcfce7;
	color: #166534;
	border: 1px solid #86efac;
}

.smfo-form-result.smfo-error {
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #fca5a5;
}

/* ============ FILTERS / SORT ============ */

.smfo-reviews-filters,
.smfo-reviews-sort {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
	margin-bottom: 16px;
}

.smfo-reviews-sort > span {
	font-size: 13px;
	color: #6b7280;
	margin-right: 4px;
}

.smfo-rev-filter,
.smfo-rev-sort {
	background: #fff;
	border: 1.5px solid #d1d5db;
	border-radius: 20px;
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 500;
	color: #374151;
	cursor: pointer;
	transition: all 0.15s;
}

.smfo-rev-filter:hover,
.smfo-rev-sort:hover {
	border-color: #2271b1;
	color: #2271b1;
}

.smfo-rev-filter.smfo-active,
.smfo-rev-sort.smfo-active {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

/* ============ LIST ============ */

.smfo-reviews-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.smfo-review-item {
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 16px 18px;
	background: #fff;
}

.smfo-review-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.smfo-review-author {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.smfo-review-author strong {
	font-size: 14px;
	font-weight: 700;
	color: #111827;
}

.smfo-badge-user {
	background: #dcfce7;
	color: #166534;
	font-size: 10px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 10px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.smfo-badge-editor {
	background: #dbeafe;
	color: #1e40af;
	font-size: 10px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 10px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.smfo-review-date {
	font-size: 12px;
	color: #6b7280;
	margin-left: auto;
}

.smfo-review-rating {
	margin-bottom: 8px;
	font-size: 16px;
}

.smfo-recommends-yes,
.smfo-recommends-no {
	font-size: 12px;
	margin-left: 6px;
	padding: 2px 8px;
	border-radius: 8px;
}

.smfo-recommends-yes {
	background: #dcfce7;
	color: #166534;
}

.smfo-recommends-no {
	background: #fee2e2;
	color: #991b1b;
}

.smfo-review-text {
	font-size: 14px;
	line-height: 1.6;
	color: #374151;
	white-space: pre-wrap;
}

/* Replies */

.smfo-review-replies {
	margin-top: 14px;
	padding-left: 14px;
	border-left: 3px solid #dbeafe;
}

.smfo-review-reply {
	background: #f9fafb;
	border-radius: 8px;
	padding: 10px 14px;
	margin-top: 8px;
}

.smfo-review-reply .smfo-review-head {
	margin-bottom: 4px;
}

.smfo-review-reply .smfo-review-text {
	font-size: 13px;
}

/* ============ NO REVIEWS / LOAD MORE ============ */

.smfo-no-reviews {
	text-align: center;
	padding: 40px 20px;
	color: #6b7280;
	background: #f9fafb;
	border-radius: 12px;
}

.smfo-reviews-loadmore-wrap {
	text-align: center;
	margin-top: 20px;
}

.smfo-reviews-loadmore {
	background: #fff;
	border: 1.5px solid #d1d5db;
	color: #374151;
	font-size: 13px;
	font-weight: 600;
	padding: 12px 28px;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.15s;
}

.smfo-reviews-loadmore:hover {
	border-color: #2271b1;
	color: #2271b1;
}

/* ============ MOBILE ============ */

@media (max-width: 600px) {
	.smfo-reviews {
		padding: 16px;
	}

	.smfo-reviews-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.smfo-write-review-btn {
		width: 100%;
		text-align: center;
	}

	.smfo-rating-num {
		font-size: 36px;
	}

	.smfo-form-row .smfo-cancel-btn {
		margin-left: 0;
		margin-top: 8px;
	}

	.smfo-rating-star {
		font-size: 28px;
	}
}
