/* Resource reviews and ratings (#6385).
 *
 * The star INPUT is styled radio buttons — no JS widget. Each radio sits
 * inside its <label>, so nothing here depends on ids and any number of rating
 * forms can coexist on one page. With CSS off this degrades to a plain radio
 * group with visible "1 - Strongly disagree" style labels, which still submits
 * correctly.
 */

.cce-rr-question {
    border: 0;
    padding: 0;
    margin: 0 0 1rem 0;
}

.cce-rr-legend {
    float: none;
    width: auto;
    font-size: 0.95rem;
    line-height: 1.35;
    color: #1f3f68;
}

.cce-rr-stars {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}

.cce-rr-star {
    cursor: pointer;
    position: relative;
    font-size: 1.5rem;
    line-height: 1;
    color: #c8ced6;
    padding: 0.1rem 0.05rem;
    transition: color 0.12s ease-in-out, transform 0.12s ease-in-out;
}

.cce-rr-star.is-on {
    color: #f0a500;
}

.cce-rr-star:hover {
    transform: scale(1.12);
}

/* The radio itself stays in the accessibility tree and stays focusable — it is
 * only moved out of sight. display:none / visibility:hidden would drop it from
 * keyboard navigation entirely. */
.cce-rr-star input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    margin: 0;
    pointer-events: none;
}

/* A focused radio must show where the keyboard is. */
.cce-rr-star:focus-within {
    outline: 2px solid #1f3f68;
    outline-offset: 2px;
    border-radius: 3px;
}

/* Read-only star display (cards, resource page, review list, admin queue). */
.cce-rr-rating .cce-rr-full,
.cce-rr-rating .cce-rr-half {
    color: #f0a500;
}

.cce-rr-rating .cce-rr-empty {
    color: #c8ced6;
}

.cce-rr-stars-display {
    white-space: nowrap;
}

/* "What others say" — the highlighted-quotes card. */
.cce-rr-others .cce-rr-quote {
    border-left: 3px solid #f0a500;
    padding-left: 0.9rem;
    margin-left: 0;
    font-size: 1.02rem;
    line-height: 1.5;
    color: #23324a;
}

.cce-rr-others .cce-rr-attrib {
    font-style: normal;
}

.cce-rr-others .cce-rr-attrib .fa-star {
    color: #f0a500;
}

.cce-rr-others .cce-rr-morelink {
    margin-top: 0.25rem;
}

/* The full reviews page. */
.cce-rr-review:last-child {
    border-bottom: 0 !important;
}

.cce-rr-breakdown dt {
    font-weight: 400;
}

/* My Resources card control. */
.cce-rr-yourrating .btn-link {
    padding: 0;
}

/* Admin question editor — a retired row must read as retired at a glance. */
.cce-rr-retired input[type="text"] {
    font-style: italic;
}
