/* =====================================================================
   SKS All-Reviews modal — store-wide review popup.

   Opened by any element carrying [data-sks-reviews-modal]; the markup is
   built once by sks-reviews-modal.js and appended to <body>, so this file
   styles a single shared dialog no matter how many triggers a page has.

   Scoped under .sks-rvm so nothing leaks into the theme. Sizes are px:
   Dawn sets html{font-size:62.5%} which would shrink any rem value.
   ===================================================================== */

.sks-rvm-open {
  overflow: hidden;
}

.sks-rvm {
  --rvm-ivory: #f5f0e8;
  --rvm-white: #ffffff;
  --rvm-onyx: #1a1a1a;
  --rvm-body: #4a4440;
  --rvm-muted: #7a726b;
  --rvm-amber: #b8520a;
  --rvm-star: #b8520a;
  --rvm-star-empty: #e0d8cc;
  --rvm-line: #e2dacb;
  --rvm-ok: #1a5c2a;

  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: 'Jost', system-ui, sans-serif;
  color: var(--rvm-body);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.sks-rvm[data-open='true'] {
  opacity: 1;
  visibility: visible;
}

.sks-rvm *,
.sks-rvm *::before,
.sks-rvm *::after {
  box-sizing: border-box;
}

.sks-rvm__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.62);
  backdrop-filter: blur(2px);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.sks-rvm__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 760px;
  max-height: 100%;
  background: var(--rvm-ivory);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(26, 26, 26, 0.32);
  transform: translateY(12px) scale(0.99);
  transition: transform 0.22s ease;
}

.sks-rvm[data-open='true'] .sks-rvm__panel {
  transform: none;
}

/* ── header ─────────────────────────────────────────────────────── */
.sks-rvm__head {
  flex: 0 0 auto;
  background: var(--rvm-white);
  border-bottom: 1px solid var(--rvm-line);
  padding: 22px 56px 18px 26px;
}

.sks-rvm__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--rvm-onyx);
  margin: 0 0 8px;
  line-height: 1.2;
}

.sks-rvm__summary {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 15px;
}

.sks-rvm__avg {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--rvm-amber);
  line-height: 1;
}

.sks-rvm__count {
  color: var(--rvm-muted);
  font-size: 14px;
}

.sks-rvm__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rvm-ivory);
  border: 1px solid var(--rvm-line);
  border-radius: 50%;
  color: var(--rvm-body);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.sks-rvm__close:hover {
  background: var(--rvm-amber);
  border-color: var(--rvm-amber);
  color: var(--rvm-white);
}

/* ── stars (two stacked layers, amber clipped to score) ─────────── */
.sks-rvm__stars {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: 2px;
  font-size: 17px;
}

.sks-rvm__stars-bg {
  color: var(--rvm-star-empty);
}

.sks-rvm__stars-fg {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  overflow: hidden;
  color: var(--rvm-star);
}

/* ── scrolling list ─────────────────────────────────────────────── */
.sks-rvm__body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 26px 26px;
}

.sks-rvm__card {
  background: var(--rvm-white);
  border: 1px solid var(--rvm-line);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 12px;
}

.sks-rvm__card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.sks-rvm__author {
  font-weight: 600;
  color: var(--rvm-onyx);
  font-size: 14.5px;
}

.sks-rvm__verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rvm-ok);
}

.sks-rvm__date {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--rvm-muted);
}

.sks-rvm__card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--rvm-onyx);
  margin: 0 0 5px;
  line-height: 1.3;
}

.sks-rvm__text {
  font-size: 14.5px;
  font-weight: 300;
  line-height: 1.7;
  margin: 0;
  overflow-wrap: break-word;
}

.sks-rvm__prod {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--rvm-amber);
  text-decoration: none;
}

.sks-rvm__prod:hover {
  text-decoration: underline;
}

/* ── states ─────────────────────────────────────────────────────── */
.sks-rvm__more {
  display: block;
  width: 100%;
  padding: 13px 20px;
  margin-top: 4px;
  background: var(--rvm-white);
  border: 1px solid var(--rvm-amber);
  border-radius: 6px;
  color: var(--rvm-amber);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.sks-rvm__more:hover:not([disabled]) {
  background: var(--rvm-amber);
  color: var(--rvm-white);
}

.sks-rvm__more[disabled] {
  opacity: 0.6;
  cursor: default;
}

/* `min-height` matters: base.css hides `div:empty`, and these two are
   empty until JS writes into them. Without a box they would collapse
   and the loading/error copy would never be seen. */
.sks-rvm__status,
.sks-rvm__empty {
  display: block;
  min-height: 1px;
  text-align: center;
  font-size: 14px;
  color: var(--rvm-muted);
  padding: 18px 0;
}

@media screen and (max-width: 600px) {
  .sks-rvm {
    padding: 0;
  }

  .sks-rvm__panel {
    max-width: none;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .sks-rvm__head {
    padding: 18px 52px 15px 18px;
  }

  .sks-rvm__title {
    font-size: 19px;
  }

  .sks-rvm__body {
    padding: 14px 18px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sks-rvm,
  .sks-rvm__panel {
    transition: none;
  }
}
