:root {
  --star-size: 18px;
  --star-color: #F59E0B;
  --star-color-empty: #E5E7EB;
}

/* Star Rating Styles */
.custom-review-stars {
  display: inline-flex;
  gap: 2px;
  line-height: 1;
}

.custom-review-stars .star {
  font-size: var(--star-size);
  color: var(--star-color-empty);
  transition: color 0.2s ease;
  font-style: normal;
  display: inline-block;
}

.custom-review-stars .star.filled {
  color: var(--star-color);
}

.custom-review-stars .star.half {
  background: linear-gradient(90deg, var(--star-color) 50%, var(--star-color-empty) 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* Star Rating Container */
.custom-review-stars-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.custom-review-count,
.custom-review-average {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.4;
}

/* Reviews List Styles */
.custom-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 20px 0;
}

.custom-review-item {
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

.custom-review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.custom-review-author {
  font-weight: 600;
  color: #111827;
}

.custom-review-date {
  font-size: 12px;
  color: #6b7280;
  margin-left: auto;
}

.custom-review-content {
  margin-top: 8px;
}

.custom-review-content p {
  margin: 0;
  color: #374151;
  line-height: 1.5;
}

/* Empty State */
.custom-reviews-empty {
  text-align: center;
  padding: 40px 20px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: #6b7280;
}

/* Error State */
.custom-reviews-error {
  color: #dc2626;
  font-weight: 500;
  padding: 8px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 4px;
  display: inline-block;
}

/* Responsive Design */
@media (max-width: 768px) {
  .custom-review-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .custom-review-date {
    margin-left: 0;
  }
  
  .custom-review-stars-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* Integration with WooCommerce */
.woocommerce .custom-review-stars-container {
  margin: 10px 0;
}

.woocommerce .custom-reviews-list {
  margin-top: 20px;
}

/* Elementor Integration */
.elementor-widget-custom_review_stars .custom-review-stars-container {
  margin: 0;
}

.elementor-widget-custom_review_stars .custom-review-stars .star {
  font-size: inherit;
}

/* Animation for loading states */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.custom-reviews-loading .custom-review-stars .star {
  animation: pulse 1.5s ease-in-out infinite;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .custom-review-stars .star.filled {
    color: #000000;
  }
  
  .custom-review-stars .star:not(.filled) {
    color: #666666;
  }
}

/* Print styles */
@media print {
  .custom-review-stars .star {
    -webkit-print-color-adjust: exact;
    color-adjust: exact;
  }
}
