/* Simple Reviews Plugin - Frontend Styles */

/* ---- Form ---- */
.sr-form-wrap {
	background: #f9fafb;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 30px;
	margin-bottom: 40px;
	max-width: 600px;
}

.sr-form-title {
	margin-top: 0;
	margin-bottom: 20px;
	font-size: 1.3em;
	color: #1e293b;
}

.sr-field {
	margin-bottom: 18px;
}

.sr-field label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 0.9em;
	color: #334155;
}

.sr-required {
	color: #dc2626;
}

.sr-field input[type="text"],
.sr-field textarea {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 4px;
	font-size: 1em;
	font-family: inherit;
	box-sizing: border-box;
	background: #fff;
	color: #334155;
}

.sr-field input[type="text"]:focus,
.sr-field textarea:focus {
	outline: none;
	border-color: #046bd2;
	box-shadow: 0 0 0 2px rgba(4, 107, 210, 0.15);
}

.sr-field textarea {
	resize: vertical;
	min-height: 100px;
}

/* ---- Star selector ---- */
.sr-star-select {
	display: flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 4px;
}

.sr-star-select input[type="radio"] {
	display: none;
}

.sr-star-select label {
	font-size: 2em;
	color: #cbd5e1;
	cursor: pointer;
	margin-bottom: 0;
	font-weight: normal;
	transition: color 0.1s;
	line-height: 1;
}

.sr-star-select label:hover,
.sr-star-select label:hover ~ label,
.sr-star-select input[type="radio"]:checked ~ label {
	color: #f59e0b;
}

/* ---- Submit button ---- */
.sr-submit {
	background-color: #046bd2;
	color: #fff;
	border: none;
	padding: 12px 28px;
	border-radius: 4px;
	font-size: 1em;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	transition: background-color 0.2s;
}

.sr-submit:hover {
	background-color: #045cb4;
}

/* ---- Success message ---- */
.sr-success {
	background: #f0fdf4;
	border: 1px solid #86efac;
	border-radius: 6px;
	padding: 15px 20px;
	margin-bottom: 25px;
	color: #166534;
	font-weight: 500;
}

/* ---- Aggregate summary ---- */
.sr-summary {
	display: flex;
	align-items: center;
	gap: 20px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 20px 25px;
	margin-bottom: 30px;
	max-width: 400px;
}

.sr-summary-score {
	font-size: 3em;
	font-weight: 700;
	color: #1e293b;
	line-height: 1;
}

.sr-summary-right {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.sr-summary-count {
	font-size: 0.85em;
	color: #64748b;
}

/* ---- Star display (filled overlay) ---- */
.sr-stars-display {
	position: relative;
	display: inline-block;
	font-size: 1.4em;
	line-height: 1;
}

.sr-stars-bg {
	color: #e2e8f0;
}

.sr-stars-fill {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
	white-space: nowrap;
	color: #f59e0b;
}

/* ---- Reviews list ---- */
.sr-reviews-list {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.sr-review-item {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 20px 25px;
}

.sr-item-stars {
	font-size: 1.1em;
	margin-bottom: 10px;
}

.sr-review-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
}

.sr-review-author {
	font-weight: 700;
	color: #1e293b;
	font-size: 0.95em;
}

.sr-review-date {
	color: #94a3b8;
	font-size: 0.85em;
}

.sr-review-text {
	color: #475569;
	font-size: 0.95em;
	line-height: 1.65;
}

.sr-no-reviews {
	color: #64748b;
	font-style: italic;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
	.sr-form-wrap {
		padding: 20px;
	}
	.sr-summary {
		max-width: 100%;
	}
	.sr-review-item {
		padding: 15px;
	}
}

/* ---- Admin reply ---- */
.sr-admin-reply {
	margin-top: 14px;
	background: #f0f7ff;
	border-left: 4px solid #046bd2;
	border-radius: 0 6px 6px 0;
	padding: 12px 16px;
}

.sr-admin-reply-label {
	font-weight: 700;
	font-size: 0.85em;
	color: #046bd2;
	margin-bottom: 5px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.sr-admin-reply-text {
	color: #334155;
	font-size: 0.92em;
	line-height: 1.6;
}

/* ---- Pagination ---- */
.sr-pagination {
	display: flex;
	gap: 6px;
	margin-top: 24px;
	flex-wrap: wrap;
}

.sr-page-btn {
	display: inline-block;
	padding: 7px 13px;
	border: 1px solid #cbd5e1;
	border-radius: 4px;
	color: #334155;
	text-decoration: none;
	font-size: 0.9em;
	background: #fff;
	transition: all 0.15s;
}

.sr-page-btn:hover {
	background: #f1f5f9;
	border-color: #046bd2;
	color: #046bd2;
}

.sr-page-btn.sr-page-active {
	background: #046bd2;
	border-color: #046bd2;
	color: #fff;
	font-weight: 600;
}
