/* Customer reviews: the public board (/reviews/), posting one (dashboard/reviews.php)
   and the staff queue. Builds on auth.css colours, so it works on both layouts. */

.rv-stars {
    display: inline-flex;
    gap: 2px;
    color: #f5c542;
    font-size: 15px;
}

.rv-stars .bi-star {
    color: #4b6457;
}

/* --- Board summary --- */

.rv-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px 40px;
    margin-bottom: 28px;
    padding: 26px 28px;
    border: 1px solid var(--auth-field-border);
    border-radius: 24px;
    background: var(--auth-card);
}

.rv-summary__score {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.rv-summary__score strong {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
}

.rv-summary__score .rv-stars {
    font-size: 20px;
}

.rv-summary__score span {
    color: var(--auth-muted);
    font-size: 14px;
}

.rv-summary__bars {
    display: grid;
    gap: 6px;
}

.rv-bar {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 36px;
    align-items: center;
    gap: 10px;
    color: var(--auth-muted);
    font-size: 13px;
}

.rv-bar span .bi {
    color: #f5c542;
}

.rv-bar > i {
    position: relative;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--auth-pill);
}

.rv-bar > i::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--w);
    border-radius: inherit;
    background: #f5c542;
}

.rv-bar em {
    font-style: normal;
    text-align: right;
}

/* --- Review cards --- */

.rv-grid {
    columns: 3 320px;
    column-gap: 18px;
    margin-top: 22px;
}

.rv-grid .rv-card {
    break-inside: avoid;
    margin-bottom: 18px;
}

.rv-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    border: 1px solid var(--auth-field-border);
    border-radius: 20px;
    background: var(--auth-card);
}

.rv-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
}

.rv-card--public .rv-card__head time {
    margin-left: auto;
    color: var(--auth-subtle);
    font-size: 13px;
}

.rv-avatar {
    display: grid;
    flex: none;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #08913a, #b9e660);
    color: #0b1712;
    font-weight: 800;
}

.rv-who {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rv-who span {
    color: var(--auth-muted);
    font-size: 13px;
}

.rv-who .bi {
    color: var(--auth-lime);
}

.rv-card__body {
    margin: 0;
    color: #dbe5de;
    font-size: 15px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.rv-card__foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 12px;
    color: var(--auth-muted);
    font-size: 13px;
}

.rv-video {
    width: 100%;
    max-height: 420px;
    border-radius: 14px;
    background: #000;
}

.rv-shots {
    display: grid;
    gap: 6px;
}

.rv-shots--2,
.rv-shots--4 {
    grid-template-columns: 1fr 1fr;
}

.rv-shots--3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.rv-shot {
    display: block;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
    aspect-ratio: 4 / 3;
}

.rv-shots--1 .rv-shot {
    aspect-ratio: auto;
    max-height: 420px;
}

.rv-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.rv-shots--1 .rv-shot img {
    object-fit: contain;
}

.rv-shot:hover img {
    transform: scale(1.03);
}

.rv-pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.rv-pages a {
    min-width: 40px;
    padding: 8px 12px;
    border: 1px solid var(--auth-field-border);
    border-radius: 10px;
    color: var(--auth-text);
    text-align: center;
    text-decoration: none;
}

.rv-pages a.is-active {
    border-color: var(--auth-lime);
    color: var(--auth-lime);
}

.rv-lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 40px 16px;
    background: rgba(0, 0, 0, 0.88);
}

.rv-lightbox[hidden] {
    display: none;
}

.rv-lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
}

.rv-lightbox__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

/* --- Posting a review --- */

.rv-form {
    max-width: 760px;
}

.rv-rate {
    margin: 0;
    padding: 0;
    border: 0;
}

.rv-rate legend {
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
}

/* Five stars, highest first in the markup so hovering lights up the ones before it */
.rv-rate__stars {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 4px;
}

.rv-rate__stars input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rv-rate__stars label {
    color: #3a5446;
    font-size: 30px;
    cursor: pointer;
    transition: color 0.1s ease;
}

.rv-rate__stars label:hover,
.rv-rate__stars label:hover ~ label,
.rv-rate__stars input:checked ~ label {
    color: #f5c542;
}

.rv-rate__stars input:focus-visible + label {
    outline: 2px solid var(--auth-lime);
    outline-offset: 2px;
    border-radius: 4px;
}

.rv-body {
    min-height: 130px;
    resize: vertical;
}

.rv-uploads {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.rv-drop {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 22px 16px;
    border: 1.5px dashed var(--auth-field-border);
    border-radius: 16px;
    background: var(--auth-field);
    color: var(--auth-muted);
    font-size: 13px;
    text-align: center;
    cursor: pointer;
}

.rv-drop:hover,
.rv-drop:focus-within,
.rv-drop.has-files {
    border-color: var(--auth-lime);
}

.rv-drop > .bi {
    color: var(--auth-lime);
    font-size: 26px;
}

.rv-drop strong {
    color: var(--auth-text);
    font-size: 15px;
}

.rv-drop input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.rv-drop__files {
    color: var(--auth-lime);
    word-break: break-all;
}

.rv-progress {
    position: relative;
    height: 30px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--auth-pill);
}

.rv-progress[hidden] {
    display: none;
}

.rv-progress span {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: var(--auth-green);
    transition: width 0.2s ease;
}

.rv-progress em {
    position: relative;
    display: block;
    color: #fff;
    font-size: 13px;
    font-style: normal;
    line-height: 30px;
    text-align: center;
}

.rv-mine,
.rv-queue {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

.rv-queue {
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}

@media (max-width: 760px) {
    .rv-summary {
        grid-template-columns: 1fr;
    }

    .rv-queue {
        grid-template-columns: 1fr;
    }
}

.rv-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
