/* Tyre-page "Rim Protection" section (.rim-prot)
   Rendered by render_rim_protection_section() in includes/Tyre/tyre_rim_protection.php.
   Five-step meter (none -> massive) plus the per-size observations behind it. */

.rim-prot__verdict {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.9rem;
}

.rim-prot__level {
    flex: 0 0 auto;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.01em;
    color: #ffffff;
    background: var(--tyre-reviews-blue);
}

/* No protector at all is the one reading that is a warning, not a grade. */
.rim-prot__level--none {
    color: #7a2020;
    background: #fdecec;
    box-shadow: inset 0 0 0 1px #f2c2c2;
}

.rim-prot__level--small   { background: #6ccdf0; color: #05364a; }
.rim-prot__level--medium  { background: var(--tyre-reviews-blue); }
.rim-prot__level--large   { background: var(--tyre-reviews-blue-dark); }
.rim-prot__level--massive { background: #0a7fa8; }

.rim-prot__blurb {
    flex: 1 1 260px;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #475569;
}

/* --- Segmented meter -------------------------------------------------- */

.rim-prot__meter {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.3rem;
    margin: 0 0 1rem;
}

.rim-prot__step {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.rim-prot__bar {
    display: block;
    height: 10px;
    border-radius: 3px;
    background: #e2e8f0;
    transition: background-color 0.15s ease;
}

.rim-prot__step.is-filled .rim-prot__bar {
    background: #9adcf5;
}

.rim-prot__step.is-current .rim-prot__bar {
    background: var(--tyre-reviews-blue);
    box-shadow: 0 0 0 2px rgba(13, 177, 231, 0.25);
}

.rim-prot__step--none.is-current .rim-prot__bar {
    background: #e06a6a;
    box-shadow: 0 0 0 2px rgba(224, 106, 106, 0.25);
}

/* A level we measured on a different size: marked, but not the headline. */
.rim-prot__step.is-observed .rim-prot__bar {
    background: repeating-linear-gradient(
        135deg,
        #9adcf5 0 4px,
        #d7eefa 4px 8px
    );
}

.rim-prot__cap {
    font-size: 0.68rem;
    line-height: 1.2;
    text-align: center;
    color: #94a3b8;
    overflow-wrap: anywhere;
}

.rim-prot__step.is-current .rim-prot__cap {
    font-weight: 700;
    color: #1e293b;
}

.rim-prot__step.is-observed .rim-prot__cap {
    color: #64748b;
}

/* --- Per-size observations -------------------------------------------- */

.rim-prot__obs {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid #e7ebf0;
}

.rim-prot__ob {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
}

.rim-prot__ob-size {
    flex: 0 0 auto;
    min-width: 6.5rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #1e293b;
}

.rim-prot__ob-val {
    flex: 0 0 auto;
    padding: 0.05rem 0.45rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #04303f;
    background: #e3f4fc;
}

.rim-prot__ob-val--none {
    color: #7a2020;
    background: #fdecec;
}

.rim-prot__ob-test {
    flex: 1 1 200px;
    min-width: 0;
    color: #475569;
    text-decoration: none;
}

.rim-prot__ob-test:hover {
    color: var(--tyre-reviews-blue-dark);
    text-decoration: underline;
}

/* --- Notes ------------------------------------------------------------- */

.rim-prot__varies {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem 0.7rem;
    border: 1px solid #cfe9f7;
    border-radius: 6px;
    background: #f2fafe;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #33607a;
}

.rim-prot__note {
    margin-top: 0.6rem;
    font-size: 0.72rem;
    line-height: 1.4;
    color: #8a939b;
}

@media (max-width: 575.98px) {
    .rim-prot__meter {
        gap: 0.2rem;
    }

    .rim-prot__cap {
        font-size: 0.6rem;
    }

    .rim-prot__ob-size {
        min-width: 0;
    }

    .rim-prot__ob-test {
        flex-basis: 100%;
    }
}
