/**
 * ═══════════════════════════════════════════════════════════════════════════════
 * REVIEWS COMPONENT — proprietate.html
 * ═══════════════════════════════════════════════════════════════════════════════
 * 
 * Secțiune recenzii cu:
 * - Rating hero card
 * - Breakdown pe categorii
 * - Lista recenzii
 * - Formular adăugare recenzie
 * 
 * ═══════════════════════════════════════════════════════════════════════════════
 */

/* ─────────────────────────────────────────────────────────
   Reviews Section
   ───────────────────────────────────────────────────────── */
.reviews-section-wow {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

/* ─────────────────────────────────────────────────────────
   Review Helpful Buttons (Like)
   ───────────────────────────────────────────────────────── */
.review-helpful {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--space-3);
}

.btn-helpful {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-helpful:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.btn-helpful svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────
   Rating Hero Card
   ───────────────────────────────────────────────────────── */
.rating-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(245, 158, 11, 0.05));
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: var(--radius-2xl);
}

.rating-hero-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.rating-number-big {
  font-size: 4rem;
  font-weight: var(--font-extrabold);
  color: var(--color-text);
  line-height: 1;
  animation: ratingPulse 2s ease-in-out;
}

@keyframes ratingPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.rating-stars-display {
  display: flex;
  gap: var(--space-1);
}

.rating-stars-display .star-icon {
  width: 24px;
  height: 24px;
  color: #fbbf24;
}

.rating-stars-display .star-icon.half {
  opacity: 0.5;
}

.rating-count-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.rating-badge-label {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
}

.badge-excellent {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  background: #fbbf24;
  color: #0f172a;
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  border-radius: var(--radius-full);
}

.badge-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ─────────────────────────────────────────────────────────
   Rating Breakdown
   ───────────────────────────────────────────────────────── */
.rating-breakdown-modern {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.rating-category {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.category-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.category-icon svg {
  width: 18px;
  height: 18px;
}

.category-label {
  font-size: var(--text-sm);
  color: var(--color-text);
}

.category-bar-container {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.category-bar {
  flex: 1;
  height: 8px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.category-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  border-radius: var(--radius-full);
  transition: width 1s ease-out;
}

.category-score {
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--color-text);
  min-width: 30px;
  text-align: right;
}

/* ─────────────────────────────────────────────────────────
   Reviews List
   ───────────────────────────────────────────────────────── */
.reviews-list-wow {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.review-card-wow {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  animation: reviewSlideIn 0.5s ease-out;
  animation-fill-mode: backwards;
}

.review-card-wow:nth-child(1) { animation-delay: 0.1s; }
.review-card-wow:nth-child(2) { animation-delay: 0.2s; }
.review-card-wow:nth-child(3) { animation-delay: 0.3s; }

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

.review-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}

.review-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.review-author {
  display: flex;
  flex-direction: column;
}

.review-name {
  font-weight: var(--font-semibold);
  color: var(--color-text);
}

.review-date {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

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

.review-rating svg {
  width: 14px;
  height: 14px;
  color: #fbbf24;
}

.review-text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* More reviews button */
.btn-reviews-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  cursor: pointer;
  transition: all var(--transition-base);
  align-self: flex-start;
}

.btn-reviews-more:hover {
  background: var(--color-surface);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ─────────────────────────────────────────────────────────
   Add Review Section
   ───────────────────────────────────────────────────────── */
.add-review-section {
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
}

.add-review-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--color-text);
  margin: 0 0 var(--space-2) 0;
}

.add-review-title svg {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
}

.add-review-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-6) 0;
}

/* Rating categories grid */
.review-rating-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.review-rating-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.review-rating-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text);
}

.rating-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

/* Star rating input with SVG buttons */
.star-rating-input {
  display: flex;
  gap: var(--space-1);
}

.star-rating-input .star-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.star-rating-input .star-btn:hover {
  transform: scale(1.2);
}

.star-rating-input .star-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--color-border);
  stroke-width: 2;
  transition: all var(--transition-fast);
}

.star-rating-input .star-btn.active svg,
.star-rating-input .star-btn:hover svg {
  fill: #fbbf24;
  stroke: #fbbf24;
}

.star-rating-input .star-btn.active ~ .star-btn svg {
  fill: none;
  stroke: var(--color-border);
}

/* Hover effect: all previous stars light up */
.star-rating-input:hover .star-btn svg {
  fill: none;
  stroke: var(--color-border);
}

.star-rating-input .star-btn:hover svg,
.star-rating-input .star-btn:hover ~ .star-btn svg {
  fill: none;
  stroke: var(--color-border);
}

.star-rating-input:has(.star-btn:hover) .star-btn svg {
  fill: #fbbf24;
  stroke: #fbbf24;
}

.star-rating-input:has(.star-btn:hover) .star-btn:hover ~ .star-btn svg {
  fill: none;
  stroke: var(--color-border);
}

/* Selected state styles (using CSS sibling selector in reverse order) */
.star-rating-input[data-value="1"] .star-btn:nth-child(-n+1) svg,
.star-rating-input[data-value="2"] .star-btn:nth-child(-n+2) svg,
.star-rating-input[data-value="3"] .star-btn:nth-child(-n+3) svg,
.star-rating-input[data-value="4"] .star-btn:nth-child(-n+4) svg,
.star-rating-input[data-value="5"] .star-btn:nth-child(-n+5) svg {
  fill: #fbbf24;
  stroke: #fbbf24;
}

/* Textarea */
.review-textarea-wrapper {
  margin-bottom: var(--space-6);
}

.review-textarea-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.review-textarea {
  width: 100%;
  min-height: 120px;
  padding: var(--space-4);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  font-family: inherit;
  font-size: var(--text-base);
  line-height: 1.6;
  resize: vertical;
  transition: border-color var(--transition-base);
}

.review-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.review-textarea::placeholder {
  color: var(--color-text-muted);
}

/* Submit button */
.btn-submit-review {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border: none;
  border-radius: var(--radius-lg);
  color: white;
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-submit-review:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--color-primary-rgb), 0.4);
}

.btn-submit-review svg {
  width: 18px;
  height: 18px;
}

/* Success message */
.review-success-message {
  display: none;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-lg);
  color: #22c55e;
  margin-top: var(--space-4);
}

.review-success-message.show {
  display: flex;
}

.review-success-message svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Reviews section - full width */
  .reviews-section,
  .property-reviews {
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .rating-hero-card {
    flex-direction: column;
    text-align: center;
    gap: var(--space-4);
    padding: var(--space-4);
  }
  
  .rating-badge-label {
    align-items: center;
  }
  
  .rating-breakdown-modern {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  
  .review-rating-categories {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }
  
  .review-card-wow,
  .review-card {
    flex-direction: column;
    padding: var(--space-4);
  }
  
  .reviews-grid {
    gap: var(--space-4);
  }
}

@media (max-width: 480px) {
  .rating-number-big {
    font-size: 3rem;
  }
  
  .review-rating-categories {
    grid-template-columns: 1fr;
  }
  
  .rating-hero-card {
    padding: var(--space-3);
  }
}

