﻿.reviews-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Tab Navigation */
.tab-navigation {
  display: flex;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 30px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tab-navigation::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
}

.tab-btn:hover {
  color: #333;
  background-color: #f5f5f5;
}

.tab-btn.active {
  color: #1a73e8;
  border-bottom-color: #1a73e8;
}

.tab-icon {
  width: 20px;
  height: 20px;
}

.tab-icon-ebay {
  width: 16px;
  height: 16px;
}

/* Tab Content */
.tab-content {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.tab-content.active {
  display: block !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Reviews Header */
.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

/* Write Review Dropdown */
.write-review-container {
  position: relative;
  display: inline-block;
}

.write-review-btn {
  border: none;
  padding: 8px 28px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(26, 115, 232, 0.2);
}

.write-review-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(26, 115, 232, 0.3);
}

.dropdown-arrow {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.write-review-btn.active .dropdown-arrow {
  transform: rotate(180deg);
}

.write-review-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 280px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border: 1px solid #e0e0e0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.3s ease;
  z-index: 2000;
  margin-top: 8px;
  pointer-events: none;
}

.write-review-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.dropdown-header {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
  border-radius: 12px 12px 0 0;
}

.dropdown-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  text-align: center;
}

.dropdown-options {
  padding: 8px 0;
}

.review-option {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f8f9fa;
}

.review-option:last-child {
  border-bottom: none;
}

.review-option:hover {
  background: #f8f9fa;
  color: #1a73e8;
}

.review-option:hover .option-arrow {
  transform: translateX(4px);
}

.option-icon {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  flex-shrink: 0;
}

.option-content {
  flex: 1;
  min-width: 0;
}

.option-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: inherit;
  margin-bottom: 2px;
}

.option-subtitle {
  display: block;
  font-size: 12px;
  color: #666;
  transition: color 0.2s ease;
}

.review-option:hover .option-subtitle {
  color: #1a73e8;
}

.option-arrow {
  font-size: 14px;
  color: #ccc;
  transition: all 0.2s ease;
  margin-left: 8px;
}

.review-option:hover .option-arrow {
  color: #1a73e8;
}

/* Platform-specific colors */
.google-option:hover {
  background: #f8f9fa;
  border-left: 3px solid #4285f4;
}

.ebay-option:hover {
  background: #f8f9fa;
  border-left: 3px solid #e53e3e;
}

.chrono24-option:hover {
  background: #f8f9fa;
  border-left: 3px solid #2d3748;
}

.platform-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.platform-logo {
  width: 32px;
  height: 32px;
}

.platform-info h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #333;
}

.rating-summary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rating-score {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.stars {
  display: flex;
  gap: 2px;
}

.star {
  font-size: 18px;
  color: #ddd;
}

.star.filled {
  color: #ffc107;
}

.review-count {
  color: #666;
  font-size: 14px;
}

.review-cta-link {
  padding: 8px 28px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.review-cta-btn {
  background: #1a73e8;
  color: white;
  border: none;
  padding: 8px 28px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
  justify-content: center;
}

.review-cta-btn:hover {
  background: #1557b0;
  color: white;
  text-decoration: none;
}

/* Reviews Grid - Masonry Layout */
.reviews-grid {
  column-count: 1;
  column-gap: 20px;
  column-fill: balance;
}

@media (min-width: 768px) {
  .reviews-grid {
    column-count: 2;
  }
}

@media (min-width: 1024px) {
  .reviews-grid {
    column-count: 3;
  }
}

@media (min-width: 1400px) {
  .reviews-grid {
    column-count: 4;
  }
}

.reviews-grid .review-card {
  break-inside: avoid;
  page-break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin-bottom: 20px;
  vertical-align: top;
}

.review-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.review-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  transform: translateY(-3px);
  border-color: #d0d0d0;
}

/* Masonry Layout Enhancements */
.reviews-grid {
  transition: all 0.3s ease;
}

.reviews-grid .review-card {
  transition: all 0.3s ease;
}

/* Smooth height adjustments for read more/less */
.review-text {
  transition: all 0.3s ease;
}

.read-more-btn {
  transition: all 0.2s ease;
}

/* Ensure proper spacing in masonry layout */
@media (max-width: 767px) {
  .reviews-grid {
    column-gap: 15px;
  }

  .reviews-grid .review-card {
    margin-bottom: 15px;
  }
}

/* Additional masonry enhancements */
.reviews-grid .review-card {
  box-sizing: border-box;
  break-inside: avoid-column;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  orphans: 1;
  widows: 1;
}

/* Prevent cards from becoming too narrow */
@media (min-width: 1400px) {
  .reviews-grid .review-card {
    min-width: 280px;
  }
}

@media (min-width: 1024px) and (max-width: 1399px) {
  .reviews-grid .review-card {
    min-width: 250px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .reviews-grid .review-card {
    min-width: 220px;
  }
}

.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.reviewer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  font-size: 16px;
  overflow: hidden;
}

.reviewer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reviewer-info {
  flex: 1;
}

.reviewer-info h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.review-date {
  font-size: 12px;
  color: #666;
}

.review-rating {
  display: flex;
  flex-direction: row;
  gap: 4px;
  margin-bottom: 8px;
  align-items: center;
  justify-content: flex-start !important;
}

.review-rating .star {
  font-size: 18px;
  color: #ddd;
  line-height: 1;
  transition: color 0.2s ease;
}

.review-rating .star.filled {
  color: #ffc107;
}

.review-text {
  color: #333;
  line-height: 1.5;
  margin-bottom: 12px;
  font-size: 14px;
}

.read-more-btn {
  background: none;
  border: none;
  color: #1a73e8;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  margin-bottom: 12px;
}

.read-more-btn:hover {
  text-decoration: underline;
}

.review-source {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #666;
}

.review-source img {
  width: 28px;
  height: 28px;
}

.review-source-ebay,
.ebay-logo {
  width: 22px !important;
  height: 22px !important;
}

.review-source-link {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #666;
  transition: color 0.2s ease;
}

.review-source-link:hover {
  color: #1a73e8;
  text-decoration: none;
}

.review-source-link:hover span {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .reviews-container {
    padding: 15px;
  }

  .reviews-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .platform-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .write-review-container {
    align-self: flex-end;
  }

  .write-review-dropdown {
    min-width: 250px;
    right: -10px;
  }

  .reviews-grid {
    column-count: 1;
    column-gap: 0;
  }

  .reviews-grid .review-card {
    margin-bottom: 15px;
  }

  .tab-btn {
    padding: 10px 15px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .reviews-container {
    padding: 10px;
  }

  .review-card {
    padding: 15px;
  }

  .platform-info h2 {
    font-size: 20px;
  }
}

/* Animation for tab switching */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-content.active {
  animation: fadeInUp 0.4s ease forwards;
}

/* Pagination Styles */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding: 20px 0;
}

.page-link {
  display: inline-block;
  padding: 8px 12px;
  background: #f5f5f5;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.page-link:hover {
  background: #1a73e8;
  color: white;
}

.page-link.active {
  background: #1a73e8;
  color: white;
  cursor: default;
}

.page-link.active:hover {
  background: #1a73e8;
}

/* Load More Button Styles */
.load-more-container {
  display: flex;
  justify-content: center;
  padding: 30px 0;
}

.load-more-btn {
  background: #f3f4f5;
  color: #222;
  border: none;
  padding: 8px 28px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
  justify-content: center;
}

.load-more-btn:hover:not(:disabled) {
  background: #dadbdc;
  color: #222;
  transform: translateY(-1px);
}

.load-more-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.loading-spinner {
  display: inline-block;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
