'; echo '

' . esc_html( $tier_label ) . ' ' . esc_html__( 'Plan', 'plume' ) . '

'; if ( null !== $usage['limit'] && $usage['limit'] > 0 ) { $pct = min( 100, (int) round( ( $usage['used'] / $usage['limit'] ) * 100 ) ); if ( $pct > 80 ) { $bar_modifier = 'danger'; } elseif ( $pct > 60 ) { $bar_modifier = 'warning'; } else { $bar_modifier = 'success'; } printf( '
', esc_attr( $bar_modifier ), absint( $pct ) ); printf( '

%s / %s %s (%s %s)

', esc_html( number_format_i18n( (int) $usage['used'] ) ), esc_html( number_format_i18n( (int) $usage['limit'] ) ), esc_html__( 'credits', 'plume' ), esc_html( number_format_i18n( (int) $usage['remaining'] ) ), esc_html__( 'remaining', 'plume' ) ); if ( $pct > 80 ) { echo '

' . esc_html__( 'Over 80% of monthly credits used. Consider upgrading.', 'plume' ) . '

'; } } else { echo '

' . esc_html__( 'No credit limit — using your own API key.', 'plume' ) . '

'; } echo ''; } }