/* Overrides for global .rs-modal styles (style.css / main.css) */
.rs-17 .rs-modal.rs-reviews-form-modal .modal-dialog,
.rs-17 .rs-modal.rs-reviews-form-modal#review-form-modal .modal-dialog,
#review-form-modal .modal-dialog {
	max-width: 678px;
	width: calc(100% - 20px);
	margin: 30px auto;
}

.rs-17 .rs-modal.rs-reviews-form-modal .modal {
	padding-top: 60px;
}

.rs-17 .rs-modal.rs-reviews-form-modal .modal-content,
#review-form-modal .modal-content {
	border: 0;
	border-radius: 12px;
	box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.15);
	background-color: #fff;
}

.rs-17 .rs-modal.rs-reviews-form-modal .modal-header,
#review-form-modal .modal-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 24px 24px 0;
	border-bottom: 0;
}

.rs-17 .rs-modal.rs-reviews-form-modal .modal-title,
#review-form-modal .modal-title {
	margin: 0;
	flex: 1;
	font-family: "Montserrat", sans-serif;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.22;
	color: #000;
	text-align: left;
	text-transform: none;
}

.rs-17 .rs-modal.rs-reviews-form-modal .modal .close,
.rs-17 .rs-modal.rs-reviews-form-modal .rs-reviews-form-modal__close,
#review-form-modal .modal .close {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	background: #fff;
	opacity: 1;
	font-size: 20px;
	font-weight: 300;
	line-height: 1;
	color: #004280;
	float: none;
	text-shadow: none;
}

.rs-17 .rs-modal.rs-reviews-form-modal .modal-body,
#review-form-modal .modal-body {
	padding: 20px 24px 24px;
}

.rs-reviews-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.rs-reviews-form__honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.rs-reviews-form__field {
	position: relative;
}

.rs-reviews-form__field--required {
	position: relative;
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 8px;
	background-color: #fafafa;
	transition: border-color 0.2s, background-color 0.2s;
}

.rs-reviews-form__field--required:focus-within {
	border-color: rgba(0, 66, 128, 0.35);
	background-color: #fff;
}

.rs-reviews-form__field--required.is-error {
	border-color: #ff4c4c;
	background-color: #fff8f8;
}

/* Red asterisk via background-image on the input itself — no z-index issues */
.rs-reviews-form__field--required .rs-reviews-form__input {
	width: 100%;
	padding: 12px 14px 12px 26px;
	border: 0;
	border-radius: 8px;
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 10 10'%3E%3Cpath d='M5.7391 0.382812L5.3772 4.30919L9.1391 3.17182L9.38672 4.90259L5.78672 5.28831L8.11053 8.50259L6.56767 9.38281L4.84386 5.86193L3.26291 9.38281L1.66291 8.50259L3.96767 5.28831L0.386719 4.90259L0.653385 3.17182L4.35815 4.30919L3.98672 0.382812H5.7391Z' fill='%23FF4C4C'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 12px 12px;
	transition: background-color 0.2s;
}

.rs-reviews-form__field--required .rs-reviews-form__input:focus {
	border: 0;
	background-color: transparent;
	outline: none;
}

/* Hide asterisk once user has typed something */
.rs-reviews-form__field--required.is-filled .rs-reviews-form__input {
	background-image: none;
	padding-left: 14px;
}

.rs-reviews-form__input,
.rs-reviews-form__select,
.rs-reviews-form__textarea {
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 12px 14px;
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 8px;
	background-color: #fff;
	font-family: "Open Sans", sans-serif;
	font-size: 16px;
	line-height: 1.36;
	color: #000;
	transition: border-color 0.2s, background-color 0.2s;
}

.rs-reviews-form__field--select .rs-reviews-form__select {
	padding: 12px 36px 12px 14px;
	appearance: none;
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23004280' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
}

.rs-reviews-form__field--textarea .rs-reviews-form__textarea {
	min-height: 140px;
	padding: 12px 14px;
	resize: vertical;
}

.rs-reviews-form__input::placeholder,
.rs-reviews-form__textarea::placeholder {
	color: rgba(0, 0, 0, 0.4);
}

.rs-reviews-form__input:focus,
.rs-reviews-form__select:focus,
.rs-reviews-form__textarea:focus {
	outline: none;
	border-color: rgba(0, 66, 128, 0.35);
	background-color: #fff;
}

.rs-reviews-form__field.is-error .rs-reviews-form__input,
.rs-reviews-form__field.is-error .rs-reviews-form__textarea {
	border-color: #ff4c4c;
	background-color: #fff8f8;
}

.rs-reviews-form__field--required.is-error .rs-reviews-form__input {
	border: 0;
	background: transparent;
}

.rs-reviews-form__rating.is-error .rs-reviews-form__stars {
	outline: 1px solid #ff4c4c;
	border-radius: 6px;
}

.rs-reviews-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.rs-reviews-form__rating {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 12px;
}

.rs-reviews-form__label {
	font-family: "Open Sans", sans-serif;
	width: 100%;
	font-size: 16px;
	line-height: 1.36;
	color: #4b4b4b;
}

.rs-reviews-form__stars {
	display: flex;
	align-items: center;
	gap: 4px;
}

.rs-reviews-form__star {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.rs-reviews-form__star svg {
	width: 28px;
	height: 28px;
}

.rs-reviews-form__rating-value {
	min-width: 28px;
	font-family: "Montserrat", sans-serif;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.22;
	color: #000;
}

.rs-reviews-form__footer {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 4px;
}

.rs-reviews-form__submit {
	flex-shrink: 0;
	min-width: 148px;
	padding: 14px 28px;
	border: 0;
	border-radius: 8px;
	background: #85b42b;
	font-family: "Open Sans", sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.36;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s;
}

.rs-reviews-form__submit:hover,
.rs-reviews-form__submit:focus {
	background: #74a11e;
	color: #fff;
}

.rs-reviews-form__submit:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.rs-reviews-form__consent {
	flex: 1;
	margin: 0;
	font-family: "Open Sans", sans-serif;
	font-size: 12px;
	line-height: 1.45;
	color: #4B4B4B;
}

.rs-reviews-form__consent a {
	color: #004280;
	text-decoration: underline;
}

.rs-reviews-form__consent a:hover {
	text-decoration: none;
}

.rs-reviews-form__message {
	margin-top: 8px;
	padding: 12px 14px;
	border-radius: 8px;
	font-family: "Open Sans", sans-serif;
	font-size: 14px;
	line-height: 1.4;
}

.rs-reviews-form__message.is-success {
	background: #f0f8e8;
	color: #3d6614;
}

.rs-reviews-form__message.is-error {
	background: #fff0f0;
	color: #cc0000;
}

.rs-reviews-form.is-loading {
	pointer-events: none;
	opacity: 0.7;
}

@media (max-width: 767px) {
	.rs-17 .rs-modal.rs-reviews-form-modal .modal-header,
	.rs-17 .rs-modal.rs-reviews-form-modal .modal-body,
	#review-form-modal .modal-header,
	#review-form-modal .modal-body {
		padding-left: 16px;
		padding-right: 16px;
	}

	.rs-17 .rs-modal.rs-reviews-form-modal .modal-title,
	#review-form-modal .modal-title {
		font-size: 20px;
	}

	.rs-reviews-form__row {
		grid-template-columns: 1fr;
	}

	.rs-reviews-form__footer {
		flex-direction: column;
	}

	.rs-reviews-form__submit {
		width: 100%;
	}

	.rs-reviews-form__consent {
		padding-top: 0;
	}
}
