/**
 * Reviews: the filter bars, the list, and the form.
 *
 * Inherits the product page tokens, so it themes with the rest of the page.
 */

.gms-pdp__reviews,
.gms-pdp__reviews * { box-sizing: border-box; }

/* ---- Filter bars -------------------------------------------------------- */

a.gms-rev__bar {
  text-decoration: none;
  border-radius: 6px;
  padding: 2px 5px;
  margin: 0 -5px;
  transition: background .12s ease;
}

a.gms-rev__bar:hover { background: var(--gms-sunken, #f3f4f6); }
a.gms-rev__bar.is-on { background: var(--gms-accent-soft, #eff6ff); }
a.gms-rev__bar.is-on em { color: var(--gms-accent, #2563eb); font-weight: 700; }

.gms-rev__filter {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--gms-muted, #6b7280);
}

.gms-rev__filter a { margin-left: 8px; color: var(--gms-accent, #2563eb); }

/* ---- The list ----------------------------------------------------------- */

.gms-rev__list {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.gms-rev__item {
  padding: 16px 18px;
  border: 1px solid var(--gms-line, #e5e7eb);
  border-radius: 12px;
}

.gms-rev__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.gms-rev__who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gms-rev__who strong { font-size: 14px; font-weight: 650; }
.gms-rev__when { font-size: 12px; color: var(--gms-muted, #9ca3af); }

/* The badge is the whole point of the section — a review from someone who
   actually bought the thing carries more weight than one that did not. */
.gms-rev__verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gms-good-soft, #ecfdf5);
  color: var(--gms-good, #059669);
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .01em;
}

/* A drawn tick, so the badge needs no icon font. */
.gms-rev__verified::before {
  content: '';
  width: 4px;
  height: 8px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.gms-rev__stars { display: inline-block; margin: 8px 0 6px; font-size: 14px; }

.gms-rev__body { font-size: 14px; line-height: 1.6; color: var(--gms-muted-strong, #374151); }
.gms-rev__body p { margin: 0 0 8px; }
.gms-rev__body p:last-child { margin-bottom: 0; }

.gms-rev__photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.gms-rev__photos img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--gms-sunken, #f3f4f6);
  transition: none;
}

.gms-rev__photos a:hover img { transform: none; }

/* ---- Writing one -------------------------------------------------------- */

.gms-rev__write {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--gms-line, #e5e7eb);
}

.gms-rev__write h3 { margin: 0 0 16px; font-size: 16px; font-weight: 650; }
.gms-rev__closed { margin: 0; font-size: 14px; color: var(--gms-muted, #6b7280); }
.gms-rev__form { display: grid; gap: 14px; max-width: 560px; }

.gms-rev__stars-pick { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.gms-rev__label { font-size: 13px; font-weight: 600; margin-right: 8px; }

.gms-rev__star {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: var(--gms-line, #d1d5db);
  cursor: pointer;
  transition: color .1s ease;
}

.gms-rev__star:hover { transform: none; }
.gms-rev__star.is-on { color: #f5a623; }

.gms-rev__hint { margin: -6px 0 0; font-size: 12px; color: var(--gms-muted, #6b7280); }

.gms-rev__upload { display: grid; gap: 10px; }

.gms-rev__uploadbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  padding: 9px 16px;
  border: 1.5px dashed var(--gms-line, #d1d5db);
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gms-muted-strong, #374151);
  cursor: pointer;
}

.gms-rev__uploadbtn:hover { border-color: var(--gms-accent, #2563eb); color: var(--gms-accent, #2563eb); }

.gms-rev__previews { display: flex; gap: 8px; flex-wrap: wrap; }
.gms-rev__previews:empty { display: none; }

.gms-rev__preview { position: relative; display: inline-block; }

.gms-rev__preview img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.gms-rev__preview button {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: var(--gms-ink, #111827);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.gms-rev__done {
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--gms-good-soft, #ecfdf5);
  color: var(--gms-good, #059669);
  font-size: 13.5px;
  font-weight: 600;
}

.gms-rev__done[hidden] { display: none; }
.gms-rev__form .gms-btn-solid { justify-self: start; }

@media (max-width: 600px) {
  .gms-rev__item { padding: 14px; }
  .gms-rev__star { width: 36px; height: 36px; font-size: 28px; }
  .gms-rev__photos img { width: 64px; height: 64px; }
}
