/**
 * MobileN Review Styles
 *
 * @package MobileN_Review
 */

/* =====================
   CSS Custom Properties
   ===================== */
:root {
	--mr-star-color: #f5a623;
	--mr-star-empty: #ddd;
	--mr-primary: #2271b1;
	--mr-primary-hover: #135e96;
	--mr-success: #00a32a;
	--mr-danger: #d63638;
	--mr-warning: #dba617;
	--mr-bg: #ffffff;
	--mr-bg-alt: #f9f9f9;
	--mr-border: #e0e0e0;
	--mr-text: #333333;
	--mr-text-light: #666666;
	--mr-text-muted: #999999;
	--mr-card-bg: #ffffff;
	--mr-card-border: #eee;
	--mr-radius: 8px;
	--mr-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* =====================
   Review Section
   ===================== */
.mr-reviews-section {
	max-width: 100%;
	padding: 20px 0;
}

.mr-reviews-title {
	font-size: 1.3em;
	margin-bottom: 20px;
	font-weight: 600;
}

/* =====================
   Star Rating
   ===================== */
.mr-star {
	font-size: 18px;
	cursor: default;
	line-height: 1;
	display: inline-block;
}

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

.mr-star.empty {
	color: var(--mr-star-empty);
}

.mr-star.half {
	color: var(--mr-star-color);
	position: relative;
}

/* Rating field in form */
.mr-rating-field {
	margin-bottom: 16px;
}

.mr-rating-field label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
}

.mr-stars {
	display: flex;
	align-items: center;
	gap: 4px;
}

.mr-stars .mr-star {
	font-size: 28px;
	cursor: pointer;
	transition: transform 0.15s ease, color 0.15s ease;
	color: var(--mr-star-empty);
}

.mr-stars .mr-star:hover,
.mr-stars .mr-star.active {
	color: var(--mr-star-color);
	transform: scale(1.15);
}

.mr-stars .mr-star.hover {
	color: var(--mr-star-color);
}

.mr-rating-label {
	margin-left: 10px;
	font-size: 14px;
	color: var(--mr-text-light);
	font-weight: 500;
}

/* =====================
   Review Form
   ===================== */
.mr-review-form-fields {
	margin-bottom: 16px;
}

.mr-title-field {
	margin-bottom: 16px;
}

.mr-title-field label,
.mr-image-field label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
}

.mr-title-field input {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid var(--mr-border);
	border-radius: var(--mr-radius);
	font-size: 14px;
}

.mr-title-field .optional,
.mr-image-field .optional {
	font-weight: 400;
	color: var(--mr-text-muted);
	font-size: 13px;
}

/* Image Upload */
.mr-image-upload {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: flex-start;
}

.mr-image-preview {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.mr-image-preview-item {
	position: relative;
	width: 80px;
	height: 80px;
	border-radius: var(--mr-radius);
	overflow: hidden;
	border: 1px solid var(--mr-border);
}

.mr-image-preview-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mr-image-preview-item .mr-image-remove {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 20px;
	height: 20px;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	font-size: 12px;
	line-height: 20px;
	text-align: center;
	padding: 0;
}

.mr-image-add-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 80px;
	height: 80px;
	border: 2px dashed var(--mr-border);
	border-radius: var(--mr-radius);
	cursor: pointer;
	color: var(--mr-text-muted);
	font-size: 13px;
	transition: border-color 0.2s;
}

.mr-image-add-btn:hover {
	border-color: var(--mr-primary);
	color: var(--mr-primary);
}

.mr-image-add-btn span:first-child {
	font-size: 24px;
	line-height: 1;
}

.mr-content-hint {
	margin-bottom: 8px;
	color: var(--mr-text-muted);
}

.mr-submit-btn {
	display: inline-block;
	padding: 10px 28px;
	background: var(--mr-primary);
	color: #fff;
	border: none;
	border-radius: var(--mr-radius);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.mr-submit-btn:hover {
	background: var(--mr-primary-hover);
}

/* =====================
   Stats Section
   ===================== */
.mr-stats-section {
	background: var(--mr-bg-alt);
	border: 1px solid var(--mr-border);
	border-radius: var(--mr-radius);
	padding: 24px;
	margin-bottom: 24px;
}

.mr-stats-summary {
	display: flex;
	gap: 30px;
	align-items: flex-start;
}

.mr-stats-average {
	text-align: center;
	min-width: 120px;
}

.mr-stats-number {
	font-size: 48px;
	font-weight: 700;
	color: var(--mr-text);
	line-height: 1;
	display: block;
}

.mr-stats-stars {
	margin: 8px 0;
}

.mr-stats-stars .mr-star {
	font-size: 16px;
}

.mr-stats-count {
	font-size: 13px;
	color: var(--mr-text-muted);
}

.mr-stats-bars {
	flex: 1;
}

.mr-stats-bar-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
	cursor: pointer;
}

