/*
 * Verified-buyer reviews (g3m-reviews.php): the write-a-review page, its result, and the link on the order page.
 * Mock-up https://claude.ai/artifact/8qVDPzUoEKyUyaMBmadxbM. Centred, one column, theme.json tokens only.
 */

.g3m-rv {
  box-sizing: border-box;
  max-width: 32rem;
  margin: 0 auto;
  /* A 16px side gutter, and 88px on top: the fixed site header is 64px tall (measured 2026-11-19), so the title starts
     24px below it. (The return form's 48px leaves 16px of its title under the header on phones.) */
  padding: 88px max(16px, env(safe-area-inset-right, 0px)) 72px max(16px, env(safe-area-inset-left, 0px));
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
  color: var(--wp--preset--color--white);
}

.g3m-rv__title { margin: 0; font-size: clamp(1.6rem, 6vw, 2rem); text-wrap: balance; }
.g3m-rv__sub, .g3m-rv__hint, .g3m-rv__note, .g3m-rv__opt { margin: 0; color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); line-height: 1.55; }
.g3m-rv__error { margin: 0; padding: 12px 14px; border: 1px solid var(--wp--preset--color--gold); border-radius: 10px; color: var(--wp--preset--color--gold); }

.g3m-rv-form { display: flex; flex-direction: column; gap: 20px; }
.g3m-rv__box {
  margin: 0;
  background: var(--wp--preset--color--card);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.g3m-rv__box > legend, .g3m-rv__box > label { font-weight: 600; padding: 0 4px; }
/* A fieldset's legend sits ON the border by default; floated, it sits inside the box like the other headings. */
.g3m-rv__box > legend { float: left; width: 100%; box-sizing: border-box; margin: 0; }
.g3m-rv__box > legend + * { clear: both; }
.g3m-rv__stars { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.g3m-rv__star {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 56px; border: 1px solid var(--wp--preset--color--border); border-radius: 10px;
  color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); cursor: pointer;
}
.g3m-rv__star:has(input:checked) { border-color: var(--wp--preset--color--gold); color: var(--wp--preset--color--gold); }
.g3m-rv__star input, .g3m-rv__choice input { width: 20px; height: 20px; accent-color: var(--wp--preset--color--cyan); }
.g3m-rv__choice {
  display: flex; gap: 12px; align-items: center; min-height: 48px; padding: 0 12px;
  border: 1px solid var(--wp--preset--color--border); border-radius: 10px; cursor: pointer;
}
.g3m-rv__choice:has(input:checked) { border-color: var(--wp--preset--color--cyan); }
.g3m-rv textarea {
  width: 100%; box-sizing: border-box; min-height: 8rem; padding: 10px 12px; resize: vertical;
  background: var(--wp--preset--color--bg); color: var(--wp--preset--color--white);
  border: 1px solid var(--wp--preset--color--muted); border-radius: 10px; font: inherit; line-height: 1.5;
}
.g3m-rv input[type="file"] { max-width: 100%; color: var(--wp--preset--color--muted); }

.g3m-rv__send, .g3m-rv__button {
  display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 20px;
  border: 0; border-radius: 12px; background: var(--wp--preset--color--cyan); color: var(--wp--preset--color--bg);
  font-weight: 700; letter-spacing: 1px; text-decoration: none; cursor: pointer;
}
.g3m-rv__ghost {
  min-height: 48px; padding: 0 20px; border: 1px solid var(--wp--preset--color--muted); border-radius: 12px;
  background: transparent; color: var(--wp--preset--color--white); font: inherit; cursor: pointer;
}
.g3m-rv-delete { display: flex; justify-content: center; }
.g3m-rv__done {
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 18px;
  background: var(--wp--preset--color--card); border: 1px solid var(--wp--preset--color--cyan); border-radius: 14px;
}
.g3m-rv__done > svg { color: var(--wp--preset--color--cyan); }
.g3m-rv__done p { margin: 0; }
.g3m-rv__reward { font-size: 1.4rem; font-weight: 700; color: var(--wp--preset--color--gold); }
.g3m-rv__plain { display: inline-flex; align-items: center; min-height: 44px; }

.g3m-rv-link { margin: 6px 0 0; }
.g3m-rv-link a { display: inline-flex; align-items: center; min-height: 44px; }

/* ── The reviews on a product page (mock-up screen 1) ───────────────────────── */

.g3m-rvs {
  box-sizing: border-box;
  max-width: 40rem;
  margin: 32px auto;
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--wp--preset--color--white);
  scroll-margin-top: 80px;   /* the 64px fixed header, plus room */
}
.g3m-rvs__summary, .g3m-rvs__card {
  background: var(--wp--preset--color--card);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.g3m-rvs__summary { align-items: center; text-align: center; }
.g3m-rvs__summary h2 { margin: 0; font-size: 1.4rem; }
.g3m-rvs__avg { margin: 0; font-size: 2.75rem; font-weight: 700; line-height: 1; }
.g3m-rvs__glyphs { color: var(--wp--preset--color--gold); letter-spacing: 2px; }
.g3m-rvs__glyphs--big { margin: 0; font-size: 1.25rem; letter-spacing: 3px; }
.g3m-rvs__count, .g3m-rvs__lede, .g3m-rvs__date, .g3m-rvs__label { margin: 0; color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); line-height: 1.55; }
.g3m-rvs__lede { text-align: center; }
.g3m-rvs__bars { width: 100%; display: flex; flex-direction: column; gap: 6px; font-size: var(--wp--preset--font-size--small); }
.g3m-rvs__bar { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) 1.5rem; gap: 10px; align-items: center; }
.g3m-rvs__bar > span:last-child { text-align: right; }
.g3m-rvs__track { display: block; height: 8px; border-radius: 4px; background: var(--wp--preset--color--border); overflow: hidden; }
.g3m-rvs__track > span { display: block; height: 100%; background: var(--wp--preset--color--gold); }
.g3m-rvs__sort { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; width: 100%; }
.g3m-rvs__sort select {
  min-height: 44px; flex: 1 1 12rem; padding: 0 12px; font: inherit;
  background: var(--wp--preset--color--bg); color: var(--wp--preset--color--white);
  border: 1px solid var(--wp--preset--color--muted); border-radius: 10px;
}
.g3m-rvs__sort button {
  min-height: 44px; padding: 0 16px; font: inherit; cursor: pointer;
  background: transparent; color: var(--wp--preset--color--cyan); border: 1px solid var(--wp--preset--color--cyan); border-radius: 10px;
}
.g3m-rvs__top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.g3m-rvs__top .g3m-rvs__glyphs { font-size: 1.1rem; }
.g3m-rvs__who { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.g3m-rvs__name { font-weight: 600; overflow-wrap: anywhere; }
.g3m-rvs__chip { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--cyan); border: 1px solid var(--wp--preset--color--cyan); border-radius: 999px; padding: 2px 8px; }
.g3m-rvs__text { margin: 0; line-height: 1.55; overflow-wrap: anywhere; }
.g3m-rvs__photos { display: flex; gap: 8px; flex-wrap: wrap; }
.g3m-rvs__photos a { display: block; min-width: 44px; min-height: 44px; }
.g3m-rvs__photos img { display: block; width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--wp--preset--color--border); }
.g3m-rvs__reply { border-top: 1px solid var(--wp--preset--color--border); padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.g3m-rvs__reply p { margin: 0; line-height: 1.55; }
.g3m-rvs__reply-head { font-weight: 600; color: var(--wp--preset--color--cyan); font-size: var(--wp--preset--font-size--small); }
.g3m-rvs__more {
  display: flex; align-items: center; justify-content: center; min-height: 48px;
  border: 1px solid var(--wp--preset--color--cyan); border-radius: 12px; text-decoration: none; font-weight: 600;
}
.g3m-rvs-link { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; text-decoration: none; }

/* The public policy page */
.g3m-rv--policy { text-align: left; }
.g3m-rv--policy .g3m-rv__title { text-align: center; }
.g3m-rvp h2 { margin: 0 0 6px; font-size: 1.1rem; }
.g3m-rvp p, .g3m-rvp ul { margin: 0; line-height: 1.6; color: var(--wp--preset--color--white); }
.g3m-rvp ul { padding-left: 20px; }
