/**
 * Floré — Customer Reviews: мінімальні фронтенд-стилі.
 * Тільки модалка «Залишити відгук», зірковий пікер і honeypot.
 * Стилі самої секції .reviews / .review-card живуть у SCSS теми —
 * кольори/типографіку модалки за потреби допасуйте там же.
 */

/* ------------------------------------------------------------------ */
/* Модалка                                                             */
/* ------------------------------------------------------------------ */

body.flore-reviews-modal-open {
	overflow: hidden;
}

.flore-reviews-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.flore-reviews-modal[hidden] {
	display: none;
}

.flore-reviews-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(31, 38, 33, 0.55);
	cursor: pointer;
}

.flore-reviews-modal__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 14px;
	width: 100%;
	max-width: 440px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	padding: 28px;
	background: #faf8f4;
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.flore-reviews-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 32px;
	height: 32px;
	padding: 0;
	border: none;
	background: transparent;
	font-size: 24px;
	line-height: 1;
	color: #6b6457;
	cursor: pointer;
}

.flore-reviews-modal__close:hover {
	color: #2f4a3c;
}

.flore-reviews-modal__title {
	margin: 0;
	padding-right: 28px;
	font-size: 22px;
	line-height: 1.2;
	color: #2f4a3c;
}

/* ------------------------------------------------------------------ */
/* Поля форми                                                          */
/* ------------------------------------------------------------------ */

.flore-reviews-modal__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.flore-reviews-modal__field span {
	font-size: 13px;
	font-weight: 600;
	color: #2f4a3c;
}

.flore-reviews-modal__field input,
.flore-reviews-modal__field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d8d0bf;
	border-radius: 4px;
	background: #fff;
	font: inherit;
	font-size: 14px;
	color: #2b2b2b;
}

.flore-reviews-modal__field input:focus,
.flore-reviews-modal__field textarea:focus {
	outline: none;
	border-color: #2f4a3c;
	box-shadow: 0 0 0 1px #2f4a3c;
}

.flore-reviews-modal__field textarea {
	resize: vertical;
	min-height: 96px;
}

/* Honeypot: ховаємо від людей, лишаємо доступним ботам */

.flore-reviews-modal__hp {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	clip: rect(0 0 0 0);
	overflow: hidden;
	white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Зірковий пікер (row-reverse для ефекту "заповнення зліва")          */
/* ------------------------------------------------------------------ */

.flore-stars-input {
	display: flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 2px;
}

.flore-stars-input input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.flore-stars-input label {
	font-size: 28px;
	line-height: 1;
	color: #d8d0bf;
	cursor: pointer;
	transition: color 0.12s ease;
}

/* Завдяки row-reverse "наступні" в DOM зірки — це зірки ЛІВІШЕ візуально */

.flore-stars-input input:checked ~ label,
.flore-stars-input label:hover,
.flore-stars-input label:hover ~ label {
	color: #d4a437;
}

.flore-stars-input input:focus-visible + label {
	outline: 2px solid #2f4a3c;
	outline-offset: 2px;
	border-radius: 2px;
}

/* ------------------------------------------------------------------ */
/* Сабміт і повідомлення                                               */
/* ------------------------------------------------------------------ */

.flore-reviews-modal__submit {
	align-self: flex-start;
}

.flore-reviews-modal__submit:disabled {
	opacity: 0.6;
	cursor: wait;
}

.flore-reviews-modal__message {
	margin: 0;
	padding: 10px 12px;
	border-radius: 4px;
	font-size: 13px;
	background: #e7efe9;
	color: #2f4a3c;
}

.flore-reviews-modal__message.is-error {
	background: #f6e7e4;
	color: #8c3b2e;
}
