/* Ryviu Reviews storefront widget. Colours come from CSS variables set by the script from the app settings.
   Layouts follow Ryviu on Shopify: default (list), masonry, carousel. */
/* Theme blocks are placed hidden; the script (loaded by the app embed) shows them. Without the embed
   neither this file nor the script is on the page and the UA rule for [hidden] keeps them hidden. */
.ryviu-reviews[hidden],
.ryviu-store-reviews[hidden],
.ryviu-featured[hidden],
.ryviu-snippet[hidden],
.ryviu-stars[hidden] {
  display: none !important;
}

.ryr-root,
.ryr-badge,
.ryr-viewer {
  --ryr-star: #ffa41c;
  --ryr-star-empty: #d9d9d9;
  --ryr-text: #303030;
  --ryr-muted: #6b6b6b;
  --ryr-title: #222;
  --ryr-btn-bg: #324a30;
  --ryr-btn-color: #fff;
  --ryr-verified: #22c55e;
  --ryr-avatar-bg: #303030;
  --ryr-avatar-color: #fff;
  --ryr-card-bg: #fff;
  --ryr-card-border: #e5e5e5;
  --ryr-line: #e8e8e8;
}

.ryr-root {
  color: var(--ryr-text);
  font-size: 14px;
  line-height: 1.5;
  margin: 32px auto;
  max-width: 1200px;
  box-sizing: border-box;
}
.ryr-root *,
.ryr-root *::before,
.ryr-root *::after,
.ryr-viewer *,
.ryr-viewer *::before,
.ryr-viewer *::after {
  box-sizing: border-box;
}
.ryr-root button,
.ryr-viewer button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.ryr-root svg,
.ryr-viewer svg {
  display: block;
  flex: none;
}

/* ---------- Stars ---------- */
.ryr-stars {
  display: inline-flex;
  gap: 1px;
  vertical-align: middle;
}
.ryr-star {
  position: relative;
  display: inline-block;
  flex: none;
}
.ryr-star svg {
  width: 100%;
  height: 100%;
}
.ryr-star-empty path {
  fill: var(--ryr-star-empty);
}
.ryr-star-fill {
  position: absolute;
  inset: 0 auto 0 0;
  overflow: hidden;
}
.ryr-star-fill path,
.ryr-bar-star path,
.ryr-chip-star path {
  fill: var(--ryr-star);
}

/* ---------- Header ---------- */
.ryr-title {
  margin: 0;
  padding: 16px 0 8px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ryr-title);
  text-align: left;
}
.ryr-overall {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.ryr-avg-num {
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
  color: var(--ryr-title);
}
.ryr-count {
  font-size: 13px;
  color: var(--ryr-muted);
}
.ryr-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px 40px;
  margin-bottom: 20px;
}
.ryr-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 280px;
  max-width: 100%;
}
.ryr-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 1px 4px;
  margin: 0 -4px;
  border: 0;
  border-radius: 4px;
  background: none;
  text-align: left;
}
.ryr-bar:hover,
.ryr-bar.ryr-active {
  background: rgba(0, 0, 0, 0.05);
}
.ryr-bar-label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: 26px;
  font-size: 12px;
}
.ryr-bar-star {
  width: 15px;
  height: 15px;
}
.ryr-bar-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: #d9d9d9;
  overflow: hidden;
}
.ryr-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--ryr-star);
}
.ryr-bar-pct {
  width: 34px;
  font-size: 12px;
  text-align: right;
  color: var(--ryr-muted);
}
.ryr-photos-title {
  margin: 0 0 8px;
  font-size: 15px;
}
.ryr-photos-row {
  display: flex;
  gap: 5px;
}
.ryr-photo {
  position: relative;
  flex: none;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  overflow: hidden;
  background: #f2f2f2;
  cursor: zoom-in;
}
.ryr-photo img,
.ryr-thumb img,
.ryr-card-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ryr-more-count {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.ryr-more-count svg {
  width: 13px;
  height: 13px;
}
.ryr-write-wrap {
  display: flex;
  align-items: center;
}

/* ---------- Buttons ---------- */
.ryr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 20px;
  border: 1px solid var(--ryr-btn-bg);
  border-radius: 5px;
  background: var(--ryr-btn-bg);
  color: var(--ryr-btn-color) !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  transition: all 0.3s ease;
}
.ryr-btn:hover {
  opacity: 0.88;
}
.ryr-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.ryr-btn-outline {
  border-color: #d9d9d9;
  background: #fff;
  color: var(--ryr-text) !important;
  font-weight: 500;
}
.ryr-link {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ryr-muted) !important;
  font-size: 13px;
  text-decoration: underline;
}