.mr-stats-bar-label {
	width: 30px;
	font-size: 13px;
	color: var(--mr-text-light);
	text-align: right;
}

.mr-stats-bar-track {
	flex: 1;
	height: 10px;
	background: var(--mr-border);
	border-radius: 5px;
	overflow: hidden;
}

.mr-stats-bar-fill {
	height: 100%;
	background: var(--mr-star-color);
	border-radius: 5px;
	transition: width 0.3s ease;
}

.mr-stats-bar-percent {
	width: 36px;
	font-size: 12px;
	color: var(--mr-text-muted);
	text-align: right;
}

.mr-stats-extra {
	margin-top: 12px;
	display: flex;
	gap: 16px;
}

.mr-stats-info {
	font-size: 13px;
	color: var(--mr-text-muted);
}

/* =====================
   Filter Bar
   ===================== */
.mr-filter-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 20px;
	padding: 12px 16px;
	background: var(--mr-bg-alt);
	border-radius: var(--mr-radius);
	border: 1px solid var(--mr-border);
}

.mr-filter-options {
	display: flex;
	gap: 12px;
	align-items: center;
}

.mr-sort-select,
.mr-rating-filter {
	padding: 6px 12px;
	border: 1px solid var(--mr-border);
	border-radius: var(--mr-radius);
	font-size: 13px;
	background: #fff;
}

.mr-image-filter {
	font-size: 13px;
	display: flex;
	align-items: center;
	gap: 4px;
	cursor: pointer;
}

/* =====================
   Review Item
   ===================== */
.mr-review-item {
	padding: 20px;
	border-bottom: 1px solid var(--mr-border);
}

.mr-review-item:last-child {
	border-bottom: none;
}

.mr-review-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	margin-bottom: 8px;
}

.mr-review-rating .mr-star {
	font-size: 16px;
}

.mr-review-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--mr-text-muted);
}

.mr-review-author {
	font-weight: 600;
	color: var(--mr-text);
}

.mr-verified-badge {
	display: inline-block;
	padding: 2px 6px;
	background: var(--mr-success);
	color: #fff;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 600;
}

.mr-review-title {
	font-size: 15px;
	font-weight: 600;
	margin: 4px 0 8px;
}

.mr-review-content {
	font-size: 14px;
	line-height: 1.6;
	color: var(--mr-text);
}

.mr-review-edited {
	margin-top: 4px;
	color: var(--mr-text-muted);
	font-size: 12px;
}

/* Review Images */
.mr-review-images {
	display: flex;
	gap: 8px;
	margin-top: 12px;
	flex-wrap: wrap;
}

.mr-review-thumb {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid var(--mr-border);
	cursor: pointer;
	transition: opacity 0.2s;
}

.mr-review-thumb:hover {
	opacity: 0.85;
}

/* Review Actions */
.mr-review-actions {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-top: 12px;
}

.mr-helpful-btn,
.mr-report-btn,
.mr-edit-btn,
.mr-delete-btn {
	padding: 5px 12px;
	border: 1px solid var(--mr-border);
	border-radius: var(--mr-radius);
	background: #fff;
	cursor: pointer;
	font-size: 13px;
	transition: all 0.2s;
}

.mr-helpful-btn:hover {
	border-color: var(--mr-primary);
	color: var(--mr-primary);
}

.mr-helpful-btn.voted {
	background: var(--mr-primary);
	color: #fff;
	border-color: var(--mr-primary);
}

.mr-helpful-btn.disabled,
.mr-helpful-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.mr-helpful-icon {
	margin-right: 4px;
}

.mr-report-btn {
	color: var(--mr-text-muted);
	border-color: transparent;
	background: transparent;
	font-size: 12px;
}

.mr-report-btn:hover {
	color: var(--mr-danger);
}

.mr-edit-btn:hover {
	border-color: var(--mr-primary);
	color: var(--mr-primary);
}

.mr-delete-btn:hover {
	border-color: var(--mr-danger);
	color: var(--mr-danger);
}

.mr-edit-expired {
	font-size: 12px;
	color: var(--mr-text-muted);
}

/* =====================
   Store Reply
   ===================== */
.mr-store-reply {
	margin-top: 16px;
	margin-left: 24px;
	padding: 16px;
	background: var(--mr-bg-alt);
	border-left: 3px solid var(--mr-primary);
	border-radius: 0 var(--mr-radius) var(--mr-radius) 0;
}

