/**
 * Editor review scope — docked "Avis" trigger + slide-over panel.
 * Colours fall back to the PersonArt editor tokens; product pages never load
 * this file (enqueued by the [rmp_editor_reviews] shortcode only).
 */

.rmp-er-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  margin: 0;
  border: 1px solid rgba(11, 163, 162, 0.18);
  border-radius: 999px;
  background: var(--editor-primary-light, #e8f8f7);
  color: var(--editor-primary-dark, #087b7a);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  text-transform: none;
  transition: transform 140ms cubic-bezier(0.2, 0, 0, 1), box-shadow 220ms cubic-bezier(0.2, 0, 0, 1), background 140ms cubic-bezier(0.2, 0, 0, 1);
}
.rmp-er-trigger:hover {
  background: #dcf3f1;
  box-shadow: 0 4px 12px rgba(11, 163, 162, 0.16);
  transform: translateY(-1px);
}
.rmp-er-trigger:active { transform: scale(0.97); }
.rmp-er-trigger svg { width: 14px; height: 14px; fill: var(--editor-primary, #0ba3a2); flex: 0 0 14px; }
.rmp-er-trigger .rmp-er-num { font-variant-numeric: tabular-nums; }
.rmp-er-trigger .rmp-er-count { font-weight: 600; opacity: 0.72; }
/* fallback when the host chrome is not rendered (no dock target found) */
.rmp-er-trigger.is-floating {
  position: fixed;
  top: 62px;
  right: 16px;
  z-index: 2147483190;
  box-shadow: 0 8px 20px rgba(11, 163, 162, 0.18);
}

.rmp-er [hidden] { display: none !important; }

/* ---------- panel ---------- */
.rmp-er .rmp-er-scrim { display: none; }

.rmp-er .rmp-er-panel {
  position: fixed;
  top: 62px;
  right: 16px;
  bottom: 16px;
  width: 380px;
  z-index: 2147483200;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--editor-border, #dce2ea);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(31, 37, 51, 0.18), 0 2px 8px rgba(31, 37, 51, 0.06);
  overflow: hidden;
  font-family: inherit;
  color: var(--editor-text, #1f2533);
  box-sizing: border-box;
  transition: transform 220ms cubic-bezier(0.2, 0, 0, 1), opacity 140ms ease;
}
.rmp-er .rmp-er-panel * { box-sizing: border-box; }
.rmp-er .rmp-er-panel.is-closed {
  transform: translateX(26px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.rmp-er .rmp-er-handle { display: none; }

.rmp-er .rmp-er-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(220, 226, 234, 0.8);
}
.rmp-er .rmp-er-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--editor-text, #1f2533);
}
.rmp-er .rmp-er-head p {
  margin: 3px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--editor-muted, #6d7788);
}
.rmp-er .rmp-er-close {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #f4f6f8;
  color: #43565a;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.rmp-er .rmp-er-close:hover { background: var(--editor-primary-light, #e8f8f7); color: var(--editor-primary-dark, #087b7a); }

.rmp-er .rmp-er-body {
  flex: 1;
  overflow: auto;
  padding: 14px 16px 8px;
  overscroll-behavior: contain;
}

.rmp-er .rmp-er-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(11, 163, 162, 0.05), rgba(11, 163, 162, 0.11));
  border: 1px solid rgba(11, 163, 162, 0.16);
  margin-bottom: 16px;
}
.rmp-er .rmp-er-avg {
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  color: var(--editor-primary-dark, #087b7a);
  font-variant-numeric: tabular-nums;
}
.rmp-er .rmp-er-summary small {
  display: block;
  margin-top: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: #5b7a78;
}

.rmp-er .rmp-er-stars { display: inline-flex; gap: 3px; }
.rmp-er .rmp-er-stars svg { width: 15px; height: 15px; fill: #f0a02a; }
.rmp-er .rmp-er-stars svg.off { fill: #dfe3e6; }

.rmp-er .rmp-er-card { padding: 13px 0; border-bottom: 1px solid rgba(220, 226, 234, 0.75); }
.rmp-er .rmp-er-card:last-child { border-bottom: 0; }
.rmp-er .rmp-er-card-top { display: flex; align-items: center; gap: 10px; }
.rmp-er .rmp-er-av {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(11, 163, 162, 0.1);
  color: var(--editor-primary-dark, #087b7a);
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
}
.rmp-er .rmp-er-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rmp-er .rmp-er-who { min-width: 0; flex: 1; }
.rmp-er .rmp-er-who strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--editor-text, #1f2533);
}
.rmp-er .rmp-er-meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; flex-wrap: wrap; }
.rmp-er .rmp-er-meta .rmp-er-stars svg { width: 11px; height: 11px; }
.rmp-er .rmp-er-meta time { font-size: 11px; font-weight: 500; color: var(--editor-muted, #6d7788); }
.rmp-er .rmp-er-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--editor-primary-dark, #087b7a);
  background: rgba(11, 163, 162, 0.12);
  border-radius: 999px;
  padding: 3px 7px;
}
.rmp-er .rmp-er-text {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #33404f;
}
.rmp-er .rmp-er-text.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rmp-er .rmp-er-more {
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--editor-primary-dark, #087b7a);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.rmp-er-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.rmp-er-photos a {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  border: 1px solid var(--editor-border, #dce2ea);
  background-color: #eef1f4;
  background-size: cover;
  background-position: center;
  transition: transform .18s ease, box-shadow .18s ease;
}
.rmp-er-photos a:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(31, 37, 51, .12); }
.rmp-er-photos a:only-child { grid-column: 1 / -1; aspect-ratio: 16 / 10; }

.rmp-er .rmp-er-all {
  display: block;
  width: 100%;
  margin: 12px 0 4px;
  padding: 9px 0;
  border: 1px dashed rgba(11, 163, 162, 0.35);
  border-radius: 10px;
  background: rgba(11, 163, 162, 0.04);
  color: var(--editor-primary-dark, #087b7a);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.rmp-er .rmp-er-all:hover { background: rgba(11, 163, 162, 0.09); }
.rmp-er .rmp-er-all[aria-busy="true"] { opacity: 0.6; cursor: default; }

.rmp-er .rmp-er-empty { text-align: center; padding: 22px 8px 12px; }
.rmp-er .rmp-er-ic {
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--editor-primary-light, #e8f8f7);
}
.rmp-er .rmp-er-ic svg { width: 24px; height: 24px; fill: var(--editor-primary, #0ba3a2); }
.rmp-er .rmp-er-empty strong { display: block; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.rmp-er .rmp-er-empty p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--editor-muted, #6d7788); }

.rmp-er .rmp-er-foot { padding: 12px 16px 14px; border-top: 1px solid rgba(220, 226, 234, 0.9); background: #fff; }
.rmp-er .rmp-er-cta {
  width: 100%;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--editor-primary, #0ba3a2);
  color: #fff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 22px rgba(11, 163, 162, 0.22);
  transition: background 140ms cubic-bezier(0.2, 0, 0, 1), transform 140ms cubic-bezier(0.2, 0, 0, 1);
}
.rmp-er .rmp-er-cta:hover { background: var(--editor-primary-hover, #098f8e); transform: translateY(-1px); }
.rmp-er .rmp-er-cta:active { transform: scale(0.985); }
.rmp-er .rmp-er-cta svg { width: 15px; height: 15px; fill: #fff; }
.rmp-er .rmp-er-foot small {
  display: block;
  margin-top: 7px;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--editor-muted, #6d7788);
}

/* the real modal lives in here; only its hidden trigger button is used */
.rmp-er .rmp-er-form { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- mobile bottom sheet ---------- */
@media (max-width: 768px) {
  .rmp-er .rmp-er-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 2147483199;
    background: rgba(15, 23, 42, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms cubic-bezier(0.2, 0, 0, 1);
  }
  .rmp-er.is-open .rmp-er-scrim { opacity: 1; pointer-events: auto; }

  .rmp-er .rmp-er-panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    width: auto;
    height: min(72dvh, 560px);
    border-radius: 18px 18px 0 0;
    border-bottom: 0;
    box-shadow: 0 -18px 42px rgba(15, 23, 42, 0.2);
    transform: translateY(0);
  }
  .rmp-er .rmp-er-panel.is-closed { transform: translateY(36px); }
  .rmp-er .rmp-er-handle {
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: #d5dbe2;
    margin: 8px auto 0;
    flex: 0 0 4px;
  }
  .rmp-er .rmp-er-head { padding: 10px 16px; }
  .rmp-er .rmp-er-head h2 { font-size: 16px; }
  .rmp-er-trigger { height: 32px; padding: 0 10px; font-size: 12px; width: auto !important; min-width: 0 !important; }
  .rmp-er-trigger .rmp-er-trigger-label { display: none; }
  .rmp-er .rmp-er-panel { max-width: 100vw; }
}

@media (prefers-reduced-motion: reduce) {
  .rmp-er .rmp-er-panel,
  .rmp-er .rmp-er-scrim,
  .rmp-er-trigger,
  .rmp-er .rmp-er-cta { transition: none; }
}

/* Short viewports (laptops): let the review form scroll inside the viewport
   instead of centering an 846px card off the top of the screen. */
.rmp-form-modal.rmp-er-modal .rmp-modal-content {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
@media (max-width: 768px) {
  .rmp-form-modal.rmp-er-modal .rmp-modal-content {
    max-height: calc(100dvh - 24px);
  }
}

/* Phones: the studio topbar sits below the promo banner and hides its balance
   slot, so the pill floats under the bar instead of disappearing with it. */
@media (max-width: 768px) {
  .rmp-er-trigger.is-floating {
    top: calc(96px + env(safe-area-inset-top, 0px));
    right: 12px;
    height: 32px;
    padding: 0 12px;
  }
}

/* Poster mobile: the studio header owns the top 148px, so the compact pill
   floats just under it instead of covering the view/zoom switchers. */
@media (max-width: 768px) {
  .rmp-er-trigger.is-floating.is-compact {
    top: calc(152px + env(safe-area-inset-top, 0px));
    height: 32px;
    padding: 0 12px;
  }
  .rmp-er-trigger.is-floating.is-compact .rmp-er-trigger-label {
    display: none;
  }
}

/* ------------------------------------------------------------------
   Landing-page review section ([rmp_reviews_section])
   Uses the PersonArt marketing-page palette with safe fallbacks.
   ------------------------------------------------------------------ */
.rmp-rs {
  --rs-teal: var(--uwp-teal, #0ba3a2);
  --rs-ink: var(--uwp-ink, #1f2424);
  --rs-copy: var(--uwp-copy, #596463);
  --rs-line: var(--uwp-line, rgba(31, 36, 36, .12));
  padding: clamp(72px, 9vw, 120px) 0;
  color: var(--rs-ink);
  font-family: Montserrat, Arial, sans-serif;
  background: #fff;
}
.rmp-rs-inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.rmp-rs-eyebrow {
  margin: 0 0 10px;
  color: var(--rs-teal);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.rmp-rs-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 40px;
}
.rmp-rs-title {
  max-width: 620px;
  margin: 0;
  font-size: clamp(30px, 4vw, 54px);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: 1.02;
}
.rmp-rs-score { display: flex; align-items: center; gap: 14px; }
.rmp-rs-score strong {
  color: var(--rs-teal);
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: 1;
}
.rmp-rs-score small { display: block; margin-top: 4px; color: var(--rs-copy); font-size: 13px; }
.rmp-rs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.rmp-rs-item.is-extra { display: none; }
.rmp-rs.is-expanded .rmp-rs-item.is-extra { display: block; }
.rmp-rs .rmp-er-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  padding: 22px;
  border: 1px solid var(--rs-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(31, 51, 49, .05);
}
.rmp-rs .rmp-er-card-top { display: flex; align-items: center; gap: 12px; }
.rmp-rs .rmp-er-av {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--uwp-mist, #edf9f7);
  color: var(--uwp-teal-dark, #087f7e);
  font-size: 15px;
  font-weight: 700;
}
.rmp-rs .rmp-er-who strong { display: block; font-size: 15px; font-weight: 700; }
.rmp-rs .rmp-er-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; font-size: 12px; color: var(--rs-copy); }
.rmp-rs .rmp-er-stars { display: inline-flex; gap: 2px; }
.rmp-rs .rmp-er-stars svg { width: 14px; height: 14px; fill: #f0a02a; }
.rmp-rs .rmp-er-stars svg.off { fill: rgba(31, 36, 36, .16); }
.rmp-rs-score .rmp-er-stars svg { width: 18px; height: 18px; }
.rmp-rs .rmp-er-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--uwp-mist, #edf9f7);
  color: var(--uwp-teal-dark, #087f7e);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.rmp-rs .rmp-er-text {
  margin: 0;
  color: var(--rs-copy);
  font-size: 14px;
  line-height: 1.6;
}
.rmp-rs .rmp-er-text.is-clamped { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.rmp-rs .rmp-er-more {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--rs-teal);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
}
.rmp-rs-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 36px; }
.rmp-rs-more,
.rmp-rs-write {
  min-height: 46px;
  padding: 0 26px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.rmp-rs-more { border: 1px dashed var(--rs-line); background: #fff; color: var(--rs-ink); }
.rmp-rs-more:hover { border-color: var(--rs-teal); color: var(--rs-teal); }
.rmp-rs-write { border: 1px solid var(--rs-teal); background: var(--rs-teal); color: #fff; }
.rmp-rs-write:hover { background: var(--uwp-teal-dark, #087f7e); border-color: var(--uwp-teal-dark, #087f7e); }
@media (max-width: 1024px) {
  .rmp-rs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .rmp-rs-grid { grid-template-columns: 1fr; }
  .rmp-rs-head { flex-direction: column; align-items: flex-start; }
  .rmp-rs .rmp-er-text.is-clamped { -webkit-line-clamp: 6; }
}