/* ---------- Toolbar: search, chips, sort ---------- */
.ryr-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ryr-line);
}
.ryr-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 360px;
  max-width: 100%;
  height: 38px;
  padding: 0 14px;
  border: 1px solid #d9d9d9;
  border-radius: 999px;
  color: #999;
}
.ryr-search svg {
  width: 15px;
  height: 15px;
}
.ryr-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ryr-text);
  font: inherit;
  font-size: 14px;
}
.ryr-search:focus-within {
  border-color: #999;
}
.ryr-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ryr-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ryr-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid #d9d9d9;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  line-height: 1;
}
.ryr-chip svg {
  width: 13px;
  height: 13px;
}
.ryr-chip:hover {
  border-color: #999;
}
.ryr-chip.ryr-active {
  border-color: #111;
  background: #111;
  color: #fff !important;
}
.ryr-sort-select {
  height: 34px;
  padding: 0 32px 0 14px;
  border: 1px solid #d9d9d9;
  border-radius: 999px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 14px;
  color: var(--ryr-text);
  font: inherit;
  font-size: 13px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.ryr-no-results {
  padding: 32px 0;
  margin: 0;
  text-align: center;
  color: var(--ryr-muted);
}

/* ---------- Shared review parts ---------- */
.ryr-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ryr-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ryr-avatar-bg);
  color: var(--ryr-avatar-color);
  font-size: 12px;
  font-weight: 600;
}
.ryr-author-info {
  min-width: 0;
}
.ryr-author-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.ryr-name {
  font-weight: 600;
  font-size: 14px;
}
.ryr-flag {
  width: 16px;
  height: 12px;
  object-fit: cover;
  border-radius: 1px;
}
.ryr-verified {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--ryr-verified);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}
.ryr-date {
  display: block;
  font-size: 12px;
  color: var(--ryr-muted);
}
.ryr-review-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ryr-text);
}
.ryr-content {
  margin: 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.ryr-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ryr-reply-text {
  margin: 4px 0 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.ryr-reply-text.ryr-clamped {
  -webkit-line-clamp: 3;
}
.ryr-see-more[hidden] {
  display: none !important;
}
.ryr-reply {
  padding: 10px 12px;
  border-left: 3px solid var(--ryr-btn-bg);
  border-radius: 0 6px 6px 0;
  background: #f6f6f6;
  font-size: 13px;
}
.ryr-reply p {
  margin: 4px 0 0;
  white-space: pre-line;
}
.ryr-helpful {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  font-size: 12px;
  color: var(--ryr-muted);
}
.ryr-vote {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px;
  border: 0;
  background: none;
  color: var(--ryr-text) !important;
  font-size: 12px;
}
.ryr-vote svg {
  width: 15px;
  height: 15px;
}
.ryr-vote:disabled {
  cursor: default;
  opacity: 0.55;
}
.ryr-vote.ryr-voted {
  opacity: 1;
  color: var(--ryr-btn-bg) !important;
}
.ryr-thumbs {
  display: flex;
  gap: 6px;
}
.ryr-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #f2f2f2;
  cursor: zoom-in;
}
.ryr-thumbs-sm .ryr-thumb {
  width: 40px;
  height: 48px;
}

/* ---------- Layout: default (list) ---------- */
.ryr-layout-default .ryr-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--ryr-line);
}
.ryr-item-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 720px;
}
.ryr-layout-default .ryr-thumbs {
  align-self: center;
}
.ryr-layout-default .ryr-helpful {
  grid-column: 1 / -1;
}

