/**
 * Review Form with Email Verification Styles
 * Multi-step review form UI
 */

/* Review Form Container */
.mylisting-review-form-container .review-step {
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.mylisting-review-form-container .review-step.step-hidden {
	display: none !important;
}

.mylisting-review-form-container .review-step.step-visible {
	display: block;
	animation: fadeInUp 0.4s ease;
}

/* Disabled form preview overlay */
.review-form-preview {
	margin-top: 24px;
	position: relative;
}

.review-form-preview.disabled-overlay {
	pointer-events: none;
	opacity: 0.4;
	filter: grayscale(100%);
}

.review-form-preview.disabled-overlay::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(255, 255, 255, 0.7);
	z-index: 1;
	pointer-events: none;
}

.review-form-preview input,
.review-form-preview textarea,
.review-form-preview button {
	cursor: not-allowed !important;
}

.review-form-preview .rating-preview {
	display: flex;
	gap: 4px;
	font-size: 24px;
	color: #ddd;
}

.review-form-preview .star-icon {
	color: #ddd;
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Email Verified Badge */
.email-verified-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: #28a745;
	font-size: 14px;
	font-weight: 500;
	margin-top: 8px;
}

.email-verified-badge i {
	font-size: 18px;
}

/* OTP Input Styling */
.otp-input-container {
	display: flex;
	gap: 12px;
	justify-content: center;
	margin: 20px 0;
}

.otp-digit {
	width: 60px;
	height: 60px;
	text-align: center;
	font-size: 24px;
	font-weight: bold;
	border: 2px solid #ddd;
	border-radius: 8px;
	transition: all 0.3s ease;
}

.otp-digit:focus {
	outline: none;
	border-color: #007bff;
	box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.otp-digit.filled {
	border-color: #28a745;
	background-color: #f8fff9;
}

.otp-digit.error {
	border-color: #dc3545;
	animation: shake 0.5s;
}

@keyframes shake {
	0%, 100% { transform: translateX(0); }
	10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
	20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Notifications */
.review-notification {
	padding: 12px 16px;
	border-radius: 6px;
	margin-top: 15px;
	font-size: 14px;
	line-height: 1.5;
}

.review-notification.success {
	background-color: #d4edda;
	border: 1px solid #c3e6cb;
	color: #155724;
}

.review-notification.error {
	background-color: #f8d7da;
	border: 1px solid #f5c6cb;
	color: #721c24;
}

.review-notification.info {
	background-color: #d1ecf1;
	border: 1px solid #bee5eb;
	color: #0c5460;
}

.review-notification.warning {
	background-color: #fff3cd;
	border: 1px solid #ffeaa7;
	color: #856404;
}

.review-info-box {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.review-info-box i {
	font-size: 20px;
	margin-top: 2px;
}

/* Button States */
.buttons.button-outline {
	background-color: transparent;
	border: 2px solid #007bff;
	color: #007bff;
}

.buttons.button-outline:hover {
	background-color: #007bff;
	color: #fff;
}

.buttons[disabled],
.buttons.loading {
	opacity: 0.6;
	cursor: not-allowed;
	pointer-events: none;
}

.buttons.loading::after {
	content: "";
	display: inline-block;
	width: 16px;
	height: 16px;
	margin-left: 8px;
	border: 2px solid #fff;
	border-top-color: transparent;
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
	vertical-align: middle;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

/* Form Description Text */
.form-description {
	font-size: 13px;
	color: #6c757d;
	margin-top: 6px;
	margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 576px) {
	.otp-digit {
		width: 50px;
		height: 50px;
		font-size: 20px;
	}

	.otp-input-container {
		gap: 8px;
	}
}

/* Loading Overlay */
.review-loading-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(255, 255, 255, 0.9);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100;
}

.review-loading-spinner {
	width: 40px;
	height: 40px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #007bff;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

/* Info notification style */
.review-notification.info {
	background-color: #d1ecf1;
	border: 1px solid #bee5eb;
	color: #0c5460;
}

/* Smooth transitions */
.mylisting-review-form-container {
	position: relative;
}

.mylisting-review-form-container .pf-body {
	min-height: 200px;
}

/* Success State */
.review-success-message {
	text-align: center;
	padding: 40px 20px;
}

.review-success-message i {
	font-size: 60px;
	color: #28a745;
	display: block;
	margin-bottom: 20px;
}

.review-success-message h3 {
	color: #28a745;
	margin-bottom: 10px;
}

.review-success-message p {
	color: #6c757d;
}

/* Email input with verified state */
.review-email-input[disabled] {
	background-color: #f8f9fa;
	cursor: not-allowed;
	opacity: 0.8;
}

/* Form field spacing */
.mylisting-review-form-container .form-group {
	margin-bottom: 20px;
}

.mylisting-review-form-container .form-group:last-child {
	margin-bottom: 0;
}

/* Hide WordPress comment form default title and logged-in-as message */
#review-step-form .comment-respond .comment-reply-title {
	display: none;
}

#review-step-form .comment-respond .logged-in-as {
	display: none;
}

#review-step-form .comment-respond .comment-notes {
	display: none;
}

/* Custom review fields styling */
.custom-review-fields {
	margin-top: 0;
}

.custom-review-fields .form-group {
	margin-bottom: 20px;
}

/* Ensure rating inputs are clickable in update form */
#update-review-form-container .c27-rating-field input[type="radio"] {
	pointer-events: auto !important;
	cursor: pointer !important;
}

#update-review-form-container .c27-rating-field label {
	pointer-events: auto !important;
	cursor: pointer !important;
}

#update-review-form-container .clasificacion {
	pointer-events: auto !important;
}

#update-review-form-container .clasificacion input {
	pointer-events: auto !important;
}

#update-review-form-container .clasificacion label {
	pointer-events: auto !important;
	cursor: pointer !important;
}

/* Button spacing */
.mylisting-review-form-container .buttons.full-width + .buttons {
	margin-top: 12px;
}

/* Animation for step transitions */
.review-step-enter {
	opacity: 0;
	transform: translateX(-20px);
}

.review-step-enter-active {
	opacity: 1;
	transform: translateX(0);
	transition: all 0.3s ease;
}

.review-step-exit {
	opacity: 1;
	transform: translateX(0);
}

.review-step-exit-active {
	opacity: 0;
	transform: translateX(20px);
	transition: all 0.3s ease;
}

