/* Enhanced radial progress styling */
.radial-progress {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
}

/* Score display container */
.score-display {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Score text inside radial progress */
.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    text-align: center;
    font-family: system-ui, sans-serif;
    line-height: 1;
    z-index: 10 !important; /* Ensure text is always visible */
    width: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--base-content, #000); /* Ensure text has a contrasting color */
}

/* Different sizes for score text */
.score-text-sm {
    font-size: 0.75rem;
}

.score-text-md {
    font-size: 1rem;
}

.score-text-lg {
    font-size: 1.5rem;
}

/* Fix for multi-digit scores */
.radial-progress[data-score="100"] .score-text-sm,
.radial-progress[data-value="100"] .score-text-sm {
    font-size: 0.65rem;
    letter-spacing: -0.5px;
}

/* Reduce font size for long scores at small sizes */
@media (max-width: 768px) {
    .score-text-sm {
        font-size: 0.7rem;
    }
}

/* Data attribute fallback for simple numbers */
.radial-progress:not([data-score])[data-value]::after {
    content: attr(data-value) "%";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(var(--size) * 0.3);
    font-weight: 600;
}

/* Format percentages properly */
.with-percent .score-text::after {
    content: "%";
}