/* Кнопка и попап «Оставить отзыв» для блока [wc_product_reviews] */

.wcpr-add {
	display: flex;
	justify-content: center;
	padding-top: 1.5rem;
	padding-bottom: 1.5rem;
}

.wcpr-add-btn,
.wcpr-submit {
	display: inline-block;
	padding: .75rem 1.75rem;
	border: 0;
	border-radius: 10px;
	background: var(--main, #212529);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: opacity .2s;
}

.wcpr-add-btn:hover,
.wcpr-submit:hover {
	opacity: .85;
}

.wcpr-submit:disabled {
	opacity: .6;
	cursor: default;
}

.wcpr-modal .modal-content {
	color: #212529;
	background: #fff;
	border-radius: 12px;
	text-align: left;
}

.wcpr-modal .modal-title {
	font-size: 1.35rem;
	font-weight: 700;
	margin: 0;
}

.wcpr-field {
	position: relative;
	margin: 0 0 1rem;
	padding: 0;
	border: 0;
}

.wcpr-field label,
.wcpr-field legend {
	display: block;
	margin-bottom: .35rem;
	font-size: .95rem;
	font-weight: 600;
}

.wcpr-field small {
	font-weight: 400;
	color: #6c757d;
}

.wcpr-field input[type="text"],
.wcpr-field input[type="email"],
.wcpr-field textarea {
	display: block;
	width: 100%;
	padding: .6rem .75rem;
	border: 1px solid #ced4da;
	border-radius: 8px;
	background: #fff;
	color: #212529;
	font: inherit;
	line-height: 1.4;
}

.wcpr-field input:focus,
.wcpr-field textarea:focus {
	outline: none;
	border-color: #86b7fe;
	box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .2);
}

.wcpr-field textarea {
	resize: vertical;
	min-height: 110px;
}

/* Подсказки по товарам */
.wcpr-suggest {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 10;
	max-height: 260px;
	margin-top: .25rem;
	overflow: auto;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .1);
}

.wcpr-suggest-item {
	padding: .55rem .75rem;
	cursor: pointer;
	line-height: 1.3;
}

.wcpr-suggest-item:hover,
.wcpr-suggest-item.is-active {
	background: #f3f4f6;
}

.wcpr-suggest-empty {
	padding: .6rem .75rem;
	color: #6c757d;
}

/* Звёзды: в разметке 5→1, визуально 1→5 */
.wcpr-stars {
	display: inline-flex;
	flex-direction: row-reverse;
	gap: .15rem;
}

.wcpr-stars input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.wcpr-field .wcpr-stars label {
	margin: 0;
	font-size: 2rem;
	line-height: 1;
	color: #ccc;
	cursor: pointer;
	transition: color .15s;
}

.wcpr-stars label:hover,
.wcpr-stars label:hover ~ label,
.wcpr-stars input:checked ~ label {
	color: #f5a623;
}

.wcpr-stars input:focus-visible + label {
	outline: 2px solid #0d6efd;
	outline-offset: 2px;
	border-radius: 4px;
}

/* Ловушка для ботов */
.wcpr-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.wcpr-msg {
	margin-top: .5rem;
	padding: .6rem .75rem;
	border-radius: 8px;
	font-size: .95rem;
	line-height: 1.4;
}

.wcpr-msg--error {
	background: #fdecea;
	color: #a4161a;
}

.wcpr-msg--success {
	background: #e8f5e9;
	color: #2e7d32;
}
