/* Player reviews: /reviews and the home page strip (shared/components/home-reviews.php).
   Card markup comes from site_review_card_html() in system/services/siteReviews.php. */

/* ---- Stars ---------------------------------------------------------- */

.rv-stars {
  display: inline-flex;
  gap: 0.1em;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0;
}

.rv-stars__on {
  color: #f5b301;
}

.rv-stars__off {
  color: rgba(255, 255, 255, 0.18);
}

/* ---- Card ----------------------------------------------------------- */

.rv-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.35rem 1.4rem;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 0.9rem;
  background: var(--card, rgba(255, 255, 255, 0.03));
}

.rv-card__headline {
  margin: 0;
  color: var(--text, #e6eaf2);
  font-family: "Josefin Sans", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.rv-card__body {
  color: var(--subtext, #a9b2c3);
  font-size: 0.95rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.rv-card__body p {
  margin: 0 0 0.75em;
}

.rv-card__body p:last-child {
  margin-bottom: 0;
}

.rv-card--compact .rv-card__body {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}

.rv-card--compact .rv-card__body p {
  margin: 0;
}

.rv-card__by {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.6rem;
  margin-top: auto;
  padding-top: 0.4rem;
  font-size: 0.85rem;
}

.rv-card__author {
  color: var(--accent, #ff6a2a);
  font-weight: 700;
  text-decoration: none;
}

.rv-card__author:hover,
.rv-card__author:focus-visible {
  text-decoration: underline;
}

.rv-card__date {
  color: var(--subtext, #a9b2c3);
}

/* ---- Buttons -------------------------------------------------------- */

.rv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: var(--accent, #ff6a2a);
  color: var(--accent-contrast, #0b0d10);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.rv-btn--ghost {
  border-color: var(--border, rgba(255, 255, 255, 0.16));
  background: transparent;
  color: var(--text, #e6eaf2);
}

.rv-btn:focus-visible {
  outline: 2px solid var(--focus-ring, #60a5fa);
  outline-offset: 2px;
}

/* ---- Home strip ----------------------------------------------------- */

.rv-home {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.rv-home__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.rv-home__title {
  margin: 0 0 0.35rem;
  color: var(--text, #e6eaf2);
  font-family: "Josefin Sans", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.rv-home__summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: var(--subtext, #a9b2c3);
  font-size: 0.95rem;
}

.rv-home__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.rv-home__nav {
  display: flex;
  gap: 0.4rem;
}

.rv-home__arrow {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.16));
  border-radius: 50%;
  background: transparent;
  color: var(--text, #e6eaf2);
  font-size: 1.1rem;
  cursor: pointer;
}

.rv-home__arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.rv-home__arrow:focus-visible {
  outline: 2px solid var(--focus-ring, #60a5fa);
  outline-offset: 2px;
}

.rv-home__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2rem) / 3);
  gap: 1rem;
  margin: 0;
  padding: 0 0 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  list-style: none;
  overscroll-behavior-x: contain;
}

.rv-home__track > li {
  display: flex;
  scroll-snap-align: start;
}

.rv-home__track .rv-card {
  flex: 1;
}

@media (max-width: 900px) {
  .rv-home__track {
    grid-auto-columns: calc((100% - 1rem) / 2);
  }
}

@media (max-width: 600px) {
  .rv-home__track {
    grid-auto-columns: 85%;
  }

  .rv-home__nav {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rv-home__track {
    scroll-behavior: auto;
  }
}

/* ---- /reviews page -------------------------------------------------- */

.rv-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 1rem 4rem;
}

.rv-page__eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent, #ff6a2a);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rv-page__title {
  margin: 0 0 0.75rem;
  color: var(--text, #e6eaf2);
  font-family: "Josefin Sans", sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.15;
}

.rv-page__lede {
  margin: 0;
  color: var(--subtext, #a9b2c3);
  font-size: 1rem;
  line-height: 1.6;
}

.rv-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.9rem;
  margin: 1.5rem 0 0;
}

.rv-summary__avg {
  color: var(--text, #e6eaf2);
  font-family: "Josefin Sans", sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
}

.rv-summary .rv-stars {
  font-size: 1.35rem;
}

.rv-summary__count {
  color: var(--subtext, #a9b2c3);
  font-size: 0.95rem;
}

.rv-panel {
  margin: 2.25rem 0;
  padding: 1.75rem;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  border-radius: 1rem;
  background: var(--surface, rgba(255, 255, 255, 0.03));
  scroll-margin-top: 6rem;
}

.rv-panel__title {
  margin: 0 0 0.4rem;
  color: var(--text, #e6eaf2);
  font-family: "Josefin Sans", sans-serif;
  font-size: 1.4rem;
}

.rv-panel__lead {
  margin: 0 0 1.25rem;
  color: var(--subtext, #a9b2c3);
  font-size: 0.95rem;
  line-height: 1.55;
}

.rv-msg {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
}

.rv-msg--ok {
  border: 1px solid rgba(50, 211, 153, 0.4);
  background: rgba(50, 211, 153, 0.1);
  color: #32d399;
}

.rv-msg--error {
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

.rv-msg--note {
  border: 1px solid rgba(245, 179, 1, 0.4);
  background: rgba(245, 179, 1, 0.08);
  color: #f5c542;
}

.rv-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.rv-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.rv-field__label {
  padding: 0;
  color: var(--text, #e6eaf2);
  font-size: 0.9rem;
  font-weight: 700;
}

.rv-field__input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.16));
  border-radius: 0.5rem;
  background: var(--bg, rgba(0, 0, 0, 0.25));
  color: var(--text, #e6eaf2);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
}

textarea.rv-field__input {
  min-height: 9rem;
  resize: vertical;
}

.rv-field__input:focus {
  border-color: var(--accent, #ff6a2a);
  outline: none;
}

.rv-field__count {
  align-self: flex-end;
  color: var(--subtext, #a9b2c3);
  font-size: 0.78rem;
}

.rv-field__count.is-over {
  color: #f87171;
}

/* Star picker: five real radios, drawn as stars. The page's script lights every
   star up to the chosen (or hovered) one with .is-lit; without script, only
   the chosen star lights, which still says what was picked. */
.rv-picker {
  display: inline-flex;
  gap: 0.15rem;
}

.rv-picker input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.rv-picker label {
  padding: 0.1rem;
  color: rgba(255, 255, 255, 0.2);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.rv-picker input:checked + label,
.rv-picker label.is-lit {
  color: #f5b301;
}

.rv-picker input:focus-visible + label {
  outline: 2px solid var(--focus-ring, #60a5fa);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

.rv-form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.rv-form__note {
  margin: 0;
  color: var(--subtext, #a9b2c3);
  font-size: 0.8rem;
}

.rv-form__note a {
  color: var(--accent, #ff6a2a);
}

.rv-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rv-empty {
  padding: 2rem 1.5rem;
  border: 1px dashed var(--border, rgba(255, 255, 255, 0.16));
  border-radius: 1rem;
  color: var(--subtext, #a9b2c3);
  text-align: center;
}

.rv-empty strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--text, #e6eaf2);
}

.rv-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.75rem;
  color: var(--subtext, #a9b2c3);
  font-size: 0.9rem;
}

.rv-pager .is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

@media (max-width: 600px) {
  .rv-panel {
    padding: 1.25rem;
  }

  .rv-form__foot .rv-btn {
    width: 100%;
  }
}

/* Read by screen readers, not drawn. */
.rv-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