/* ---------- Layout: masonry ---------- */
.ryr-layout-masonry {
  column-count: 3;
  column-gap: 16px;
  padding-top: 16px;
}
.ryr-layout-masonry .ryr-card {
  break-inside: avoid;
  margin-bottom: 16px;
}

/* ---------- Cards (masonry + carousel) ---------- */
.ryr-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ryr-card-border);
  border-radius: 8px;
  background: var(--ryr-card-bg);
  overflow: hidden;
}
.ryr-card-cover {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #f2f2f2;
  cursor: zoom-in;
}
/* min-height keeps lazy images measurable (a 0px image never starts loading) */
.ryr-card-cover img {
  height: auto;
  min-height: 180px;
  max-height: 420px;
}
/* Photo count on a card's cover: a small pill in the top-right corner */
.ryr-card-cover .ryr-more-count {
  inset: 8px 8px auto auto;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.ryr-card-cover .ryr-more-count svg {
  width: 12px;
  height: 12px;
}
.ryr-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}
.ryr-card .ryr-helpful {
  margin-top: auto;
  padding-top: 4px;
}

/* ---------- Layout: carousel ---------- */
.ryr-carousel {
  position: relative;
  padding-top: 16px;
}
.ryr-layout-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.ryr-layout-carousel::-webkit-scrollbar {
  display: none;
}
.ryr-slide .ryr-verified {
  padding: 1px 7px;
  font-size: 11px;
}
.ryr-slide {
  flex: 0 0 calc((100% - 36px) / 4);
  scroll-snap-align: start;
  min-height: 220px;
}
.ryr-car-nav {
  position: absolute;
  top: calc(50% + 8px);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--ryr-card-border);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transform: translateY(-50%);
}
.ryr-car-nav svg {
  width: 16px;
  height: 16px;
}
.ryr-car-nav[hidden] {
  display: none;
}
.ryr-car-prev {
  left: -12px;
}
.ryr-car-next {
  right: -12px;
}

.ryr-more-wrap {
  display: flex;
  justify-content: center;
  padding: 20px 0 0;
}
.ryr-more-wrap:empty {
  display: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 989px) {
  .ryr-layout-masonry {
    column-count: 2;
  }
  .ryr-slide {
    flex-basis: calc((100% - 12px) / 2);
  }
}
@media (max-width: 599px) {
  .ryr-layout-masonry {
    column-count: 1;
  }
  .ryr-slide {
    flex-basis: 82%;
  }
  .ryr-car-nav {
    display: none;
  }
  .ryr-summary {
    gap: 16px;
  }
  .ryr-bars {
    width: 100%;
  }
  .ryr-write-wrap,
  .ryr-write-wrap .ryr-btn {
    width: 100%;
  }
  .ryr-layout-default .ryr-item {
    grid-template-columns: 1fr;
  }
  .ryr-search {
    width: 100%;
  }
  .ryr-filters {
    flex-direction: column;
    align-items: stretch;
  }
  .ryr-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .ryr-chip {
    flex: none;
  }
}

/* ---------- Empty state (no reviews yet), matches Ryviu's .Ryviu-Empty-Box ---------- */
.ryr-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 70px 15px 60px;
  border: 1px solid #ddd;
  border-radius: 15px;
  background: var(--ryr-card-bg);
  text-align: center;
}
.ryr-empty p {
  margin: 0;
  font-size: 14px;
  color: #666;
}

