/**
 * Style dla modułu Majsterkowo Reviews Page
 *
 * @author    Majsterkowo
 * @copyright 2024 Majsterkowo
 */

/* ===========================
   Strona z opiniami
   =========================== */

.page-customer-reviews .reviews-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding: 1rem;
  background: #f6f6f6;
  border-radius: 4px;
}

.page-customer-reviews .reviews-count {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.page-customer-reviews .reviews-count i {
  color: #25b9d7;
}

/* Sekcja produktów do zaopiniowania */
.products-to-review-section {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.products-to-review-section h2 {
  color: #25b9d7;
  margin-bottom: 0.5rem;
}

.products-to-review-section .help-text {
  color: #666;
  margin-bottom: 1.5rem;
}

.products-to-review .product-to-review-item {
  margin-bottom: 1.5rem;
}

.products-to-review .product-miniature {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
  height: 100%;
  /* Rozciągnij na pełną wysokość kolumny */
  display: flex;
  flex-direction: column;
}

.products-to-review .product-miniature:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.products-to-review .thumbnail-container {
  position: relative;
  overflow: hidden;
  background: #f8f8f8;
  flex-shrink: 0;
  /* Nie zmniejszaj zdjęcia */
}

.products-to-review .thumbnail-container img {
  width: 100%;
  height: auto;
  display: block;
}

.products-to-review .product-description {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  /* Wypełnij dostępną przestrzeń */
}

.products-to-review .product-title {
  font-size: 1rem;
  margin: 0 0 1rem 0;
  flex-grow: 1;
  /* Rozpocznij wypychanie treści w dół, ale margin-top: auto w actions zadziała lepiej dla wyrównania do samego dołu */
}

.products-to-review .product-title a {
  color: #333;
  text-decoration: none;
}

.products-to-review .product-title a:hover {
  color: #25b9d7;
}

.products-to-review .product-reference {
  display: none;
  /* Ukryj referencję jeśli jeszcze gdzieś została w HTML */
}

.products-to-review .product-actions {
  margin-top: auto;
  /* Wypchnij przycisk na sam dół */
}

.products-to-review .btn-review {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Lista opinii */
.product-reviews-list {
  margin-top: 2rem;
}

.product-comment-list-item {
  background: #fff;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.product-comment-list-item .comment-infos {
  text-align: center;
}

.product-comment-list-item .grade-stars {
  display: flex;
  gap: 2px;
  justify-content: center;
  margin-bottom: 0.75rem;
  color: #ffc107;
}

.product-comment-list-item .grade-stars i {
  font-size: 1.25rem;
}

.product-comment-list-item .comment-date {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.product-comment-list-item .comment-author {
  font-size: 0.875rem;
  color: #333;
  font-weight: 600;
}

.product-comment-list-item .comment-content h4 {
  color: #333;
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
}

.product-comment-list-item .comment-content p {
  color: #555;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.product-comment-list-item .comment-product-link {
  margin-bottom: 1rem;
}

.product-comment-list-item .comment-product-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #25b9d7;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.product-comment-list-item .comment-product-link a:hover {
  color: #1a8a9f;
}

.product-comment-list-item .comment-images {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.product-comment-list-item .review-image-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.product-comment-list-item .review-image-thumb:hover {
  transform: scale(1.05);
}

/* Brak opinii */
.no-reviews {
  text-align: center;
  padding: 3rem;
  background: #f6f6f6;
  border-radius: 8px;
}

.no-reviews p {
  color: #666;
  font-size: 1.125rem;
}

/* Separator */
.separator {
  border: 0;
  border-top: 2px solid #e0e0e0;
  margin: 2rem 0;
}

/* ===========================
   Widget ostatnich opinii
   =========================== */

.latest-reviews-widget {
  margin: 2rem 0;
}

.latest-reviews-widget .section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  color: #333;
}

.latest-reviews-widget .section-title i {
  color: #ffc107;
}

/* Ukryj serduszko wishlist w widgecie opinii - silniejsze reguły */
.latest-reviews-widget .review-card .wishlist-button-add,
.latest-reviews-widget .review-card .wishlist-button-remove,
.latest-reviews-widget .review-card .wishlist-button-product,
.latest-reviews-widget .thumbnail-container .wishlist-button-add,
.latest-reviews-widget .thumbnail-container .wishlist-button-remove,
.latest-reviews-widget button.wishlist-button-add,
.latest-reviews-widget button.wishlist-button-remove {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Ukryj przycisk quickview */
.latest-reviews-widget .review-card .product-miniature__quickview,
.latest-reviews-widget .review-card .product-miniature__quickview_touch {
  display: none !important;
}

/* Placeholder dla opinii bez zdjęć */
.latest-reviews-widget .no-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  min-height: 320px;
  border-radius: 4px;
}

.latest-reviews-widget .no-image-placeholder i {
  font-size: 80px;
  color: #999;
  opacity: 0.5;
}

/* Gwiazdki jako overlay na zdjęciu - DOLNY LEWY RÓG */
.latest-reviews-widget .review-rating-overlay {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.95);
  padding: 6px 8px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

.latest-reviews-widget .review-rating-overlay .grade-stars {
  display: flex;
  gap: 2px;
  align-items: center;
}

.latest-reviews-widget .review-rating-overlay .grade-stars i {
  font-size: 22px;
  line-height: 1;
}

.latest-reviews-widget .review-rating-overlay .grade-stars i.star-filled {
  color: #ffc107 !important;
}

.latest-reviews-widget .review-rating-overlay .grade-stars i.star-empty {
  color: #ddd;
}

/* Tytuł opinii */
.latest-reviews-widget .review-title {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

/* Treść opinii */
.latest-reviews-widget .review-content-text {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.5;
  margin: 0 0 1rem 0;
}

/* Meta informacje na dole */
.latest-reviews-widget .review-meta-info {
  border-top: 1px solid #eee;
  padding-top: 0.75rem;
  margin-top: auto;
}

.latest-reviews-widget .review-author {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #333;
}

.latest-reviews-widget .review-author i {
  font-size: 18px;
  color: #666;
}

.latest-reviews-widget .review-product {
  display: flex;
  align-items: center;
}

.latest-reviews-widget .review-product a {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: #999;
  font-size: 0.75rem;
  transition: color 0.2s ease;
  font-style: italic;
}

.latest-reviews-widget .review-product a:hover {
  color: #25b9d7;
}

.latest-reviews-widget .review-product i {
  font-size: 14px;
  opacity: 0.7;
}

/* Card body - flex column dla lepszego układu */
.latest-reviews-widget .review-card .card-body {
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

/* Przycisk "Zobacz wszystkie opinie" */
.latest-reviews-widget .all-reviews-link-wrapper {
  margin-top: 2rem;
}

.latest-reviews-widget .all-product-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.latest-reviews-widget .no-reviews-message {
  text-align: center;
  color: #999;
  padding: 2rem;
}

/* ===========================
   Responsywność
   =========================== */

@media (max-width: 991px) {
  .product-comment-list-item .comment-infos {
    margin-bottom: 1rem;
  }
}

@media (max-width: 767px) {
  .products-to-review-section {
    padding: 1rem;
  }

  .products-to-review .product-to-review-item {
    margin-bottom: 1rem;
  }

  .latest-reviews-widget .section-title {
    font-size: 1.5rem;
  }

  /* Poprawki dla listy opinii na mobile */
  .product-comment-list-item {
    padding: 1rem;
  }

  .product-comment-list-item .comment-infos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    text-align: left;
    margin-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 1rem;
    gap: 10px;
  }

  .product-comment-list-item .product-cover-image {
    margin-bottom: 0;
    max-width: 80px;
    margin-right: 10px;
  }

  .product-comment-list-item .grade-stars {
    justify-content: flex-start;
    margin-bottom: 0.25rem;
    width: auto;
  }

  .product-comment-list-item .comment-date,
  .product-comment-list-item .comment-author {
    font-size: 12px;
    margin-right: 10px;
    display: inline-block;
  }

  .product-comment-list-item .comment-content h4 {
    font-size: 1rem;
  }
}