.mr-reply-badge {
	display: inline-block;
	padding: 2px 8px;
	background: var(--mr-primary);
	color: #fff;
	border-radius: 3px;
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 8px;
}

.mr-reply-content {
	font-size: 14px;
	line-height: 1.6;
	color: var(--mr-text);
}

.mr-reply-meta {
	margin-top: 8px;
	font-size: 12px;
	color: var(--mr-text-muted);
}

.mr-reply-meta span {
	margin-right: 8px;
}

/* =====================
   Lightbox
   ===================== */
.mr-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.85);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s, visibility 0.3s;
}

.mr-lightbox.active {
	opacity: 1;
	visibility: visible;
}

.mr-lightbox img {
	max-width: 90%;
	max-height: 90vh;
	border-radius: var(--mr-radius);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.mr-lightbox-close {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 40px;
	height: 40px;
	background: rgba(255, 255, 255, 0.2);
	border: none;
	border-radius: 50%;
	color: #fff;
	font-size: 24px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mr-lightbox-close:hover {
	background: rgba(255, 255, 255, 0.3);
}

/* =====================
   Report Modal
   ===================== */
.mr-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 99998;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mr-modal-content {
	background: #fff;
	border-radius: var(--mr-radius);
	padding: 24px;
	max-width: 480px;
	width: 90%;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.mr-modal-content h3 {
	margin: 0 0 16px;
	font-size: 18px;
}

.mr-modal-content textarea,
.mr-modal-content select {
	width: 100%;
	margin-bottom: 12px;
	padding: 8px 12px;
	border: 1px solid var(--mr-border);
	border-radius: var(--mr-radius);
	font-size: 14px;
}

.mr-modal-actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	margin-top: 16px;
}

.mr-report-reasons label {
	display: block;
	padding: 6px 0;
	font-size: 14px;
	cursor: pointer;
}

.mr-report-reasons input[type="radio"] {
	margin-right: 8px;
}

.mr-report-other-text {
	margin-top: 8px;
}

/* Edit form inline */
.mr-edit-form {
	margin-top: 12px;
	padding: 16px;
	background: var(--mr-bg-alt);
	border: 1px solid var(--mr-border);
	border-radius: var(--mr-radius);
}

.mr-edit-form textarea {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid var(--mr-border);
	border-radius: var(--mr-radius);
	font-size: 14px;
	min-height: 80px;
	margin-bottom: 8px;
}

.mr-edit-form input[type="text"] {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid var(--mr-border);
	border-radius: var(--mr-radius);
	font-size: 14px;
	margin-bottom: 8px;
}

.mr-edit-form .mr-stars {
	margin-bottom: 12px;
}

/* =====================
   Pagination
   ===================== */
.mr-pagination {
	display: flex;
	gap: 4px;
	justify-content: center;
	margin-top: 20px;
}

.mr-page-btn {
	padding: 6px 12px;
	border: 1px solid var(--mr-border);
	border-radius: var(--mr-radius);
	background: #fff;
	cursor: pointer;
	font-size: 13px;
	transition: all 0.2s;
}

.mr-page-btn:hover,
.mr-page-btn.active {
	background: var(--mr-primary);
	color: #fff;
	border-color: var(--mr-primary);
}

/* =====================
   No Reviews
   ===================== */
.mr-no-reviews {
	text-align: center;
	padding: 40px 20px;
	color: var(--mr-text-muted);
	font-size: 14px;
}

.mr-login-notice {
	text-align: center;
	padding: 20px;
	color: var(--mr-text-light);
}

.mr-login-notice a {
	color: var(--mr-primary);
	font-weight: 600;
}

.mr-access-denied {
	text-align: center;
	padding: 30px;
	color: var(--mr-text-muted);
	background: var(--mr-bg-alt);
	border-radius: var(--mr-radius);
}

/* =====================
   Shortcode Common
   ===================== */
.mr-shortcode {
	--mr-star-color: #f5a623;
	--mr-star-empty: #ddd;
	--mr-card-bg: #ffffff;
	--mr-card-border: #eee;
	--mr-text-color: #333;
	--mr-meta-color: #999;
}

.mr-sc-item {
	background: var(--mr-card-bg);
	border: 1px solid var(--mr-card-border);
	border-radius: var(--mr-radius);
}

.mr-sc-stars .mr-star {
	font-size: 14px;
}

.mr-sc-author {
	font-weight: 600;
	font-size: 13px;
	color: var(--mr-text-color);
}

.mr-sc-product {
	font-size: 12px;
	color: var(--mr-meta-color);
}

.mr-sc-content {
	font-size: 14px;
	line-height: 1.5;
	color: var(--mr-text-color);
}

.mr-sc-date {
	font-size: 12px;
	color: var(--mr-meta-color);
}

.mr-sc-helpful {
	font-size: 12px;
	color: var(--mr-meta-color);
	margin-top: 8px;
}

.mr-sc-images {
	display: flex;
	gap: 6px;
	margin-top: 8px;
}

.mr-sc-thumb {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 4px;
}

/* Shortcode List */
.mr-shortcode-list .mr-sc-list-item {
	padding: 16px;
	margin-bottom: 12px;
}

.mr-shortcode-list .mr-sc-header {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin-bottom: 8px;
}

.mr-shortcode-list .mr-sc-avatar img {
	border-radius: 50%;
}

.mr-shortcode-list .mr-sc-title {
	font-size: 15px;
	font-weight: 600;
	margin: 4px 0 8px;
}

/* Shortcode Grid */
.mr-shortcode-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.mr-shortcode-grid .mr-sc-grid-item {
	padding: 16px;
	text-align: center;
}

.mr-shortcode-grid .mr-sc-image {
	margin: 10px 0;
}

.mr-shortcode-grid .mr-sc-image img {
	width: 100%;
	height: 150px;
	object-fit: cover;
	border-radius: 6px;
}

.mr-shortcode-grid .mr-sc-content {
	font-size: 13px;
	margin-top: 8px;
}

/* Shortcode Slider */
.mr-shortcode-slider {
	position: relative;
	overflow: hidden;
}

.mr-slider-track {
	display: flex;
	transition: transform 0.4s ease;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-ms-overflow-style: none;
	-webkit-overflow-scrolling: touch;
}

.mr-slider-track::-webkit-scrollbar {
	display: none;
}

.mr-sc-slider-item {
	min-width: 280px;
	flex-shrink: 0;
	padding: 20px;
	text-align: center;
	scroll-snap-align: start;
}

.mr-sc-slider-item .mr-sc-image {
	margin: 10px 0;
}

.mr-sc-slider-item .mr-sc-image img {
	width: 100%;
	height: 160px;
	object-fit: cover;
	border-radius: 6px;
}

.mr-slider-prev,
.mr-slider-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid var(--mr-border);
	border-radius: 50%;
	font-size: 20px;
	cursor: pointer;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--mr-shadow);
	transition: background 0.2s;
}