/* ---------- Write-review modal ---------- */
.ryr-modal {
  --ryr-star: #ffa41c;
  --ryr-star-empty: #d9d9d9;
  --ryr-text: #303030;
  --ryr-btn-bg: #324a30;
  --ryr-btn-color: #fff;
  --ryr-card-bg: #fff;
  --ryr-card-border: #e5e5e5;
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.55);
  color: var(--ryr-text);
  font-size: 14px;
  line-height: 1.5;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.ryr-modal.ryr-open {
  opacity: 1;
}
.ryr-modal *,
.ryr-modal *::before,
.ryr-modal *::after {
  box-sizing: border-box;
}
.ryr-modal button {
  font: inherit;
  cursor: pointer;
}
.ryr-modal-box {
  position: relative;
  width: min(560px, 100%);
  max-height: 100%;
  overflow-y: auto;
  border-radius: 12px;
  background: var(--ryr-card-bg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s ease;
}
.ryr-modal.ryr-open .ryr-modal-box {
  transform: none;
}
.ryr-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: var(--ryr-text);
}
.ryr-modal-close svg {
  display: block;
  width: 18px;
  height: 18px;
}
.ryr-form {
  padding: 28px 28px 24px;
}
.ryr-form-title {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
}
.ryr-rate {
  justify-content: center;
}
.ryr-form .ryr-label {
  text-align: left;
}
.ryr-form .ryr-field-rating {
  align-items: center;
}
.ryr-form .ryr-field-rating .ryr-label {
  text-align: center;
}
.ryr-done-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--ryr-btn-bg);
  color: var(--ryr-btn-color);
  font-size: 26px;
}
@media (max-width: 599px) {
  .ryr-modal {
    align-items: flex-end;
    padding: 0;
  }
  .ryr-modal-box {
    width: 100%;
    max-height: 92%;
    border-radius: 16px 16px 0 0;
  }
  .ryr-form {
    padding: 24px 16px 16px;
  }
}
.ryr-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 599px) {
  .ryr-row {
    grid-template-columns: 1fr;
  }
}
.ryr-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.ryr-label {
  font-size: 13px;
  font-weight: 600;
}
.ryr-field input,
.ryr-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  background: #fff;
  color: #222;
  font: inherit;
}
.ryr-field input:focus,
.ryr-field textarea:focus {
  outline: 2px solid var(--ryr-btn-bg);
  outline-offset: -1px;
}
.ryr-rate {
  display: flex;
  gap: 4px;
}
.ryr-rate-star {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
}
.ryr-rate-star svg {
  width: 100%;
  height: 100%;
}
.ryr-rate-star path {
  fill: var(--ryr-star-empty);
  transition: fill 0.1s;
}
.ryr-rate-star.ryr-on path {
  fill: var(--ryr-star);
}
.ryr-uploads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ryr-upload,
.ryr-upload-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 6px;
  overflow: hidden;
  background: #f2f2f2;
}
.ryr-upload img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ryr-upload button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff !important;
  line-height: 20px;
}
.ryr-uploading::after {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid #bbb;
  border-top-color: transparent;
  border-radius: 50%;
  animation: ryr-spin 0.8s linear infinite;
}
@keyframes ryr-spin {
  to {
    transform: rotate(360deg);
  }
}
.ryr-upload-btn {
  border: 1px dashed #bbb;
  font-size: 28px;
  color: #888;
  cursor: pointer;
}
.ryr-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}
.ryr-form-msg {
  min-height: 1em;
  margin: 0 0 8px;
  font-size: 13px;
}
.ryr-form-msg.ryr-error {
  color: #d72c0d;
}
.ryr-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.ryr-form-done {
  padding: 32px 8px 16px;
  text-align: center;
}
.ryr-form-done p {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

/* ---------- Star badge ---------- */
.ryr-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1;
  color: var(--ryr-text);
}
.ryr-badge:empty {
  display: none;
}
.ryr-badge-link {
  cursor: pointer;
}
.ryr-badge-link:hover .ryr-badge-count {
  text-decoration: underline;
}
.ryr-badge.ryr-auto {
  display: flex;
  margin: 4px 0;
}
.ryr-badge.ryr-auto:empty {
  display: none;
}
.ryr-badge-count {
  color: var(--ryr-muted);
}

