/* My Epiphany - source ratings on external reference links (see includes/reference-rating.php) */

/* "(Rating: 92)" after each reference */
.ref-rating {
    margin-left: 4px;
    color: #7b8086;
    font-size: 0.85em;
    white-space: nowrap;
}

/* Hover card */
.rt-card {
    position: fixed;
    z-index: 10000;
    width: max-content;
    max-width: min(320px, calc(100vw - 16px));
    padding: 12px 14px 10px;
    background: #ffffff;
    border: 1px solid #d5dde5;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 40, 70, 0.18);
    color: #2f3337;
    font: 14px/1.45 'Open Sans', Arial, sans-serif;
    text-align: left;
    pointer-events: none;            /* never gets in the way of the mouse */
    opacity: 0;
    transform: translateY(3px);
    transition: opacity .12s ease, transform .12s ease;
}
.rt-card.is-open { opacity: 1; transform: none; }
.rt-card[hidden] { display: none; }

.rt-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.rt-type { font-weight: 700; font-size: 14.5px; }

.rt-score {
    flex: 0 0 auto;
    min-width: 34px;
    padding: 1px 8px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13.5px;
    text-align: center;
    color: #fff;
}
.rt-high  { background: #1e7d4f; }   /* 85-100 */
.rt-good  { background: #0077ad; }   /* 70-84  */
.rt-mixed { background: #b26b00; }   /* 55-69  */
.rt-low   { background: #a12a2a; }   /* 1-54   */
.rt-none  { background: #eef1f4; color: #5a5959; font-weight: 600; }

.rt-domain { margin-top: 2px; color: #0077ad; font-size: 13px; }
.rt-basis  { margin: 6px 0 0; padding: 0; color: #4a4f55; font-size: 13.5px; line-height: 1.45; }
.rt-foot   { margin-top: 8px; padding-top: 6px; border-top: 1px solid #edf0f3; color: #8a9096; font-size: 11.5px; }

@media (prefers-reduced-motion: reduce) {
    .rt-card { transition: none; }
}
