/* Reviews wrapper */
.wpfc-reviews {
  margin-top: 10px;
}

/* Header */
.wpfc-reviews-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.wpfc-reviews-title {
  font-size: 18px;
  font-weight: 600;
}
.wpfc-reviews-sort {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
}

/* Summary */
.wpfc-reviews-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid #eee;
  border-radius: 14px;
  background: #fff;
  margin-bottom: 14px;
}
.wpfc-reviews-summary-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wpfc-reviews-summary-avg {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}
.wpfc-reviews-summary-stars {
  font-size: 16px;
  letter-spacing: 1px;
  opacity: 0.9;
}
.wpfc-reviews-summary-right {
  text-align: right;
}
.wpfc-reviews-summary-count {
  font-size: 13px;
  color: #555;
}

/* List */
.wpfc-review-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px; /* space before form */
}
.wpfc-review {
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}
.wpfc-review-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.wpfc-review-stars {
  font-size: 16px;
  letter-spacing: 1px;
}
.wpfc-review-who {
      font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wpfc-review-who .name {
  font-weight: 600;
}
.wpfc-review-who .badge {

  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #2563EB;
}
.wpfc-review-date {
  font-size: 12px;
  color: #666;
}
.wpfc-review-title {
  font-weight: 600;
  margin-top: 10px;
  font-size:20px;
}
.wpfc-review-content {
  margin-top: 6px;
  white-space: pre-wrap;
  line-height: 1.45;
  color: #222;
}
.wpfc-review-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Form (now under list) */
.wpfc-review-form {
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}
.wpfc-review-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.wpfc-review-form-row label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}
.wpfc-review-form-row input,
.wpfc-review-form-row textarea,
.wpfc-review-form-row select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fff;
  outline: none;
}
.wpfc-review-form-row input:focus,
.wpfc-review-form-row textarea:focus,
.wpfc-review-form-row select:focus {
  border-color: #bbb;
}

