/*
 * Review wall, carousel, star snippet and the course page "Show more" control.
 * Markup: everywhere/onlysecurity-review-wall.php. Tokens match the course
 * page (.os-c in onlysecurity-course.css) so a card reads the same anywhere.
 */
.os-rw, .os-c-section {
	--os-rw-text: #1e293b;
	--os-rw-muted: #64748b;
	--os-rw-border: #e5e7eb;
	--os-rw-panel: #ffffff;
	--os-rw-primary: #2F62AF;
	--os-rw-primary-soft: rgba(47, 98, 175, 0.10);
	--os-rw-star: #d97706;
}
.os-rw { color: var(--os-rw-text); }

.os-rw-figure { margin: 0 0 20px; font-size: 15px; line-height: 1.5; color: var(--os-rw-muted); }
.os-rw-figure__num { color: var(--os-rw-text); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.os-rw-figure__num [aria-hidden] { color: var(--os-rw-star); }
.os-rw-figure a, .os-rw-disclosure a, .os-rw-carousel__all { color: var(--os-rw-primary); font-weight: 600; }

.os-rw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; align-items: start; }
.os-rw-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--os-rw-border); border-radius: 10px; background: var(--os-rw-panel); min-width: 0; }
.os-rw-card:focus, .os-c-review:focus { outline: 2px solid var(--os-rw-primary); outline-offset: 2px; }
.os-rw-card__head { display: flex; align-items: center; gap: 10px; }
.os-rw-card__head img { width: 36px; height: 36px; border-radius: 50%; }
.os-rw-card__who { font-weight: 600; font-size: 14px; }
.os-rw-card__when { color: var(--os-rw-muted); font-size: 12px; }
.os-rw-stars { color: var(--os-rw-star); letter-spacing: 1px; }
.os-rw-card__body { margin: 0; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.os-rw-card__course { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--os-rw-border); color: var(--os-rw-text); font-size: 13px; text-decoration: none; }
.os-rw-card__course:hover span { text-decoration: underline; }
.os-rw-card__thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; }

.os-rw-disclosure { margin: 16px 0 0; font-size: 14px; color: var(--os-rw-muted); }
.os-rw-empty { color: var(--os-rw-muted); }
.os-rw-status { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.os-rw-more { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 16px; padding: 0 16px; border: 1px solid var(--os-rw-border); border-radius: 8px; background: var(--os-rw-panel); color: var(--os-rw-primary); font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; }
.os-rw-more:hover { background: var(--os-rw-primary-soft); }
.os-rw-more:focus-visible { outline: 2px solid var(--os-rw-primary); outline-offset: 2px; }
.os-rw-more.is-loading { opacity: .6; cursor: progress; }

/* Carousel: scroll-snap row, never moves on its own. */
.os-rw-carousel__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.os-rw-carousel__nav { display: flex; gap: 8px; }
.os-rw-carousel__btn { width: 44px; height: 44px; border: 1px solid var(--os-rw-border); border-radius: 50%; background: var(--os-rw-panel); color: var(--os-rw-text); font-size: 22px; line-height: 1; cursor: pointer; }
.os-rw-carousel__btn:hover { background: var(--os-rw-primary-soft); }
.os-rw-carousel__btn:focus-visible, .os-rw-carousel__track:focus-visible { outline: 2px solid var(--os-rw-primary); outline-offset: 2px; }
.os-rw-carousel__track { display: grid; grid-auto-flow: column; grid-auto-columns: min(85%, 320px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; padding-bottom: 8px; }
.os-rw-carousel__track > .os-rw-card { scroll-snap-align: start; }
.os-rw-carousel__all { display: inline-block; margin-top: 12px; }
@media (prefers-reduced-motion: reduce) { .os-rw-carousel__track { scroll-behavior: auto; } }

.os-rw-snippet { display: inline-flex; align-items: center; gap: 4px; color: var(--os-rw-primary, #2F62AF); font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; }
.os-rw-snippet [aria-hidden] { color: #d97706; }
.os-rw-snippet:hover { text-decoration: underline; }

/* Labels and replies, for pages without the course stylesheet. */
.os-rw .os-rv-badge { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.5; vertical-align: 1px; white-space: nowrap; }
.os-rw .os-rv-badge--completed { background: #e7f6ec; color: #166534; }
.os-rw .os-rv-badge--enrolled { background: #eef2f7; color: #374151; }
.os-rw .os-rr-reply { margin: 4px 0 0; padding: 8px 0 8px 12px; border-left: 3px solid var(--os-rw-primary); }
.os-rw .os-rr-reply__who { margin: 0 0 2px; font-size: 13px; font-weight: 600; }
.os-rw .os-rr-reply__edited { font-weight: 400; color: var(--os-rw-muted); }
.os-rw .os-rr-reply__body { margin: 0; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.os-rw details.os-rr-reply { margin: 0; padding: 6px 0 6px 12px; border-left: 3px solid var(--os-rw-primary); }
.os-rw details.os-rr-reply > summary { cursor: pointer; list-style: none; font-size: 13px; font-weight: 600; color: var(--os-rw-primary); }
.os-rw details.os-rr-reply > summary::-webkit-details-marker { display: none; }
.os-rw details.os-rr-reply > summary::before { content: "\25B8\00a0"; }
.os-rw details.os-rr-reply[open] > summary::before { content: "\25BE\00a0"; }
.os-rw details.os-rr-reply > summary:focus-visible { outline: 2px solid var(--os-rw-primary); outline-offset: 2px; }
.os-rw details.os-rr-reply .os-rr-reply__body { margin-top: 6px; }