.mr-slider-prev:hover,
.mr-slider-next:hover {
	background: #fff;
}

.mr-slider-prev {
	left: 8px;
}

.mr-slider-next {
	right: 8px;
}

/* =====================
   Board Reviews
   ===================== */
.mr-board-reviews {
	padding: 10px 0;
}

.mr-board-review-item {
	padding: 16px 0;
	border-bottom: 1px solid var(--mr-border);
}

.mr-board-review-item:last-child {
	border-bottom: none;
}

.mr-board-review-header {
	display: flex;
	gap: 8px;
	font-size: 13px;
	color: var(--mr-text-muted);
	margin-bottom: 4px;
}

.mr-board-review-title {
	font-size: 15px;
	font-weight: 600;
	margin: 4px 0 8px;
}

/* =====================
   Admin Styles
   ===================== */
.mr-admin-filters {
	margin: 16px 0;
	display: flex;
	gap: 8px;
	align-items: center;
}

.mr-admin-bulk {
	margin-bottom: 12px;
	display: flex;
	gap: 8px;
}

.mr-admin-table .mr-admin-content {
	max-width: 250px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mr-admin-actions {
	white-space: nowrap;
}

.mr-admin-actions .button {
	margin-right: 4px;
}

.mr-report-badge {
	display: inline-block;
	padding: 2px 8px;
	background: var(--mr-danger);
	color: #fff;
	border-radius: 10px;
	font-size: 12px;
	font-weight: 600;
}

.mr-status-1 {
	color: var(--mr-success);
	font-weight: 600;
}

.mr-status-0 {
	color: var(--mr-warning);
	font-weight: 600;
}

.mr-status-spam {
	color: var(--mr-danger);
	font-weight: 600;
}

/* =====================
   Responsive
   ===================== */
@media (max-width: 768px) {
	.mr-stats-summary {
		flex-direction: column;
		align-items: center;
	}

	.mr-stats-average {
		margin-bottom: 16px;
	}

	.mr-stats-bars {
		width: 100%;
	}

	.mr-filter-bar {
		flex-direction: column;
		align-items: flex-start;
	}

	.mr-filter-options {
		flex-wrap: wrap;
	}

	.mr-shortcode-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.mr-sc-slider-item {
		min-width: 240px;
	}

	.mr-review-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}
}

@media (max-width: 480px) {
	.mr-shortcode-grid {
		grid-template-columns: 1fr;
	}

	.mr-sc-slider-item {
		min-width: 200px;
	}
}
