/* BST Product Review Magic — Frontend Styles */

/* ---- Star widget (shortcode / loop) ---- */
.bst-prm-star-widget {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  line-height: 1;
}
.bst-prm-stars-display { display: inline-flex; gap: 1px; }
.bst-prm-star           { display: inline-block; font-size: 16px; line-height: 1; }
.bst-prm-star-full      { color: #f0a500; }
.bst-prm-star-half      { color: #f0a500; position: relative; }
.bst-prm-star-empty     { color: #ddd; }
.bst-prm-rating-text    { color: #555; font-size: 13px; }
.bst-prm-review-count   { color: #888; }

/* ---- Reviews list ---- */
.bst-prm-reviews-wrap   { margin: 40px 0; }
.bst-prm-reviews-header { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.bst-prm-reviews-title  { margin: 0; font-size: 1.3em; }
.bst-prm-overall-rating { display: flex; align-items: center; gap: 8px; }
.bst-prm-avg-number     { font-size: 2em; font-weight: 700; line-height: 1; color: #222; }
.bst-prm-avg-label      { font-size: 13px; color: #777; }

.bst-prm-review-list { list-style: none; margin: 0; padding: 0; }
.bst-prm-review-item {
  border-bottom: 1px solid #eee;
  padding: 20px 0;
}
.bst-prm-review-item:last-child { border-bottom: none; }

.bst-prm-review-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
  font-size: 13px;
  color: #666;
}
.bst-prm-reviewer { font-weight: 600; color: #333; }
.bst-prm-verified { color: #28a745; font-size: 12px; }
.bst-prm-date     { color: #999; }
.bst-prm-review-stars  { margin-bottom: 6px; }
.bst-prm-review-title  { margin: 0 0 6px; font-size: 1em; }
.bst-prm-review-content { color: #444; line-height: 1.7; font-size: 14px; }
.bst-prm-review-content p { margin: 0 0 8px; }

.bst-prm-no-reviews { color: #888; font-style: italic; }

/* ---- Review submission form ---- */
.bst-prm-review-form-wrap { max-width: 720px; margin: 0 auto; }
.bst-prm-heading     { font-size: 1.6em; margin-bottom: 6px; }
.bst-prm-subheading  { color: #666; margin-bottom: 24px; }

.bst-prm-product-block {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 20px;
  background: #fafafa;
}
.bst-prm-product-block.bst-prm-done { opacity: .7; }

.bst-prm-product-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.bst-prm-product-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.bst-prm-product-name { font-weight: 600; font-size: 1.05em; color: #222; }

.bst-prm-label  { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.bst-prm-field  { margin-bottom: 14px; }

/* CSS-only star picker */
.bst-prm-rating-group { margin-bottom: 16px; }
.bst-prm-stars {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 4px;
}
.bst-prm-stars input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.bst-prm-stars label {
  font-size: 32px;
  color: #ddd;
  cursor: pointer;
  transition: color .1s;
  line-height: 1;
}
.bst-prm-stars label:hover,
.bst-prm-stars label:hover ~ label,
.bst-prm-stars input:checked ~ label {
  color: #f0a500;
}

.bst-prm-input,
.bst-prm-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
  background: #fff;
}
.bst-prm-input:focus,
.bst-prm-textarea:focus {
  border-color: #007cba;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0,124,186,.2);
}
.bst-prm-textarea { resize: vertical; min-height: 100px; }

.bst-prm-submit-wrap { margin-top: 20px; }
.bst-prm-btn {
  display: inline-block;
  padding: 12px 28px;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, opacity .2s;
}
.bst-prm-btn-primary { background: #222; color: #fff; }
.bst-prm-btn-primary:hover { background: #444; color: #fff; }

/* Notices */
.bst-prm-notice  { padding: 16px 20px; background: #fff3cd; border: 1px solid #ffc107; border-radius: 6px; color: #856404; }
.bst-prm-success { padding: 20px 24px; background: #d4edda; border: 1px solid #28a745; border-radius: 6px; color: #155724; font-size: 16px; }
.bst-prm-already-reviewed { color: #28a745; font-weight: 600; }

/* ---- Store reply (public) ---- */
.bst-prm-review-reply {
  margin-top: 14px;
  padding: 14px 18px;
  background: #f0f6fc;
  border-left: 3px solid #2271b1;
  border-radius: 0 6px 6px 0;
}

.bst-prm-reply-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.bst-prm-reply-icon { color: #2271b1; font-size: 16px; width: 16px; height: 16px; flex-shrink: 0; }
.bst-prm-reply-author { font-size: 13px; color: #1d2327; }
.bst-prm-reply-date { font-size: 12px; color: #787c82; }

.bst-prm-reply-body p { margin: 0; font-size: 14px; color: #3c434a; line-height: 1.7; }