/* ---------- Photo viewer ---------- */
html.ryr-no-scroll {
  overflow: hidden;
}
.ryr-viewer {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.75);
  color: var(--ryr-text);
  font-size: 14px;
  line-height: 1.5;
}
.ryr-viewer.ryr-open {
  display: flex;
}
.ryr-viewer-box {
  position: relative;
  display: flex;
  width: min(960px, 100%);
  height: min(620px, 100%);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.ryr-viewer-media {
  position: relative;
  display: flex;
  flex: 1 1 60%;
  align-items: center;
  justify-content: center;
  min-width: 0;
  background: #111;
}
.ryr-viewer-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.ryr-viewer-nav {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #111 !important;
  transform: translateY(-50%);
}
.ryr-viewer-nav svg {
  width: 18px;
  height: 18px;
}
.ryr-viewer-prev {
  left: 12px;
}
.ryr-viewer-next {
  right: 12px;
}
.ryr-viewer-counter {
  position: absolute;
  bottom: 12px;
  left: 50%;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  transform: translateX(-50%);
}
.ryr-viewer-counter:empty {
  display: none;
}
.ryr-viewer-info {
  display: flex;
  flex: 0 0 360px;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  overflow-y: auto;
}
.ryr-viewer-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ryr-viewer-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
}
.ryr-viewer-close svg {
  width: 18px;
  height: 18px;
}
@media (max-width: 749px) {
  .ryr-viewer {
    padding: 0;
  }
  .ryr-viewer-box {
    flex-direction: column;
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
  .ryr-viewer-media {
    flex: 0 0 55%;
  }
  .ryr-viewer-info {
    flex: 1;
    padding: 16px;
  }
  .ryr-viewer-close {
    background: rgba(255, 255, 255, 0.9);
  }
}

/* ---------- Featured reviews carousel ---------- */
.ryr-featured-title {
  text-align: center;
}
.ryr-featured .ryr-slide {
  display: flex;
  flex-direction: column;
}
.ryr-featured-cover img {
  height: 220px;
  min-height: 0;
  max-height: none;
  object-fit: cover;
}
.ryr-product-link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: auto 12px 12px;
  padding: 8px;
  border-radius: 6px;
  background: #f5f5f5;
  color: var(--ryr-text) !important;
  font-size: 13px;
  text-decoration: none !important;
}
.ryr-product-link img {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 4px;
  object-fit: cover;
}
.ryr-product-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 500;
}
.ryr-product-cta {
  flex: none;
  font-size: 12px;
  text-decoration: underline;
  color: var(--ryr-muted);
}

