/* Meditation reviews (templates/partials/meditation_review_panel.html): the
   panel under the Meditation Mode player and its end-of-playback modal. The
   terracotta of the blog's Meditation Creator panel (.blog-creator-panel in
   blog.css: #C27660 fill, #AF6A56 border, #2F4A3F headings), with a cream
   inner card so body text stays dark on light. */

.mrv[hidden], .mrv-modal[hidden], .mrv [hidden] { display: none !important; }

.mrv {
  background: #C27660;
  border: 1px solid #AF6A56;
  border-radius: 16px;
  padding: 4px;   /* the terracotta frame around the cream card: 14px slimmed by 3/4 */
  box-shadow: 0 6px 20px rgba(80, 40, 20, 0.15);
  text-align: left;
}
.mrv--panel { margin: 16px 0 4px; }
.mrv__box {
  position: relative;
  background: var(--cream, #FAF7F2);
  border-radius: 12px;
  padding: 14px 16px;
}
.mrv__heading {
  margin: 0 0 10px;
  color: #2F4A3F;
  font-size: .98rem;
  line-height: 1.4;
  font-weight: 700;
}

/* Five stars in a row, bigger on hover. */
.mrv__stars { display: flex; gap: 4px; }
.mrv__star {
  border: none;
  background: none;
  padding: 2px;
  font-size: 1.7rem;
  line-height: 1;
  color: #d9cbbd;
  cursor: pointer;
  transition: transform .12s ease, color .12s ease;
}
.mrv__star.is-on { color: #B5634A; }
.mrv__star:hover:not([disabled]),
.mrv__star:focus-visible { transform: scale(1.25); }
.mrv__star:focus-visible { outline: 2px solid #A66B5C; outline-offset: 2px; border-radius: 4px; }
.mrv__star[disabled] { cursor: not-allowed; opacity: .6; }
.mrv__label { min-height: 1.2em; margin: 4px 0 8px; font-size: .88rem; font-weight: 600; color: #2C2416; }

/* The collapsed phrase input: a quiet link with a subtle underline. */
.mrv__add {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: .9rem;
  color: #8a4a36;
  text-decoration: underline;
  text-decoration-color: rgba(138, 74, 54, .35);
  text-underline-offset: 3px;
  cursor: pointer;
}
.mrv__add:hover:not([disabled]) { text-decoration-color: currentColor; }
.mrv__add[disabled] { cursor: not-allowed; opacity: .6; }
.mrv__phrase {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid #e8e0d4;
  border-radius: 8px;
  font: inherit;
  font-size: .9rem;
  background: #fff;
  color: #2C2416;
  resize: vertical;
}
.mrv__sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.mrv__actions { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.mrv__submit {
  min-height: 40px;
  padding: 8px 18px;
  border: none;
  border-radius: 10px;
  background: #2F4A3F;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.mrv__submit[disabled] { opacity: .5; cursor: not-allowed; }
.mrv__later { border: none; background: none; padding: 0; font: inherit; font-size: .88rem; color: #6b5a4a; text-decoration: underline; cursor: pointer; }
.mrv__reason { margin: 6px 0 0; font-size: .82rem; font-weight: 600; color: #6b5a4a; }

/* The disabled states (guest, and a build not saved yet): every control
   visibly off, and the pointer says so. */
.mrv.is-disabled .mrv__star,
.mrv.is-disabled .mrv__add,
.mrv.is-disabled .mrv__phrase,
.mrv.is-disabled .mrv__submit,
.mrv__star[aria-disabled="true"],
.mrv__add[aria-disabled="true"],
.mrv__submit[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.mrv.is-disabled .mrv__star:hover { transform: none; }
.mrv__error { margin: 8px 0 0; font-size: .85rem; color: #A0262E; }
.mrv__done, .mrv__already { margin: 4px 0 0; font-weight: 600; color: #2C2416; }
.mrv__reward { margin: 6px 0 0; font-weight: 700; color: #3D7A78; }

/* N of 5: five dots and the line under them. */
.mrv__progress { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(0, 0, 0, .08); }
.mrv__dots { display: flex; gap: 6px; margin-bottom: 4px; }
.mrv__dot { width: 10px; height: 10px; border-radius: 50%; background: #e8dccf; }
.mrv__dot.is-on { background: #B5634A; }
.mrv__progress-text { margin: 0; font-size: .82rem; color: #6b5a4a; }

/* The modal, above the player. */
.mrv-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;   /* over the player (1200), under its dialog (1400) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(30, 20, 12, .55);
}
.mrv--modal { width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow: auto; }
.mrv--modal .mrv__heading { padding-right: 28px; }
.mrv__close {
  position: absolute;
  top: 6px;
  right: 8px;
  border: none;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #6b5a4a;
  cursor: pointer;
}

/* In the Studio's "Your meditation is ready" modal the panel makes the card
   taller, so the card scrolls on a short screen (the visitor player's card
   already does). */
.studio-autoplay-modal .studio-autoplay-modal__card:has(.mrv) {
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  overflow-y: auto; overscroll-behavior: contain;
}
