/* Reviews carousel widget - no dependencies.
   Colours inherit the host site's custom properties when present. */

.rc {
  --rc-gap: 18px;
  --rc-card-radius: 20px;
  --rc-ink: var(--fg, var(--ink, #191225));
  --rc-muted: var(--muted, var(--ink-soft, #5f5769));
  --rc-surface: var(--surface, var(--white, #ffffff));
  --rc-border: var(--border, var(--line, color-mix(in srgb, var(--rc-accent) 24%, var(--rc-surface))));
  --rc-accent: #fc5800;
  --rc-accent-strong: var(--rc-accent);
  --rc-soft: color-mix(in srgb, var(--rc-accent) 14%, var(--rc-surface));
  --rc-star: #f2a51a;
  container-name: rc;
  container-type: inline-size;
  display: block;
  position: relative;
  margin-left: auto;
  margin-right: auto;
  max-width: 1200px;
  padding: 0 20px;
  color: var(--rc-ink);
  font-family: inherit;
  font-size: 16px;
}

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

.rc [hidden] {
  display: none !important;
}

.rc-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.rc-eyebrow {
  margin: 0 0 8px;
  color: var(--rc-accent-strong);
  font-size: 0.76em;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rc-title {
  margin: 0;
  font-family: inherit;
  font-size: clamp(1.45em, 1.05em + 1.5vw, 2.1em);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.rc-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0 0;
  color: var(--rc-muted);
  font-size: 0.95em;
  line-height: 1.4;
}

.rc-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px 4px 9px;
  border-radius: 999px;
  background: var(--rc-soft);
  color: var(--rc-accent-strong);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.rc-score svg {
  width: 14px;
  height: 14px;
  fill: var(--rc-star);
}

.rc-controls {
  display: flex;
  flex: none;
  gap: 8px;
}

.rc-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--rc-border);
  border-radius: 50%;
  background: var(--rc-surface);
  color: var(--rc-ink);
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.rc-btn:hover:not(:disabled) {
  border-color: var(--rc-accent);
  color: var(--rc-accent-strong);
  transform: translateY(-1px);
}

.rc-btn:focus-visible {
  outline: 3px solid var(--rc-accent);
  outline-offset: 2px;
}

.rc-btn:disabled {
  cursor: default;
  opacity: 0.33;
}

.rc-btn svg {
  width: 18px;
  height: 18px;
}

.rc-track {
  display: flex;
  gap: var(--rc-gap);
  margin: 0;
  padding: 4px 2px 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  list-style: none;
}

.rc-track::-webkit-scrollbar {
  display: none;
}

.rc-track:focus-visible {
  outline: 3px solid var(--rc-accent);
  outline-offset: 4px;
  border-radius: var(--rc-card-radius);
}

.rc-card {
  display: flex;
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
}

@container rc (min-width: 600px) {
  .rc-card {
    flex-basis: calc((100% - var(--rc-gap)) / 2);
  }
}

@container rc (min-width: 960px) {
  .rc-card {
    flex-basis: calc((100% - var(--rc-gap) * 2) / 3);
  }
}

.rc-review {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  padding: 22px;
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-card-radius);
  background: var(--rc-surface);
  box-shadow: 0 18px 34px -30px rgba(25, 18, 37, 0.55);
}

.rc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rc-stars {
  color: var(--rc-star);
  font-size: 1em;
  letter-spacing: 0.06em;
  line-height: 1;
  white-space: nowrap;
}

.rc-stars [data-empty] {
  color: var(--rc-border);
}

.rc-date {
  color: var(--rc-muted);
  font-size: 0.78em;
  white-space: nowrap;
}

.rc-text {
  display: -webkit-box;
  flex: 1;
  margin: 0;
  overflow: hidden;
  color: var(--rc-ink);
  font-size: inherit;
  line-height: 1.62;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 7;
}

.rc-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--rc-border);
}

.rc-avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--rc-soft);
  color: var(--rc-accent-strong);
  font-size: 0.9em;
  font-weight: 800;
  text-transform: uppercase;
}

img.rc-avatar {
  display: block;
  object-fit: cover;
}

.rc-author {
  flex: 1;
  min-width: 0;
}

.rc-name {
  display: block;
  overflow: hidden;
  font-size: 0.92em;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rc-source {
  display: block;
  color: var(--rc-muted);
  font-size: 0.78em;
}

.rc-link {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  color: var(--rc-accent-strong);
  font-size: 0.8em;
  font-weight: 700;
  text-decoration: none;
}

.rc-link:hover {
  text-decoration: underline;
}

.rc-link:focus-visible {
  outline: 3px solid var(--rc-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.rc-link svg {
  width: 13px;
  height: 13px;
}

.rc-footbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
}

.rc-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 8px;
}

.rc-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--rc-border);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.rc-dot[aria-current="true"] {
  width: 24px;
  background: var(--rc-accent);
}

.rc-dot:focus-visible {
  outline: 2px solid var(--rc-accent);
  outline-offset: 2px;
}

.rc-note {
  margin: 0;
  color: var(--rc-muted);
  font-size: 0.78em;
  text-align: right;
}

.rc-note a {
  color: inherit;
}

.rc-state {
  width: 100%;
  padding: 30px 24px;
  border: 1px dashed var(--rc-border);
  border-radius: var(--rc-card-radius);
  background: var(--rc-surface);
  color: var(--rc-muted);
  text-align: center;
}

.rc-state p {
  margin: 0;
}

.rc-state a {
  color: var(--rc-accent-strong);
  font-weight: 700;
}

.rc-static .rc-controls,
.rc-static .rc-dots {
  display: none;
}

.rc-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.rc-sk {
  border-radius: 8px;
  background: linear-gradient(90deg, var(--rc-soft), var(--rc-border), var(--rc-soft));
  background-size: 200% 100%;
  animation: rc-shimmer 1.4s linear infinite;
}

.rc-sk-stars {
  width: 92px;
  height: 14px;
}

.rc-sk-line {
  height: 12px;
}

.rc-sk-line-short {
  width: 62%;
}

.rc-sk-foot {
  width: 46%;
  height: 34px;
  border-radius: 999px;
}

@keyframes rc-shimmer {
  to {
    background-position: -200% 0;
  }
}

@container rc (max-width: 599px) {
  .rc-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .rc-controls {
    display: none;
  }

  .rc-review {
    padding: 20px;
  }

  .rc-footbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .rc-note {
    text-align: left;
  }
}

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

  .rc-btn,
  .rc-dot {
    transition: none;
  }

  .rc-sk {
    animation: none;
  }
}

@media print {
  .rc-track {
    flex-wrap: wrap;
    overflow: visible;
  }

  .rc-card {
    flex-basis: 100%;
  }

  .rc-controls,
  .rc-footbar {
    display: none;
  }

  .rc-text {
    display: block;
    overflow: visible;
    -webkit-line-clamp: none;
  }
}
