/* ========================================
   REVIEWS & RATINGS
   ======================================== */

/* Review Card */
.review-card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.review-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.08);
}

.review-card.review-compact {
  padding: 12px;
}

/* Review Header */
.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

/* Review User */
.review-user {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--glass-100);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.review-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-avatar span {
  font-weight: 600;
  color: var(--text);
  font-size: 18px;
}

.review-user-info {
  flex: 1;
  min-width: 0;
}

.review-user-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 2px;
}

.review-date {
  font-size: 12px;
  color: var(--muted);
}

.review-date-only {
  font-size: 12px;
  color: var(--muted);
}

/* Review Rating */
.review-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.star {
  color: var(--glass-300);
  font-size: 18px;
  line-height: 1;
  transition: color 0.2s ease;
}

.star.filled {
  color: #fbbf24;
}

.star-sm {
  color: var(--glass-300);
  font-size: 14px;
  line-height: 1;
}

.star-sm.filled {
  color: #fbbf24;
}

.review-rating-num {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-left: 4px;
}

/* Review Comment */
.review-comment {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 12px;
  padding: 12px;
  background: var(--glass-50);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

.review-card.review-compact .review-comment {
  padding: 8px;
  margin-bottom: 8px;
}

/* Review Attributes (structured ratings) */
.review-attributes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.review-attr {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.review-attr-label {
  font-weight: 500;
  color: var(--muted);
  text-transform: capitalize;
}

.review-attr-stars {
  display: flex;
  gap: 2px;
}

/* Review Photos */
.review-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.review-photo {
  aspect-ratio: 1;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-color: var(--glass-100);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.review-photo:hover {
  transform: scale(1.05);
}

/* Review Response */
.review-response {
  background: var(--glass-50);
  border-left: 3px solid var(--muted);
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
}

.review-response-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.review-response-icon {
  font-size: 14px;
  color: var(--muted);
}

.review-response-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.review-response-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 6px;
}

.review-response-date {
  font-size: 11px;
  color: var(--muted);
}

/* Review Summary (compact rating display) */
.review-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--glass-50);
  border-radius: 8px;
  border: 1px solid var(--stroke);
}

.review-summary-rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.review-summary-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.review-summary-stars {
  display: flex;
  gap: 2px;
}

.review-summary-stars .star {
  font-size: 16px;
}

.review-summary-count {
  font-size: 14px;
  color: var(--muted);
}

/* Review Stats (detailed rating breakdown) */
.review-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 12px;
}

.review-stat-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-stat-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  min-width: 32px;
}

.review-stat-bar {
  flex: 1;
  height: 8px;
  background: var(--glass-100);
  border-radius: 4px;
  overflow: hidden;
}

.review-stat-fill {
  height: 100%;
  background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.review-stat-count {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  min-width: 32px;
  text-align: right;
}

/* Review List */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Review Item (legacy - from existing templates) */
.review-item {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.review-item .review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.review-item .review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--glass-100);
  display: flex;
  align-items: center;
  justify-content: center;
}

.review-item .review-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-item .review-avatar span {
  font-weight: 600;
  color: var(--text);
}

.review-item .review-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.review-item .review-name {
  font-weight: 600;
  font-size: 14px;
}

.review-item .review-date {
  font-size: 12px;
  color: var(--muted);
}

.review-item .review-rating {
  display: flex;
  gap: 4px;
}

.review-item .review-comment {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--glass-50);
  padding: 12px;
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

/* Review Tabs */
.reviews-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--stroke);
}

.reviews-section {
  display: block;
}

.reviews-section.hidden {
  display: none;
}

/* Review Modal / Form */
.review-modal {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 24px;
  max-width: 500px;
  margin: 0 auto;
}

.review-modal-header {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text);
}

.review-form-group {
  margin-bottom: 16px;
}

.review-form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.review-rating-input {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.review-rating-input .star {
  font-size: 32px;
  cursor: pointer;
  color: var(--glass-300);
  transition: all 0.2s ease;
}

.review-rating-input .star:hover,
.review-rating-input .star.filled {
  color: #fbbf24;
  transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .review-attributes {
    grid-template-columns: 1fr;
  }

  .review-photos {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  }

  .review-summary-num {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .review-card {
    padding: 12px;
  }

  .review-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .review-rating {
    align-self: flex-end;
  }
}
