/* ============================================================
   FOODWINER'S — відгуки з рейтингами на картках товарів
   Акцент бренду: #E0A886. Підключається лише у view_drink /
   view_product (лінк прямо в tpl, main.tpl не чіпаємо).
   ============================================================ */

.fw-reviews {
  padding-top: 10px;
}

.fw-reviews-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 18px;
}

/* ---- статичні зірки (сер. рейтинг + оцінки у відгуках) ---- */
.fw-stars {
  position: relative;
  display: inline-block;
  font-size: 18px;
  line-height: 1;
  color: #e2ddd6;
  letter-spacing: 2px;
  vertical-align: middle;
}

.fw-stars-fill {
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  white-space: nowrap;
  color: #E0A886;
  letter-spacing: 2px;
}

/* ---- зведення ---- */
.fw-reviews-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.fw-reviews-summary .fw-stars {
  font-size: 22px;
}

.fw-reviews-avg {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.fw-reviews-count {
  font-size: 14px;
  color: #999;
}

.fw-reviews-empty {
  color: #999;
  font-size: 14px;
  margin-bottom: 24px;
}

/* ---- список відгуків ---- */
.fw-reviews-list {
  margin-bottom: 30px;
}

.fw-review-card {
  background: #fff;
  border: 1px solid #f0e9e2;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.fw-review-card-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.fw-review-name {
  font-weight: 600;
  color: #333;
  font-size: 15px;
}

.fw-review-date {
  font-size: 13px;
  color: #b3aca4;
  margin-left: auto;
}

.fw-review-text {
  font-size: 14px;
  line-height: 1.6;
  color: #555;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ---- форма ---- */
.fw-review-form-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 14px;
}

.fw-review-form {
  background: #fff;
  border: 1px solid #f0e9e2;
  border-radius: 6px;
  padding: 20px;
  width: 100%;
}

.fw-review-form-row {
  margin-bottom: 16px;
}

.fw-review-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fw-review-hint {
  font-weight: 400;
  color: #999;
  text-transform: none;
  letter-spacing: 0;
}

.fw-review-input,
.fw-review-textarea {
  width: 100%;
  border: 1px solid #e5ded6;
  border-radius: 4px;
  background: #fff;
  padding: 10px 14px;
  font-size: 14px;
  color: #333;
  outline: none;
  transition: border-color 0.2s ease;
}

.fw-review-input:focus,
.fw-review-textarea:focus {
  border-color: #E0A886;
}

.fw-review-textarea {
  resize: vertical;
  min-height: 96px;
}

/* ---- 5 радіо-зірок на чистому CSS (DOM 5→1, row-reverse) ---- */
.fw-rate {
  display: inline-flex;
  flex-direction: row-reverse;
}

.fw-rate input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.fw-rate label {
  font-size: 30px;
  line-height: 1;
  color: #e2ddd6;
  cursor: pointer;
  padding: 0 3px;
  margin: 0;
  transition: color 0.15s ease, transform 0.15s ease;
}

.fw-rate label:hover {
  transform: scale(1.12);
}

.fw-rate label:hover,
.fw-rate label:hover ~ label,
.fw-rate input:checked ~ label {
  color: #E0A886;
}

/* ---- honeypot: людині не видно ---- */
.fw-review-hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* ---- кнопка ---- */
.fw-review-submit {
  display: inline-block;
  background: #E0A886;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 12px 28px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.fw-review-submit:hover {
  background: #d29470;
}

/* ---- флеш-повідомлення після відправки ---- */
.fw-review-flash {
  border-radius: 4px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
  width: 100%;
}

.fw-review-flash--ok {
  background: #f2f8f0;
  border: 1px solid #cfe5c8;
  color: #4a7c3f;
}

.fw-review-flash--warn {
  background: #fdf6ec;
  border: 1px solid #f0dcc0;
  color: #a97b32;
}

.fw-review-flash--err {
  background: #fbf0ee;
  border: 1px solid #eccfc9;
  color: #b0523f;
}

@media (max-width: 575px) {
  .fw-review-card-head {
    gap: 8px;
  }

  .fw-review-date {
    width: 100%;
    margin-left: 0;
  }
}
