/**
 * Storefront Product Reviews & Ratings Styling
 */

/* Summary Header on Product Details Page */
.pd-rating-header {
  font-size: 0.95rem;
}

.pd-rating-header .fa-star,
.pd-rating-header .fa-star-half-o {
  color: #f59e0b !important;
}

.pd-rating-header .fa-star-o {
  color: #d1d5db !important;
}

/* Reviews Tab Main Container */
.jdh-reviews-container {
  padding: 1rem 0.5rem;
}

/* Review Overview Box */
.jdh-review-overview-card {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.jdh-rating-score-box {
  text-align: center;
  padding: 0.5rem 1rem;
}

.jdh-rating-score-large {
  font-size: 3.5rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1;
}

.jdh-rating-stars-large {
  font-size: 1.25rem;
  color: #f59e0b;
  margin: 0.5rem 0 0.25rem;
}

.jdh-rating-based-on {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 0;
}

/* Rating Breakdown Progress Bars */
.jdh-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  justify-content: center;
}

.jdh-breakdown-row {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  gap: 0.75rem;
}

.jdh-breakdown-label {
  min-width: 45px;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.jdh-breakdown-bar-wrap {
  flex: 1;
  background-color: #e2e8f0;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.jdh-breakdown-bar {
  background-color: #f59e0b;
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.jdh-breakdown-pct {
  min-width: 35px;
  text-align: right;
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
}

/* Verified Buyer Notice & Buttons */
.jdh-verified-cta-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
  padding: 0.5rem;
}

.btn-write-review {
  background-color: #e25822 !important;
  border-color: #e25822 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  padding: 0.55rem 1.25rem !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
}

.btn-write-review:hover {
  background-color: #c2410c !important;
  border-color: #c2410c !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(226, 88, 34, 0.25) !important;
}

/* Interactive Star Rating Input */
.jdh-star-rating-input {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 0.25rem;
}

.jdh-star-rating-input input {
  display: none;
}

.jdh-star-rating-input label {
  font-size: 1.75rem;
  color: #cbd5e1;
  cursor: pointer;
  margin-bottom: 0;
  transition: color 0.15s ease, transform 0.15s ease;
}

.jdh-star-rating-input label:hover,
.jdh-star-rating-input label:hover ~ label,
.jdh-star-rating-input input:checked ~ label {
  color: #f59e0b;
}

.jdh-star-rating-input label:hover {
  transform: scale(1.15);
}

/* Review Submission Card Form */
.jdh-review-form-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.75rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.jdh-review-form-card .form-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #334155;
  margin-bottom: 0.35rem;
}

/* Verified Buyer Notice Card */
.jdh-notice-card {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.jdh-notice-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* Single Review Card in List */
.jdh-review-item {
  border-bottom: 1px solid #e2e8f0;
  padding: 1.5rem 0;
}

.jdh-review-item:first-child {
  padding-top: 0.5rem;
}

.jdh-review-item:last-child {
  border-bottom: none;
}

.jdh-review-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.jdh-review-author {
  font-weight: 700;
  color: #1e293b;
  font-size: 0.95rem;
}

.badge-verified-buyer {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #059669;
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 0.15rem 0.55rem;
  border-radius: 12px;
}

.jdh-review-date {
  font-size: 0.82rem;
  color: #64748b;
}

.jdh-review-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.4rem;
}

.jdh-review-body {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.jdh-review-photo-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jdh-review-photo-thumb:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

/* Product Card Star Rating Row */
.jdh-card-rating-row {
  min-height: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
}

.jdh-card-rating-row .jdh-star-rating {
  display: inline-flex;
  align-items: center;
  font-size: 0.76rem;
  line-height: 1;
  gap: 2px;
}

.jdh-card-rating-row .jdh-star-rating .fa-star,
.jdh-card-rating-row .jdh-star-rating .fa-star-half-o {
  color: #f59e0b !important;
}

.jdh-card-rating-row .jdh-star-rating .fa-star-o {
  color: #cbd5e1 !important;
}

.jdh-card-rating-row .jdh-star-rating__num {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e293b;
  margin-left: 4px;
}

.jdh-card-rating-row .jdh-star-rating__count {
  font-size: 0.72rem;
  color: #64748b;
  margin-left: 2px;
}

