/*
 * WP Review Lite Stylesheet - Optimized Version
 * Improvements: Reduced specificity, combined selectors, added GPU acceleration
 */

/* Combined base styles to reduce redundancy */
.review-box {
  border: 1px solid #e7e7e7;
  background: #fff;
  margin-bottom: 25px;
  position: relative;
  /* Add containment for better performance */
  contain: layout style;
}

/* Flex container optimization - single rule for common flex patterns */
.review-box__summary-header,
.review-box__product-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.review-box__summary-header {
  margin-bottom: 15px;
}

.review-box__product-info {
  background: #e7e7e7;
  padding: 15px 20px;
}

/* Combined title styles to reduce duplication */
.review-box__title,
.review-box__product-heading {
  font-size: 20px !important;
  font-weight: 700;
  margin: 0;
  color: #555;
}

.review-box__product-heading {
  color: #333; /* Override for product */
}

.review-box__title {
  font-weight: 400 !important; /* Override for title */
}

/* Combined score/price styles */
.review-box__score,
.review-box__product-price {
  font-size: 28px;
  font-weight: 700;
  color: #555;
  margin: 0;
  text-align: right;
  flex-shrink: 0;
}

.review-box__product-price {
  font-size: 20px !important; /* Override for price */
  color: #333;
}

.review-box__score {
  min-width: 80px;
}

.review-box__summary-content {
  line-height: 1.6;
  color: #555;
}

/* Simplified layout classes */
.review-box--product {
  padding: 0;
}

.review-box--product .review-box__summary {
  padding: 20px;
}

.review-box--game {
  padding: 20px;
}

/* Optimized badge with GPU acceleration */
.review-score-badge {
  position: absolute;
  top: 0;
  left: 0;
  width: 50px;
  height: 50px;
  background: #000;
  color: #fff;
  font-size: 24px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  /* GPU acceleration for better performance */
  transform: translateZ(0);
  will-change: transform;
}

.review-score-badge::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  border-left: 0 solid transparent;
  border-bottom: 0 solid transparent;
  border-right: 12px solid #9f3ae5;
  border-top: 12px solid transparent;
}

/* Use single selector for last-review modifications */
.last-review .review-score-badge {
  width: 70px;
  height: 70px;
  font-size: 36px;
}

.last-review .review-score-badge::after {
  border-right: 16px solid #c44fff;
  border-top: 16px solid transparent;
}