/**
 * Reviews System Styles
 * Estilos para el sistema de reseñas de clientes
 */

/* ============================================================================
   REVIEWS CONTAINER
   ============================================================================ */

#reviews-container {
  display: grid;
  gap: 2rem;
  margin: 2rem 0;
}

.review-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.review-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   REVIEW HEADER
   ============================================================================ */

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

.review-author {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.review-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.review-author-info h4 {
  margin: 0;
  font-size: 1.1rem;
  color: #fff;
}

.review-country {
  margin: 0.25rem 0 0 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.review-rating {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.review-rating-number {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================================================
   STARS
   ============================================================================ */

.stars {
  display: flex;
  gap: 0.25rem;
}

.stars i {
  color: #fbbf24;
  font-size: 1.1rem;
}

.stars i.small {
  font-size: 0.9rem;
}

/* ============================================================================
   REVIEW CONTENT
   ============================================================================ */

.review-title {
  margin: 0 0 0.75rem 0;
  font-size: 1.25rem;
  color: #fff;
  font-weight: 600;
}

.review-comment {
  margin: 0 0 1rem 0;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
}

/* ============================================================================
   DETAILED RATINGS
   ============================================================================ */

.review-detailed-ratings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  margin: 1rem 0;
}

.rating-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.rating-item span {
  color: rgba(255, 255, 255, 0.7);
  min-width: 120px;
}

/* ============================================================================
   REVIEW FOOTER
   ============================================================================ */

.review-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.review-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.review-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.review-meta i {
  font-size: 0.85rem;
}

.review-tour-type {
  text-transform: capitalize;
}

.btn-helpful {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-helpful:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn-helpful.has-votes {
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.3);
}

.btn-helpful.voted {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  cursor: default;
}

.btn-helpful:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================================================
   OWNER RESPONSE
   ============================================================================ */

.owner-response {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: rgba(59, 130, 246, 0.1);
  border-left: 3px solid #3b82f6;
  border-radius: 8px;
}

.response-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  color: #60a5fa;
  font-size: 0.95rem;
}

.response-header i {
  font-size: 0.9rem;
}

.owner-response p {
  margin: 0 0 0.5rem 0;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.response-date {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================================================
   REVIEW STATS
   ============================================================================ */

#review-stats {
  margin: 2rem 0;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.review-stats-summary {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: center;
}

.average-rating {
  text-align: center;
}

.rating-number {
  font-size: 4rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.rating-count {
  margin: 0.75rem 0 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.rating-distribution {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rating-bar {
  display: grid;
  grid-template-columns: 60px 1fr 40px;
  gap: 1rem;
  align-items: center;
}

.star-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.star-label i {
  color: #fbbf24;
  font-size: 0.85rem;
}

.bar-container {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

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

.rating-bar .count {
  text-align: right;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

/* ============================================================================
   REVIEW MODAL
   ============================================================================ */

.review-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
  overflow-y: auto;
}

.review-modal-content {
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.review-modal h2 {
  margin: 0 0 0.5rem 0;
  color: #fff;
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.review-modal h2 i {
  color: #fbbf24;
}

.modal-subtitle {
  margin: 0 0 2rem 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
}

.close-modal {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s ease;
}

.close-modal:hover {
  color: #fff;
}

/* ============================================================================
   STAR RATING INPUT
   ============================================================================ */

.star-rating-input {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.star-rating-input i {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.star-rating-input i.fas {
  color: #fbbf24;
}

.star-rating-input.small i {
  font-size: 1.5rem;
}

.detailed-ratings-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.detailed-ratings-section h3 {
  margin: 0 0 1.5rem 0;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
}

/* ============================================================================
   FORM STYLES
   ============================================================================ */

.form-help {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.form-note {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(59, 130, 246, 0.1);
  border-left: 3px solid #3b82f6;
  border-radius: 4px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.form-note i {
  color: #60a5fa;
  margin-top: 0.15rem;
}

/* ============================================================================
   EMPTY STATES
   ============================================================================ */

.no-reviews,
.error-message {
  text-align: center;
  padding: 4rem 2rem;
  color: rgba(255, 255, 255, 0.6);
}

.no-reviews i,
.error-message i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.no-reviews h3 {
  margin: 1rem 0 0.5rem 0;
  color: rgba(255, 255, 255, 0.8);
}

.error-message p {
  margin: 1rem 0 0 0;
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
  .review-header {
    flex-direction: column;
    gap: 1rem;
  }

  .review-rating {
    align-items: flex-start;
  }

  .review-stats-summary {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .review-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .review-detailed-ratings {
    grid-template-columns: 1fr;
  }

  .review-modal-content {
    padding: 2rem 1.5rem;
  }

  .rating-number {
    font-size: 3rem;
  }
}

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

  .review-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .star-rating-input i {
    font-size: 1.75rem;
  }
}
