/* ============================================================================
   PERCENTAGE BARS COMPONENT
   Static bars for confidence/probability display - FootyStats style
   ============================================================================ */

/* Container for percentage bar */
.percentage-bar-container {
    width: 100%;
    max-width: 200px;
}

/* Bar wrapper */
.percentage-bar {
    position: relative;
    width: 100%;
    height: 20px;
    background-color: var(--background-tertiary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

/* Filled portion */
.percentage-bar-fill {
    height: 100%;
    transition: width var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: var(--spacing-xs);
}

/* Color variants based on percentage */
.percentage-bar-fill.high {
    background-color: var(--confidence-high);
}

.percentage-bar-fill.medium {
    background-color: var(--confidence-medium);
}

.percentage-bar-fill.low {
    background-color: var(--confidence-low);
}

.percentage-bar-fill.neutral {
    background-color: var(--neutral-gray);
}

/* Label inside bar */
.percentage-bar-label {
    position: absolute;
    top: 50%;
    right: var(--spacing-sm);
    transform: translateY(-50%);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    z-index: 1;
    pointer-events: none;
}

/* Label on white background when bar is full */
.percentage-bar-fill.high .percentage-bar-label,
.percentage-bar-fill.medium .percentage-bar-label,
.percentage-bar-fill.low .percentage-bar-label {
    color: var(--text-white);
}

/* Compact variant */
.percentage-bar.compact {
    height: 16px;
}

.percentage-bar.compact .percentage-bar-label {
    font-size: 10px;
}

/* Inline variant (for table cells) */
.percentage-bar.inline {
    display: inline-block;
    width: 80px;
    height: 16px;
    vertical-align: middle;
}

/* Text-only variant (just the percentage, no bar) */
.percentage-text {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    line-height: 1;
}

.percentage-text.high {
    background-color: var(--bg-success);
    color: var(--confidence-high);
}

.percentage-text.medium {
    background-color: var(--bg-warning);
    color: var(--confidence-medium);
}

.percentage-text.low {
    background-color: var(--bg-danger);
    color: var(--confidence-low);
}

.percentage-text.neutral {
    background-color: var(--bg-neutral);
    color: var(--text-secondary);
}

/* Mobile optimization */
@media (max-width: 768px) {
    .percentage-bar-container {
        max-width: 100px;
    }
    
    .percentage-bar {
        height: 16px;
    }
    
    .percentage-bar-label {
        font-size: 10px;
    }
    
    /* Hide bars, show text only on very small screens */
    .percentage-bar.hide-mobile {
        display: none;
    }
    
    .percentage-text.show-mobile {
        display: inline-block;
    }
}

/* Striped variant (for predicted values) */
.percentage-bar.striped .percentage-bar-fill {
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.1) 10px,
        rgba(255, 255, 255, 0.1) 20px
    );
}