/* Pro widget on the Free plan, shown only in the theme editor */
.ryr-locked {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  margin: 16px 0;
  padding: 28px 24px;
  border: 1px dashed #d4a017;
  border-radius: 8px;
  background: #fffbeb;
  color: #5c4400;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

/* ---------- Reviews popup (app embed) ---------- */
.ryr-popup {
  position: fixed;
  margin: 0;
  z-index: 2147483000;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-sizing: border-box;
  width: 340px;
  max-width: calc(100vw - 32px);
  padding: 14px 36px 14px 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  background: var(--ryr-card-bg, #fff);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  color: var(--ryr-text);
  font-size: 13px;
  line-height: 1.35;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
}
.ryr-popup.ryr-popup-in {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}
.ryr-popup-bottom-left { left: 20px; bottom: 20px; }
.ryr-popup-bottom-right { right: 20px; bottom: 20px; }
.ryr-popup-top-left { left: 20px; top: 20px; }
.ryr-popup-top-right { right: 20px; top: 20px; }
/* Start positions of the entrance animations */
.ryr-anim-fadeInUp { transform: translateY(16px); }
.ryr-anim-zoomIn { transform: scale(0.85); }
.ryr-popup-bottom-left.ryr-anim-slideInSide,
.ryr-popup-top-left.ryr-anim-slideInSide { transform: translateX(-40px); }
.ryr-popup-bottom-right.ryr-anim-slideInSide,
.ryr-popup-top-right.ryr-anim-slideInSide { transform: translateX(40px); }
.ryr-popup-img {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: #f3f3f3;
}
.ryr-popup-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.ryr-popup-head {
  color: var(--ryr-muted);
}
.ryr-popup-head strong {
  color: var(--ryr-title, #222);
  font-weight: 600;
}
.ryr-popup-product {
  overflow: hidden;
  color: var(--ryr-title, #222);
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ryr-popup-text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}
.ryr-popup-time {
  color: var(--ryr-muted);
  font-size: 12px;
}
.ryr-popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8c9196;
  cursor: pointer;
}
.ryr-popup-close:hover {
  background: #f1f1f1;
}
.ryr-popup-close svg {
  width: 14px;
  height: 14px;
}
/* Phones only: the popup spans the screen width. Wider frames (e.g. the admin preview) keep 340px. */
@media (max-width: 480px) {
  .ryr-popup-bottom-left,
  .ryr-popup-bottom-right { left: 16px; right: 16px; bottom: 16px; width: auto; }
  .ryr-popup-top-left,
  .ryr-popup-top-right { left: 16px; right: 16px; top: 16px; width: auto; }
}

/* ---------- Reviews snippet (product page block) ---------- */
.ryr-snippet {
  --ryr-sn-bg: #f4f4f5;
  --ryr-sn-per: 1;
  position: relative;
  margin: 12px 0;
  max-width: none;
}
.ryr-sn-viewport {
  overflow: hidden;
}
.ryr-sn-track {
  display: flex;
  align-items: flex-start;
  transition: transform 0.45s ease;
}
.ryr-sn-equal .ryr-sn-track {
  align-items: stretch;
}
.ryr-sn-slide {
  flex: 0 0 calc(100% / var(--ryr-sn-per));
  min-width: 0;
  padding: 4px 6px;
}
.ryr-sn-card {
  display: flex;
  height: 100%;
  color: var(--ryr-text);
  font-size: 14px;
  line-height: 1.5;
}
.ryr-sn-card[data-open] {
  cursor: pointer;
}
.ryr-sn-title {
  display: block;
  margin-bottom: 4px;
  color: var(--ryr-title);
  font-size: 15px;
  font-weight: 600;
}
.ryr-sn-text {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}
.ryr-sn-thumb {
  display: block;
  width: 48px;
  height: 48px;
  margin-top: 10px;
  border-radius: 6px;
  object-fit: cover;
}
.ryr-sn-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ryr-sn-avatar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e1e1e1;
  color: #666;
  font-weight: 700;
}
.ryr-sn-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ryr-sn-meta {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ryr-sn-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ryr-sn-name {
  color: var(--ryr-title);
  font-weight: 600;
}
.ryr-sn-verified {
  display: inline-flex;
  color: var(--ryr-verified);
}
.ryr-sn-verified svg {
  width: 12px;
  height: 12px;
}
/* Layout 1: premium testimonial */
.ryr-sn-testimonial {
  flex-direction: column;
  padding: 20px 28px;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  background: var(--ryr-sn-bg);
}
.ryr-sn-testimonial .ryr-sn-quote {
  flex: 1;
}
.ryr-sn-testimonial .ryr-sn-text {
  font-style: italic;
  line-height: 1.6;
}
.ryr-sn-divider {
  height: 1px;
  margin: 16px 0;
  background: #eaeaea;
}
/* Layout 2: social ticker */
.ryr-sn-ticker {
  align-items: center;
  gap: 12px;
  padding: 10px 24px 10px 12px;
  border: 1px solid #eee;
  border-radius: 50px;
  background: var(--ryr-sn-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}
.ryr-sn-ticker .ryr-sn-avatar,
.ryr-sn-ticker .ryr-sn-thumb {
  width: 40px;
  height: 40px;
  margin: 0;
  border-radius: 50%;
}
.ryr-sn-line {
  overflow: hidden;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
/* Layout 3: chat bubbles */
.ryr-sn-bubble-card,
.ryr-sn-bubble {
  position: relative;
}
.ryr-sn-card.ryr-sn-bubble {
  flex-direction: column;
  padding: 6px 4px 12px;
}
.ryr-sn-card.ryr-sn-bubble > .ryr-sn-bubble {
  flex: 1;
  padding: 16px 24px;
  border-radius: 18px;
  background: var(--ryr-sn-bg);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.ryr-sn-card.ryr-sn-bubble:hover > .ryr-sn-bubble {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}
.ryr-sn-tail {
  width: 0;
  height: 0;
  margin: -1px 0 0 32px;
  border-top: 14px solid var(--ryr-sn-bg);
  border-right: 14px solid transparent;
  border-left: 14px solid transparent;
}
.ryr-sn-card.ryr-sn-bubble .ryr-sn-author {
  margin-top: 8px;
  padding-left: 10px;
}
.ryr-sn-card.ryr-sn-bubble .ryr-sn-avatar {
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
/* Arrows */
.ryr-sn-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #e5e5e5;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  color: #333;
  cursor: pointer;
  transform: translateY(-50%);
}
.ryr-sn-nav svg {
  width: 16px;
  height: 16px;
}
.ryr-sn-prev {
  left: -6px;
}
.ryr-sn-next {
  right: -6px;
}
.ryr-sn-nav:disabled {
  opacity: 0.3;
  cursor: default;
}
/* Review without photos opened from the snippet: text only */
.ryr-viewer-noimg .ryr-viewer-media {
  display: none;
}
.ryr-viewer-noimg .ryr-viewer-box {
  width: min(520px, calc(100vw - 32px));
  height: auto;
  max-height: min(620px, 100%);
}
.ryr-viewer-noimg .ryr-viewer-info {
  flex: 1;
}

/* "Log in to write a review" prompt */
.ryr-login-prompt .ryr-login-text {
  margin: 8px 0 20px;
  line-height: 1.5;
}
.ryr-login-prompt a.ryr-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

/* Loading state while a filter / sort / search reloads the list */
.ryr-busy .ryr-list {
  position: relative;
  pointer-events: none;
  min-height: 120px;
}
.ryr-busy .ryr-list::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(255, 255, 255, 0.6);
}
.ryr-busy .ryr-list::after {
  content: "";
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 48px;
  width: 32px;
  height: 32px;
  margin-left: -16px;
  border: 3px solid rgba(0, 0, 0, 0.12);
  border-top-color: var(--ryr-star, #ffa41c);
  border-radius: 50%;
  animation: ryr-spin 0.7s linear infinite;
}
@keyframes ryr-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Featured carousel: loading the next page at its end */
.ryr-car-loading::after {
  content: "";
  flex: 0 0 28px;
  align-self: center;
  width: 28px;
  height: 28px;
  margin: 0 24px;
  border: 3px solid rgba(0, 0, 0, 0.12);
  border-top-color: var(--ryr-star, #ffa41c);
  border-radius: 50%;
  animation: ryr-spin 0.7s linear infinite;
}

/* ---------- Trust badge (store-wide rating card) ---------- */
.ryviu-trust-badge {
  display: flex;
  margin: 8px 0;
  justify-content: flex-start;
}
.ryviu-trust-badge[data-align="center"] {
  justify-content: center;
}
.ryviu-trust-badge[data-align="right"] {
  justify-content: flex-end;
}
.ryviu-trust-badge:empty {
  display: none;
}
.ryr-trust-card {
  min-width: 200px;
  overflow: hidden;
  text-align: center;
  color: var(--ryr-text);
  background: var(--ryr-card-bg, #fff);
  border: 1px solid var(--ryr-card-border, #d9d9d9);
  border-radius: 10px;
}
.ryr-trust-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px 4px;
}
.ryr-trust-top .ryr-stars {
  gap: 2px;
}
.ryr-trust-score {
  font-size: 20px;
  font-weight: 700;
}
.ryr-trust-count {
  padding: 6px 18px 14px;
  font-size: 20px;
}
.ryr-trust-foot {
  padding: 7px 10px;
  font-size: 13px;
  color: var(--ryr-trust-color, #fff);
  background: var(--ryr-trust-bg, #2b2b2b);
}
.ryr-trust-foot strong {
  letter-spacing: 1px;
}
