﻿.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 */
.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .reviews-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1400px) {
  .reviews-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.review-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  height: 240px;
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.review-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  border-color: #d0d0d0;
}

.review-card.expanded {
  height: auto;
  z-index: 5;
}

.review-text {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.review-card.expanded .review-text {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.read-more-btn {
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.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-card__source-label {
  display: none;
}

.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: 8px;
  font-size: 14px;
  word-break: break-word;
}

.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;
  margin-top: auto;
  padding-top: 8px;
  flex-shrink: 0;
}

.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 {
    gap: 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);
  }
}

/* ==========================================================================
   Homepage reviews section
   ========================================================================== */
.home-reviews-section {
  padding: 48px 0 24px;
}

.home-reviews-section__header {
  margin-bottom: 24px;
}

.home-reviews-section__header h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0;
}

.home-reviews-section__action {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.home-reviews-section__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  min-height: 34px;
  padding: 8px 28px;
  border-radius: 18px;
  background: #000;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.home-reviews-section__button:hover,
.home-reviews-section__button:focus {
  background: #222;
  color: #fff;
  text-decoration: none;
}

.review-provider-rows {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.review-provider-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.review-provider-summary,
.review-provider-row > .review-card {
  height: 196px;
  min-width: 0;
  border: 1px solid #aaa;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.review-provider-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-align: center;
}

.review-provider-summary__name {
  margin: 0 0 2px;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.05;
}

.review-provider-summary__since {
  max-width: 180px;
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.12;
}

.review-provider-summary__stat {
  margin: 0 0 3px;
  color: #111;
  font-size: 13px;
  line-height: 1.18;
}

.review-provider-row > .review-card {
  padding: 18px 20px;
  overflow: hidden;
}

.review-provider-row > .review-card:hover {
  border-color: #777;
  box-shadow: none;
}

.review-provider-row .reviewer-avatar,
.review-provider-row .review-card__footer {
  display: none;
}

.review-provider-row .review-header {
  gap: 0;
  margin-bottom: 8px;
}

.review-provider-row .reviewer-info h4 {
  overflow: hidden;
  margin: 0;
  color: #111;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-provider-row .review-date,
.review-provider-row .review-card__source-label {
  display: block;
  color: #111;
  font-size: 12px;
  line-height: 1.2;
}

.review-provider-row .review-rating {
  gap: 5px;
  margin-bottom: 8px;
}

.review-provider-row .review-rating .star,
.review-provider-row .review-rating .star.filled {
  color: #111;
  font-size: 15px;
}

.review-provider-row .review-card__content {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.review-provider-row .review-text {
  flex: none;
  margin: 0 0 2px;
  color: #111;
  font-size: 12px;
  line-height: 1.22;
  -webkit-line-clamp: 3;
}

.review-provider-row .read-more-btn {
  align-self: flex-start;
  margin: 0;
  color: #111;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.all-reviews-provider-rows {
  margin: 8px 0 38px;
}

.all-reviews-list__heading {
  margin: 0 0 20px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0;
}

.reviews-grid__empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #777;
  padding: 30px 0;
}

/* Marketing-style source summary cards (Homepage + Reviews page).
   The Watch Detail page keeps reusing .wd-ratings-bar instead (see watch-detail-styles.css). */
.review-source-summary--cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.review-source-summary__card {
  background: #f8f8f8;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 16px 20px;
  text-align: center;
}

.review-source-summary__name {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
}

.review-source-summary__since,
.review-source-summary__stat {
  font-size: 13px;
  color: #666;
  margin: 0 0 2px;
}

@media (max-width: 767px) {
  .home-reviews-section {
    padding-top: 32px;
  }

  .home-reviews-section__header h2 {
    font-size: 22px;
    line-height: 1.25;
  }

  .review-provider-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .review-provider-summary,
  .review-provider-row > .review-card {
    height: 190px;
  }

  .review-source-summary--cards {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .review-provider-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==========================================================================
   Shared review detail dialog (Bootstrap modal)
   ========================================================================== */
.review-dialog {
  max-width: 700px;
}

.review-dialog .modal-content {
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  border: none;
  overflow: hidden;
}

.review-dialog__header {
  align-items: flex-start;
  border-bottom: 1px solid #eee;
  padding: 20px 24px;
}

.review-dialog__reviewer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-dialog__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}

.review-dialog__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-dialog__name {
  margin: 0;
  font-size: 18px;
}

.review-dialog__body {
  padding: 20px 24px 24px;
  max-height: 60vh;
  overflow-y: auto;
}

.review-dialog__text {
  white-space: pre-line;
  line-height: 1.6;
  color: #333;
  margin: 12px 0 20px;
}

.review-dialog__footer {
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.review-dialog__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
}

@media (max-width: 576px) {
  .review-dialog {
    max-width: calc(100% - 1rem);
    margin: 0.5rem auto;
  }

  .review-dialog__body {
    max-height: 70vh;
  }
}