/* Actions + buttons */
.wpfc-review-form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.wpfc-review-delete,
.wpfc-review-report {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.wpfc-review-delete:hover,
.wpfc-review-report:hover {
  border-color: #cfcfcf;
}

/* Form message (errors etc.) */
.wpfc-review-form-msg {
  font-size: 13px;
  color: #b00020;
  margin-left: auto;
}

/* Info/empty/loading/error blocks */
.wpfc-review-loading,
.wpfc-review-error,
.wpfc-review-empty,
.wpfc-review-login-note {
  padding: 12px;
  border: 1px dashed #ddd;
  border-radius: 14px;
  background: #fff;
}

/* Make "note" blocks look slightly softer than errors */
.wpfc-review-login-note {
  color: #444;
}

/* Mobile polish */
@media (max-width: 600px) {
  .wpfc-reviews-summary {
    flex-direction: column;
    align-items: flex-start;
  }
  .wpfc-reviews-summary-right {
    text-align: left;
  }
  .wpfc-review-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .wpfc-review-actions {
    justify-content: flex-start;
  }
  .wpfc-review-form-msg {
    margin-left: 0;
  }
}


/* Stars */
.wpfc-reviews-summary-stars,
.wpfc-review-stars {
  display: inline-flex;
  gap: 2px;
  line-height: 1;
  user-select: none;
}

.wpfc-reviews-summary-stars .star,
.wpfc-review-stars .star {
  font-size: 18px;
}

.wpfc-review-stars .star { font-size: 16px; }

/* Colors */
.wpfc-reviews-summary-stars .star.full,
.wpfc-review-stars .star.full {
  color: #f5b301; /* yellow */
}

.wpfc-reviews-summary-stars .star.empty,
.wpfc-review-stars .star.empty {
  color: #ddd;
}

/* Half star: left half yellow, right half gray */
.wpfc-reviews-summary-stars .star.half,
.wpfc-review-stars .star.half {
  color: transparent;
  background: linear-gradient(90deg, #f5b301 50%, #ddd 50%);
  -webkit-background-clip: text;
  background-clip: text;
}


/* Inline rating near title/price */
.wpfc-rating-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

.wpfc-rating-number {
  font-weight: 600;
  font-size: 14px;
}

.wpfc-rating-stars {
  display: inline-flex;
  gap: 2px;
}

.wpfc-rating-stars .star {
  font-size: 14px;
}

/* reuse same colors */
.wpfc-rating-stars .star.full {
  color: #f5b301;
}
.wpfc-rating-stars .star.empty {
  color: #ddd;
}
.wpfc-rating-stars .star.half {
  color: transparent;
  background: linear-gradient(90deg, #f5b301 50%, #ddd 50%);
  -webkit-background-clip: text;
  background-clip: text;
}


.wpfc-rating-inline {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

/* Prevent child elements from intercepting mouse events so tooltip doesn't flicker */
.wpfc-rating-inline > *,
.wpfc-rating-tooltip-trigger > * {
  pointer-events: none;
}

.wpfc-rating-inline:hover {
  opacity: 0.85;
}



/* Hover rating tooltip (Amazon-ish) */
.wpfc-rating-tip-wrap{
  width: 320px;
  background:#fff;
  border:1px solid rgba(0,0,0,.18);
  border-radius:12px;
  box-shadow: 0 18px 55px rgba(0,0,0,.20);
  padding:12px 12px 10px;
}

.wpfc-rating-tip__head{
  display:flex;
  align-items:center;
  gap:10px;
}

.wpfc-rating-tip__stars{
  display:inline-flex;
  gap:2px;
  font-size:16px;
  line-height:1;
}
.wpfc-rating-tip__stars .s.full{ color:#f6b100; }
.wpfc-rating-tip__stars .s.empty{ color:#e1e1e1; }
.wpfc-rating-tip__stars .s.half{
  position:relative;
  color:#e1e1e1;
}
.wpfc-rating-tip__stars .s.half:before{
  content:"★";
  position:absolute;
  left:0;
  top:0;
  width:50%;
  overflow:hidden;
  color:#f6b100;
}

.wpfc-rating-tip__avg{
  font-size:14px;
  font-weight:800;
  color:#111;
  letter-spacing:-0.01em;
}

.wpfc-rating-tip__count{
  margin-top:6px;
  font-size:13px;
  color:#565959;
}

.wpfc-rating-tip__rows{
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.wpfc-rating-tip__row{
  display:grid;
  grid-template-columns: 44px 1fr 44px;
  gap:10px;
  align-items:center;
  font-size:13px;
  color:#111;
}

.wpfc-rating-tip__label{
  color:#0f1111;
}

.wpfc-rating-tip__bar{
  height:12px;
  border-radius:999px;
  background:#eee;
  overflow:hidden;
  border:1px solid rgba(0,0,0,.10);
}
.wpfc-rating-tip__bar span{
  display:block;
  height:100%;
  background:#f6b100;
}

.wpfc-rating-tip__pct{
  text-align:right;
  color:#565959;
  font-weight:700;
}

.wpfc-rating-tip__link{
  display:block;
  margin-top:12px;
  padding-top:10px;
  border-top:1px solid rgba(0,0,0,.10);
  text-decoration:none;
  font-size:13px;
  font-weight:800;
  color:#007185;
}
.wpfc-rating-tip__link:hover{
  text-decoration:underline;
}

.wpfc-rating-tip__loading{
  font-size:13px;
  color:#565959;
  padding:10px 6px;
}


.wpfc-rating-tooltip {
  position: absolute;
  z-index: 99999;
  background: #fff;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  padding: 12px;
  width: 320px;
}


.wpfc-plp-card__rating-count {
    font-size: 13px;
    color: #666;
}


/* Collapsible review form */
.wpfc-review-form-wrap{
  border:1px solid #eee;
  border-radius:14px;
  background:#fff;
  margin-top:14px;
  overflow:hidden;
}

.wpfc-review-form-toggle{
  width:100%;
  text-align:left;
  padding:12px 14px;
  background:#fff;
  border:0;
  cursor:pointer;
  font-weight:700;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.wpfc-review-form-toggle:after{
  content:"";
  width:10px;
  height:10px;
  border-right:2px solid rgba(0,0,0,.55);
  border-bottom:2px solid rgba(0,0,0,.55);
  transform: rotate(45deg);
  transition: transform .2s ease;
}

.wpfc-review-form-wrap.is-open .wpfc-review-form-toggle:after{
  transform: rotate(-135deg);
}

.wpfc-review-form-body{
  display:none;
  padding:14px;
  border-top:1px solid rgba(0,0,0,.06);
}

.wpfc-review-form-wrap.is-open .wpfc-review-form-body{
  display:block;
}

/* Make who + badge sit nicely left of stars */
.wpfc-review-who{
  display:flex;
  align-items:center;
  gap:8px;
  min-width: 180px;
}
